Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(cypress): users_modify
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Jul 13, 2023
commit b65eb0c03d016fa86a931a1457b8a9ba464a8451
10 changes: 4 additions & 6 deletions cypress/e2e/settings/users_modify.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,21 @@ describe('Settings: Change user properties', function() {
// open the User settings
cy.visit('/settings/users')

cy.get(`.user-list-grid .row[data-id="${jdoe.userId}"]`).within(($row) => {
cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').within(() => {
// see that the list of users contains the user jdoe
cy.contains(jdoe.userId).should('exist')
// toggle the edit mode for the user jdoe
cy.get('.userActions .action-items > button:first-of-type').click()
cy.get('td.row__cell--actions .action-items > button:first-of-type').click()
})

cy.get(`.user-list-grid .row[data-id="${jdoe.userId}"]`).within(($row) => {
// see that the edit mode is on
cy.wrap($row).should('have.class', 'row--editable')
cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').within(() => {
// see that the password of user0 is ""
cy.get('input[type="password"]').should('exist').and('have.value', '')
// set the password for user0 to 123456
cy.get('input[type="password"]').type('123456')
// When I set the password for user0 to 123456
cy.get('input[type="password"]').should('have.value', '123456')
cy.get('.password button').click()
cy.get('input[type="password"] ~ button').click()

// Ignore failure if modal is not shown
cy.once('fail', (error) => {
Expand Down