aboutsummaryrefslogtreecommitdiffstats
path: root/cypress/e2e/files_sharing/files-download.cy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cypress/e2e/files_sharing/files-download.cy.ts')
-rw-r--r--cypress/e2e/files_sharing/files-download.cy.ts27
1 files changed, 23 insertions, 4 deletions
diff --git a/cypress/e2e/files_sharing/files-download.cy.ts b/cypress/e2e/files_sharing/files-download.cy.ts
index ce310933ff7..97ea91b7647 100644
--- a/cypress/e2e/files_sharing/files-download.cy.ts
+++ b/cypress/e2e/files_sharing/files-download.cy.ts
@@ -5,6 +5,7 @@
import type { User } from '@nextcloud/cypress'
import { createShare } from './FilesSharingUtils.ts'
import {
+ getActionButtonForFile,
getActionEntryForFile,
getRowForFile,
} from '../files/FilesUtils.ts'
@@ -41,8 +42,13 @@ describe('files_sharing: Download forbidden', { testIsolation: true }, () => {
// visit shared files view
cy.visit('/apps/files')
// see the shared folder
- getRowForFile('folder').should('be.visible')
- getActionEntryForFile('folder', 'download').should('not.exist')
+ getActionButtonForFile('folder')
+ .should('be.visible')
+ // open the action menu
+ .click({ force: true })
+ // see no download action
+ getActionEntryForFile('folder', 'download')
+ .should('not.exist')
// Disable view without download option
cy.runOccCommand('config:app:set --value no core shareapi_allow_view_without_download')
@@ -51,6 +57,10 @@ describe('files_sharing: Download forbidden', { testIsolation: true }, () => {
cy.visit('/apps/files')
// see the shared folder
getRowForFile('folder').should('be.visible')
+ getActionButtonForFile('folder')
+ .should('be.visible')
+ // open the action menu
+ .click({ force: true })
getActionEntryForFile('folder', 'download').should('not.exist')
})
@@ -68,8 +78,13 @@ describe('files_sharing: Download forbidden', { testIsolation: true }, () => {
// visit shared files view
cy.visit('/apps/files')
// see the shared folder
- getRowForFile('file.txt').should('be.visible')
- getActionEntryForFile('file.txt', 'download').should('not.exist')
+ getActionButtonForFile('file.txt')
+ .should('be.visible')
+ // open the action menu
+ .click({ force: true })
+ // see no download action
+ getActionEntryForFile('file.txt', 'download')
+ .should('not.exist')
// Disable view without download option
cy.runOccCommand('config:app:set --value no core shareapi_allow_view_without_download')
@@ -78,6 +93,10 @@ describe('files_sharing: Download forbidden', { testIsolation: true }, () => {
cy.visit('/apps/files')
// see the shared folder
getRowForFile('file.txt').should('be.visible')
+ getActionButtonForFile('file.txt')
+ .should('be.visible')
+ // open the action menu
+ .click({ force: true })
getActionEntryForFile('file.txt', 'download').should('not.exist')
})
})