12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import { copyFile, getRowForFile, moveFile, navigateToFolder } from '../../files/FilesUtils.ts'
- import { getShareUrl, setupPublicShare } from './setup-public-share.ts'
- describe('files_sharing: Public share - copy and move files', { testIsolation: true }, () => {
- beforeEach(() => {
- setupPublicShare()
- .then(() => cy.logout())
- .then(() => cy.visit(getShareUrl()))
- })
- it('Can copy a file to new folder', () => {
- getRowForFile('foo.txt').should('be.visible')
- getRowForFile('subfolder').should('be.visible')
- copyFile('foo.txt', 'subfolder')
-
- getRowForFile('foo.txt').should('be.visible')
- navigateToFolder('subfolder')
- cy.url().should('contain', 'dir=/subfolder')
- getRowForFile('foo.txt').should('be.visible')
- getRowForFile('bar.txt').should('be.visible')
- getRowForFile('subfolder').should('not.exist')
- })
- it('Can move a file to new folder', () => {
- getRowForFile('foo.txt').should('be.visible')
- getRowForFile('subfolder').should('be.visible')
- moveFile('foo.txt', 'subfolder')
-
- getRowForFile('subfolder').should('be.visible')
-
- getRowForFile('foo.txt').should('not.exist')
- navigateToFolder('subfolder')
- cy.url().should('contain', 'dir=/subfolder')
- getRowForFile('foo.txt').should('be.visible')
- getRowForFile('subfolder').should('not.exist')
- })
- })
|