Fix/update cypress command delete user from org (#4930)

* added the isOpen and onClose pros to context menu component

* added a warning shown before letting a user leave org

* added confirmation modal for removing members from table

* Added warning modal to be showing on member deletion

* updated cypress tests

* fixed typo

* removed log

* updated deleteUserFromOrg cypress command
This commit is contained in:
Pranav Kanade 2021-06-05 11:01:18 +05:30 committed by GitHub
parent 42bbc1edf1
commit 8290dd5a25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -63,6 +63,8 @@
"orgImportAppOption": "[data-cy=t--org-import-app]",
"orgImportAppModal": ".t--import-application-modal",
"orgImportAppButton": "[data-cy=t--org-import-app-button]",
"leaveOrgConfirmModal": ".t--member-delete-confirmation-modal",
"leaveOrgConfirmButton": "[data-cy=t--org-leave-button]",
"orgNameInput": "[data-cy=t--org-name-input]",
"renameOrgInput": "[data-cy=t--org-rename-input]",
"orgEmailInput": "[data-cy=t--org-email-input]",

View File

@ -170,6 +170,8 @@ Cypress.Commands.add("deleteUserFromOrg", (orgName, email) => {
cy.get(homePage.DeleteBtn)
.last()
.click({ force: true });
cy.get(homePage.leaveOrgConfirmModal).should("be.visible");
cy.get(homePage.leaveOrgConfirmButton).click({ force: true });
cy.xpath(homePage.appHome)
.first()
.should("be.visible")

View File

@ -72,7 +72,7 @@ function DeleteConfirmationModal(props: DeleteConfirmationProps) {
/>
<ImportButton
className=".button-item"
cypressSelector={"t--org-import-app-button"}
cypressSelector={"t--org-leave-button"}
isLoading={isDeletingUser}
onClick={onConfirm}
size={Size.large}