summaryrefslogtreecommitdiffstats
path: root/cypress
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-04-02 11:28:59 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-04-04 11:58:34 +0000
commit0aa4e0a675f90a03bce4d9b938d0753a1b610eab (patch)
tree684428d8f87379729241a8bcbb20b0f8efb02810 /cypress
parentd98738cbd0d2ae7aef36436e34b6ce6e16f325df (diff)
downloadnextcloud-server-0aa4e0a675f90a03bce4d9b938d0753a1b610eab.tar.gz
nextcloud-server-0aa4e0a675f90a03bce4d9b938d0753a1b610eab.zip
chore: add drag and drop recursion and FilesystemAPI testing
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'cypress')
-rw-r--r--cypress/e2e/files/FileSystemAPIUtils.ts59
-rw-r--r--cypress/e2e/files/drag-n-drop.cy.ts2
2 files changed, 1 insertions, 60 deletions
diff --git a/cypress/e2e/files/FileSystemAPIUtils.ts b/cypress/e2e/files/FileSystemAPIUtils.ts
deleted file mode 100644
index 995aef2ced5..00000000000
--- a/cypress/e2e/files/FileSystemAPIUtils.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { basename } from 'node:path'
-
-class FileSystemEntry {
-
- private _isFile: boolean
- private _fullPath: string
-
- constructor(isFile: boolean, fullPath: string) {
- this._isFile = isFile
- this._fullPath = fullPath
- }
-
- get isFile() {
- return !!this._isFile
- }
-
- get isDirectory() {
- return !this.isFile
- }
-
- get name() {
- return basename(this._fullPath)
- }
-
-}
-
-export class FileSystemFileEntry extends FileSystemEntry {
-
- private _contents: string
-
- constructor(fullPath: string, contents: string) {
- super(true, fullPath)
- this._contents = contents
- }
-
- file(success: (file: File) => void) {
- success(new File([this._contents], this.name))
- }
-
-}
-
-export class FileSystemDirectoryEntry extends FileSystemEntry {
-
- private _entries: FileSystemEntry[]
-
- constructor(fullPath: string, entries: FileSystemEntry[]) {
- super(false, fullPath)
- this._entries = entries || []
- }
-
- createReader() {
- return {
- readEntries: (success: (entries: FileSystemEntry[]) => void) => {
- success(this._entries)
- },
- }
- }
-
-}
diff --git a/cypress/e2e/files/drag-n-drop.cy.ts b/cypress/e2e/files/drag-n-drop.cy.ts
index 4474f5b634c..86a3bcfb571 100644
--- a/cypress/e2e/files/drag-n-drop.cy.ts
+++ b/cypress/e2e/files/drag-n-drop.cy.ts
@@ -1,6 +1,6 @@
import { getRowForFile } from './FilesUtils.ts'
-describe('files: Drag and Drop legacy', { testIsolation: true }, () => {
+describe('files: Drag and Drop', { testIsolation: true }, () => {
beforeEach(() => {
cy.createRandomUser().then((user) => {
cy.login(user)