mirror of
https://github.com/nextcloud/server.git
synced 2026-02-19 02:38:40 -05:00
test(sharing): expand advanced settings before accessing its elements
Tests that access elements inside the Advanced Settings section (hide download, share label, grid view, etc.) must first click "Advanced settings" to expand it. Previously these tests relied on buggy auto-expand behavior that occurred when permissions didn't match bundled values. Signed-off-by: nfebe <fenn25.fn@gmail.com>
This commit is contained in:
parent
2cdbd7fa15
commit
80ab68369f
4 changed files with 6 additions and 0 deletions
|
|
@ -76,6 +76,7 @@ describe('files_sharing: Public share - setting the default view mode', () => {
|
|||
.findByRole('button', { name: /Actions/i })
|
||||
.click()
|
||||
cy.findByRole('menuitem', { name: /Customize link/i }).click()
|
||||
cy.findByRole('button', { name: /Advanced settings/i }).click()
|
||||
cy.findByRole('checkbox', { name: /Show files in grid view/i })
|
||||
.scrollIntoView()
|
||||
cy.findByRole('checkbox', { name: /Show files in grid view/i })
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ describe('files_sharing: Public share - downloading files', { testIsolation: tru
|
|||
triggerActionForFile('test', 'details')
|
||||
|
||||
openLinkShareDetails(0)
|
||||
cy.findByRole('button', { name: /advanced settings/i }).click()
|
||||
|
||||
cy.intercept('PUT', '**/ocs/v2.php/apps/files_sharing/api/v1/shares/*').as('update')
|
||||
|
||||
|
|
@ -210,12 +211,14 @@ describe('files_sharing: Public share - downloading files', { testIsolation: tru
|
|||
cy.wait('@update')
|
||||
|
||||
openLinkShareDetails(0)
|
||||
cy.findByRole('button', { name: /advanced settings/i }).click()
|
||||
cy.findByRole('checkbox', { name: /hide download/i })
|
||||
.should('be.checked')
|
||||
|
||||
cy.reload()
|
||||
|
||||
openLinkShareDetails(0)
|
||||
cy.findByRole('button', { name: /advanced settings/i }).click()
|
||||
cy.findByRole('checkbox', { name: /hide download/i })
|
||||
.should('be.checked')
|
||||
})
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ describe('files_sharing: sidebar tab', () => {
|
|||
it('correctly lists shares by label with special characters', () => {
|
||||
createLinkShare({ user: alice }, 'test')
|
||||
openLinkShareDetails(0)
|
||||
cy.findByRole('button', { name: /advanced settings/i }).click()
|
||||
cy.findByRole('textbox', { name: /share label/i })
|
||||
.should('be.visible')
|
||||
.type('Alice\' share')
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ describe('files_sharing: Public share - View only', { testIsolation: true }, ()
|
|||
.should('be.visible')
|
||||
cy.get('[data-cy-files-sharing-share-permissions-bundle="read-only"]')
|
||||
.click()
|
||||
cy.findByRole('button', { name: /advanced settings/i }).click()
|
||||
cy.findByRole('checkbox', { name: 'Hide download' })
|
||||
.check({ force: true })
|
||||
// save the update
|
||||
|
|
|
|||
Loading…
Reference in a new issue