-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: [M3-7483] - Add test to delete users on "Users & Grants" page #10093
Conversation
Coverage Report: ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @cliu-akamai!
cy.wait(['@deleteUser', '@getUsers']); | ||
|
||
// the user is deleted | ||
cy.findByText(additionalUser.username).should('not.exist'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cy.findByText(additionalUser.username).should('not.exist'); | |
ui.toast.assertMessage(`User ${additionalUser.username} has been deleted successfully.`); | |
cy.findByText(additionalUser.username).should('not.exist'); |
This wasn't a ticket requirement, but it would be good to have the toast notification covered too!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed!
cy.findByText(mockUser.username).should('be.visible'); | ||
cy.findByText(additionalUser.username).should('be.visible'); | ||
|
||
// clickl the "x" button will dismiss the dialog and do nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// clickl the "x" button will dismiss the dialog and do nothing | |
// clicking the "x" button will dismiss the dialog and do nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ui.dialog.findByTitle('Confirm Deletion').within(() => { | ||
ui.button.findByTitle('Cancel').should('be.visible').click(); | ||
}); | ||
// click the "Cancel" button will do nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// click the "Cancel" button will do nothing | |
// clicking the "Cancel" button will dismiss the dialog and do nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this small adjustment; it'll make it align with the comment for the next assertion too.
cy.wait(['@deleteUser', '@getUsers']); | ||
|
||
// the user is deleted | ||
cy.findByText(additionalUser.username).should('not.exist'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test passes ✅
Code review ✅
ui.dialog.findByTitle('Confirm Deletion').within(() => { | ||
ui.button.findByTitle('Cancel').should('be.visible').click(); | ||
}); | ||
// click the "Cancel" button will do nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this small adjustment; it'll make it align with the comment for the next assertion too.
Description 📝
Add regression tests for deleting users on
Users & Grants
page.Major Changes 🔄
Users & Grants
page.How to test 🧪