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:
parent
42bbc1edf1
commit
8290dd5a25
|
|
@ -63,6 +63,8 @@
|
||||||
"orgImportAppOption": "[data-cy=t--org-import-app]",
|
"orgImportAppOption": "[data-cy=t--org-import-app]",
|
||||||
"orgImportAppModal": ".t--import-application-modal",
|
"orgImportAppModal": ".t--import-application-modal",
|
||||||
"orgImportAppButton": "[data-cy=t--org-import-app-button]",
|
"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]",
|
"orgNameInput": "[data-cy=t--org-name-input]",
|
||||||
"renameOrgInput": "[data-cy=t--org-rename-input]",
|
"renameOrgInput": "[data-cy=t--org-rename-input]",
|
||||||
"orgEmailInput": "[data-cy=t--org-email-input]",
|
"orgEmailInput": "[data-cy=t--org-email-input]",
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,8 @@ Cypress.Commands.add("deleteUserFromOrg", (orgName, email) => {
|
||||||
cy.get(homePage.DeleteBtn)
|
cy.get(homePage.DeleteBtn)
|
||||||
.last()
|
.last()
|
||||||
.click({ force: true });
|
.click({ force: true });
|
||||||
|
cy.get(homePage.leaveOrgConfirmModal).should("be.visible");
|
||||||
|
cy.get(homePage.leaveOrgConfirmButton).click({ force: true });
|
||||||
cy.xpath(homePage.appHome)
|
cy.xpath(homePage.appHome)
|
||||||
.first()
|
.first()
|
||||||
.should("be.visible")
|
.should("be.visible")
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ function DeleteConfirmationModal(props: DeleteConfirmationProps) {
|
||||||
/>
|
/>
|
||||||
<ImportButton
|
<ImportButton
|
||||||
className=".button-item"
|
className=".button-item"
|
||||||
cypressSelector={"t--org-import-app-button"}
|
cypressSelector={"t--org-leave-button"}
|
||||||
isLoading={isDeletingUser}
|
isLoading={isDeletingUser}
|
||||||
onClick={onConfirm}
|
onClick={onConfirm}
|
||||||
size={Size.large}
|
size={Size.large}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user