Skip to content

Commit f24a648

Browse files
authored
Merge pull request #2224 from nextcloud/backport/2222/stable27
2 parents 514f4bc + 3af637d commit f24a648

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,14 @@ describe(`Download ${fileName} in viewer`, function() {
6969
cy.get('.sharing-link-list > .sharing-entry button[aria-label*="Actions for "]').click()
7070
cy.get('.action-button:contains(\'Customize link\')').click()
7171
cy.get('.checkbox-radio-switch-checkbox').contains('Hide download').as('hideDownloadBtn')
72+
73+
cy.intercept('PUT', '**/apps/files_sharing/api/v1/shares/*').as('saveShareAPIRequest')
74+
7275
// click the label
7376
cy.get('@hideDownloadBtn').get('span').contains('Hide download').click()
7477
cy.get('@hideDownloadBtn').get('input[type=checkbox]').should('be.checked')
78+
cy.wait('@saveShareAPIRequest', { timeout: 10000 })
79+
7580
// Log out and access link share
7681
cy.logout()
7782
cy.visit(`/s/${token}`)
@@ -90,9 +95,10 @@ describe(`Download ${fileName} in viewer`, function() {
9095
.and('not.have.class', 'icon-loading')
9196
})
9297

93-
it('See the title on the viewer header but not the Download button', function() {
98+
it('See the title on the viewer header but not the Download nor the menu button', function() {
9499
cy.get('body > .viewer .modal-title').should('contain', 'image1.jpg')
95-
cy.get('body > .viewer .modal-header a.action-item .download-icon').should('not.exist')
100+
cy.get('body a[download="image1.jpg"]').should('not.exist')
101+
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('not.exist')
96102
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
97103
})
98104

0 commit comments

Comments
 (0)