Skip to content

Commit

Permalink
Return Promise like object from a cypress command to create a user (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored Jan 21, 2025
1 parent cc4c910 commit 5d69c7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ Cypress.Commands.add('headlessDeleteTask', (taskID) => {
});
});

Cypress.Commands.add('headlessCreateUser', (userSpec) => {
Cypress.Commands.add('headlessCreateUser', (userSpec) => (
cy.request({
method: 'POST',
url: '/api/auth/register',
Expand All @@ -365,8 +365,8 @@ Cypress.Commands.add('headlessCreateUser', (userSpec) => {
expect(response.body.username).to.eq(userSpec.username);
expect(response.body.email).to.eq(userSpec.email);
return cy.wrap();
});
});
})
));

Cypress.Commands.add('headlessLogout', () => {
cy.clearCookies();
Expand Down

0 comments on commit 5d69c7e

Please sign in to comment.