Skip to content

Commit

Permalink
#2943 - replaced msgConfirm with RemovalValidation
Browse files Browse the repository at this point in the history
  • Loading branch information
rmmayo committed Nov 12, 2024
1 parent 79128c9 commit 3db0c87
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ describe('Admin Group Member Management Tests', () => {
cy.wait('@loadUserRoles');

cy.get('[data-cy="controlsCell_user1"] [data-cy="removeUserBtn"]').click()
cy.get('.p-confirm-dialog-reject').click()
cy.get('[data-cy="closeDialogBtn"]').click()
cy.get('[data-cy="controlsCell_user1"] [data-cy="removeUserBtn"]').should('have.focus')

cy.get('[data-cy="controlsCell_user1"] [data-cy="removeUserBtn"]').click()
Expand Down
12 changes: 9 additions & 3 deletions e2e-tests/cypress/e2e/limit_admin_dashboard_access_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ describe('Limit Admin Dashboard Access Tests', () => {


cy.get(`${userTableSelector} [data-p-index="1"] [data-cy="removeUserBtn"]`).click()
cy.get('[data-pc-name="acceptbutton"]').click()
cy.get('[data-cy="removalSafetyCheckMsg"]').contains('This will remove [email protected]')
cy.get('[data-cy="currentValidationText"]').fill('Delete Me')
cy.get('[data-cy="saveDialogBtn"]').click()
cy.validateTable(userTableSelector, [
[{
colIndex: 0,
Expand All @@ -134,9 +136,13 @@ describe('Limit Admin Dashboard Access Tests', () => {
], 5, true, null, false);

cy.get(`${userTableSelector} [data-p-index="0"] [data-cy="removeUserBtn"]`).click()
cy.get('[data-pc-name="acceptbutton"]').click()
cy.get('[data-cy="removalSafetyCheckMsg"]').contains('This will remove [email protected]')
cy.get('[data-cy="currentValidationText"]').fill('Delete Me')
cy.get('[data-cy="saveDialogBtn"]').click()
cy.get(`${userTableSelector} [data-p-index="0"] [data-cy="removeUserBtn"]`).click()
cy.get('[data-pc-name="acceptbutton"]').click()
cy.get('[data-cy="removalSafetyCheckMsg"]').contains('This will remove [email protected]')
cy.get('[data-cy="currentValidationText"]').fill('Delete Me')
cy.get('[data-cy="saveDialogBtn"]').click()
cy.get(userTableSelector).contains('There are no records to show')
})

Expand Down
6 changes: 4 additions & 2 deletions e2e-tests/cypress/e2e/rootUser_pinUnpin_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,10 @@ describe('Root Pin and Unpin Tests', () => {
.eq(1)
.click();
}
cy.contains('YES, Delete It')
.click();

cy.get('[data-cy="removalSafetyCheckMsg"]').contains('This will remove')
cy.get('[data-cy="currentValidationText"]').fill('Delete Me')
cy.get('[data-cy="saveDialogBtn"]').click()
cy.wait('@loadProjectAdmins');
cy.get(rowSelector)
.should('have.length', 1)
Expand Down
10 changes: 6 additions & 4 deletions e2e-tests/cypress/e2e/settings_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ describe('Settings Tests', () => {
cy.get(`${rootUsrTableSelector} [data-cy="removeUserBtn"]`)
.eq(1)
.click();
cy.contains('YES, Delete It')
.click();
cy.get('[data-cy="removalSafetyCheckMsg"]').contains('This will remove [email protected]')
cy.get('[data-cy="currentValidationText"]').fill('Delete Me')
cy.get('[data-cy="saveDialogBtn"]').click()
cy.wait('@deleteRootUser');
cy.validateTable(rootUsrTableSelector, [
[{
Expand Down Expand Up @@ -510,8 +511,9 @@ describe('Settings Tests', () => {
cy.get(`${supervisorTableSelector} [data-cy="removeUserBtn"]`)
.eq(1)
.click();
cy.contains('YES, Delete It')
.click();
cy.get('[data-cy="removalSafetyCheckMsg"]').contains('This will remove [email protected]')
cy.get('[data-cy="currentValidationText"]').fill('Delete Me')
cy.get('[data-cy="saveDialogBtn"]').click()
cy.validateTable(supervisorTableSelector, [
[{
colIndex: 0,
Expand Down

0 comments on commit 3db0c87

Please sign in to comment.