Skip to content

Commit

Permalink
pkp#8700 Fixed check to ensure the user was properly created
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Mar 23, 2023
1 parent bbf2a06 commit 8980323
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,10 @@ Cypress.Commands.add('createUser', user => {
user.roles.forEach(role => {
cy.get('form[id=userRoleForm]').contains(role).click();
});
cy.server();
cy.route('POST', '**/grid/settings/user/user-grid/update-user-roles*').as('rolesSaved');
cy.get('form[id=userRoleForm] button[id^=submitFormButton]').click();
cy.get('span[id$="-username"]:contains("' + Cypress.$.escapeSelector(user.username) + '")');
cy.wait('@rolesSaved').its('status').should('eq', 200);
});

Cypress.Commands.add('flushNotifications', function() {
Expand Down

0 comments on commit 8980323

Please sign in to comment.