Skip to content

Commit 38195b7

Browse files
committed
Update EditDatasetTerms.spec.tsx
1 parent e99795a commit 38195b7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/e2e-integration/e2e/sections/edit-dataset-terms/EditDatasetTerms.spec.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,21 @@ describe('Edit Dataset Terms', () => {
134134

135135
cy.get('select').select('Custom Dataset Terms')
136136
cy.findByTestId('customTerms.termsOfUse').type('Custom terms text')
137-
cy.findByText('Leave without saving').should('exist').click()
138137
cy.findByRole('tab', { name: 'Restricted Files + Terms of Access' }).click()
138+
139+
cy.findByRole('button', { name: /Leave without saving/i })
140+
.should('exist')
141+
.click()
142+
139143
cy.findByLabelText('Enable access request').check()
140144
cy.findByLabelText('Terms of Access for Restricted Files').type('Restricted access terms')
141145

142146
cy.findByRole('tab', { name: 'Dataset Terms' }).click()
143147

148+
cy.findByRole('button', { name: /Leave without saving/i })
149+
.should('exist')
150+
.click()
151+
144152
cy.get('select').should('have.value', 'CUSTOM')
145153
cy.findByTestId('customTerms.termsOfUse').should('have.value', 'Custom terms text')
146154

0 commit comments

Comments
 (0)