Skip to content

Commit 8a3957d

Browse files
PytalShGKme
authored andcommitted
chore(cypress): Fix tests
Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 parent aeaeb49 commit 8a3957d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

cypress/e2e/sharing/download-share-disabled.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe(`Download ${fileName} in viewer`, function() {
7272
// Open the share menu
7373
cy.get('.sharing-link-list > .sharing-entry [aria-label*=\'Actions for "Share link"\']').click()
7474
cy.get('.action-button:contains(\'Customize link\')').click()
75-
cy.get('label:contains(\'Hide download\')').as('hideDownloadBtn').click()
75+
cy.get('span:contains(\'Hide download\')').as('hideDownloadBtn').click({ force: true })
7676
cy.get('@hideDownloadBtn').prev('input[type=checkbox]').should('be.checked')
7777

7878
// Log out and access link share

cypress/support/commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ Cypress.Commands.add(
116116
'clickAction',
117117
{ prevSubject: 'element' },
118118
(subject, action) => {
119-
subject.find('[data-cy-files-list-row-actions] button').click()
120-
cy.get(`[data-cy-files-list-row-action="${action}"]`).click()
119+
subject.find('[data-cy-files-list-row-actions] [aria-label="Actions"]').click()
120+
cy.get(`[data-cy-files-list-row-action="${action}"] [role="menuitem"]`).click()
121121
},
122122
)
123123

0 commit comments

Comments
 (0)