Skip to content

Commit af487af

Browse files
mnaqvi08wdoconnell
authored andcommitted
test: open modal from within tooltip
1 parent b9528ba commit af487af

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

cypress/e2e/cloud/org-list.test.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,18 @@ describe('Account / Organizations Tab', () => {
5858
cy.get('.account--organizations-tab-suspended-orgs-card')
5959
.should('have.length', 1)
6060
.and('be.visible')
61-
.within(() => {
62-
cy.getByTestID('question-mark-tooltip').click()
63-
cy.contains('Deletion in progress')
64-
})
61+
.contains('Deletion in progress')
6562

66-
cy.getByTestID('question-mark-tooltip--tooltip--dialog').contains(
67-
'Organizations can be reactivated within 7 days of deletion.'
68-
)
63+
cy.getByTestID('question-mark-tooltip').click()
6964

7065
cy.getByTestID('question-mark-tooltip--tooltip--dialog').within(() => {
71-
cy.get('button').contains('contact support').should('exist')
66+
cy.get('button').contains('contact support').trigger('click')
7267
})
7368

69+
cy.getByTestID('contact-support-overlay-header').should('exist')
70+
71+
cy.contains('button', 'Cancel').click()
72+
7473
cy.getByTestID('pagination-item')
7574
.should('have.length', 2)
7675
.contains('2')

src/identity/components/OrganizationListTab/OrganizationCard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export const OrganizationCard: FC<OrgCardProps> = ({
9898
<QuestionMarkTooltip
9999
diameter={15}
100100
tooltipContents={tooltipContent}
101+
testID="question-mark-tooltip"
101102
/>
102103
</>
103104
)}

0 commit comments

Comments
 (0)