|
|
@@ -21,7 +21,7 @@ |
|
|
|
*/ |
|
|
|
|
|
|
|
import type { User } from '@nextcloud/cypress' |
|
|
|
import { clickOnBreadcumbs, closeSidebar, copyFile, getRowForFile, getRowForFileId, renameFile, triggerActionForFile, triggerInlineActionForFileId } from './FilesUtils' |
|
|
|
import { clickOnBreadcrumbs, closeSidebar, copyFile, getRowForFile, getRowForFileId, renameFile, triggerActionForFile, triggerInlineActionForFileId } from './FilesUtils' |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
@@ -113,7 +113,7 @@ describe('Files: Live photos', { testIsolation: true }, () => { |
|
|
|
|
|
|
|
it('Copies both files when copying the .jpg', () => { |
|
|
|
copyFile(`${randomFileName}.jpg`, '.') |
|
|
|
clickOnBreadcumbs('All files') |
|
|
|
clickOnBreadcrumbs('All files') |
|
|
|
|
|
|
|
getRowForFile(`${randomFileName}.jpg`).should('have.length', 1) |
|
|
|
getRowForFile(`${randomFileName}.mov`).should('have.length', 1) |
|
|
@@ -123,7 +123,7 @@ describe('Files: Live photos', { testIsolation: true }, () => { |
|
|
|
|
|
|
|
it('Copies both files when copying the .mov', () => { |
|
|
|
copyFile(`${randomFileName}.mov`, '.') |
|
|
|
clickOnBreadcumbs('All files') |
|
|
|
clickOnBreadcrumbs('All files') |
|
|
|
|
|
|
|
getRowForFile(`${randomFileName}.mov`).should('have.length', 1) |
|
|
|
getRowForFile(`${randomFileName} (copy).jpg`).should('have.length', 1) |
|
|
@@ -132,7 +132,7 @@ describe('Files: Live photos', { testIsolation: true }, () => { |
|
|
|
|
|
|
|
it('Moves files when moving the .jpg', () => { |
|
|
|
renameFile(`${randomFileName}.jpg`, `${randomFileName}_moved.jpg`) |
|
|
|
clickOnBreadcumbs('All files') |
|
|
|
clickOnBreadcrumbs('All files') |
|
|
|
|
|
|
|
getRowForFileId(jpgFileId).invoke('attr', 'data-cy-files-list-row-name').should('equal', `${randomFileName}_moved.jpg`) |
|
|
|
getRowForFileId(movFileId).invoke('attr', 'data-cy-files-list-row-name').should('equal', `${randomFileName}_moved.mov`) |
|
|
@@ -140,7 +140,7 @@ describe('Files: Live photos', { testIsolation: true }, () => { |
|
|
|
|
|
|
|
it('Moves files when moving the .mov', () => { |
|
|
|
renameFile(`${randomFileName}.mov`, `${randomFileName}_moved.mov`) |
|
|
|
clickOnBreadcumbs('All files') |
|
|
|
clickOnBreadcrumbs('All files') |
|
|
|
|
|
|
|
getRowForFileId(jpgFileId).invoke('attr', 'data-cy-files-list-row-name').should('equal', `${randomFileName}_moved.jpg`) |
|
|
|
getRowForFileId(movFileId).invoke('attr', 'data-cy-files-list-row-name').should('equal', `${randomFileName}_moved.mov`) |
|
|
@@ -148,7 +148,7 @@ describe('Files: Live photos', { testIsolation: true }, () => { |
|
|
|
|
|
|
|
it('Deletes files when deleting the .jpg', () => { |
|
|
|
triggerActionForFile(`${randomFileName}.jpg`, 'delete') |
|
|
|
clickOnBreadcumbs('All files') |
|
|
|
clickOnBreadcrumbs('All files') |
|
|
|
|
|
|
|
getRowForFile(`${randomFileName}.jpg`).should('have.length', 0) |
|
|
|
getRowForFile(`${randomFileName}.mov`).should('have.length', 0) |
|
|
@@ -161,7 +161,7 @@ describe('Files: Live photos', { testIsolation: true }, () => { |
|
|
|
|
|
|
|
it('Block deletion when deleting the .mov', () => { |
|
|
|
triggerActionForFile(`${randomFileName}.mov`, 'delete') |
|
|
|
clickOnBreadcumbs('All files') |
|
|
|
clickOnBreadcrumbs('All files') |
|
|
|
|
|
|
|
getRowForFile(`${randomFileName}.jpg`).should('have.length', 1) |
|
|
|
getRowForFile(`${randomFileName}.mov`).should('have.length', 1) |
|
|
@@ -176,7 +176,7 @@ describe('Files: Live photos', { testIsolation: true }, () => { |
|
|
|
triggerActionForFile(`${randomFileName}.jpg`, 'delete') |
|
|
|
cy.visit('/apps/files/trashbin') |
|
|
|
triggerInlineActionForFileId(jpgFileId, 'restore') |
|
|
|
clickOnBreadcumbs('Deleted files') |
|
|
|
clickOnBreadcrumbs('Deleted files') |
|
|
|
|
|
|
|
getRowForFile(`${randomFileName}.jpg`).should('have.length', 0) |
|
|
|
getRowForFile(`${randomFileName}.mov`).should('have.length', 0) |
|
|
@@ -191,7 +191,7 @@ describe('Files: Live photos', { testIsolation: true }, () => { |
|
|
|
triggerActionForFile(`${randomFileName}.jpg`, 'delete') |
|
|
|
cy.visit('/apps/files/trashbin') |
|
|
|
triggerInlineActionForFileId(movFileId, 'restore') |
|
|
|
clickOnBreadcumbs('Deleted files') |
|
|
|
clickOnBreadcrumbs('Deleted files') |
|
|
|
|
|
|
|
getRowForFileId(jpgFileId).should('have.length', 1) |
|
|
|
getRowForFileId(movFileId).should('have.length', 1) |