Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-07-26 11:40:04 +0300
committerVincent Petry <vincent@nextcloud.com>2022-07-26 11:40:04 +0300
commit259d5548ba8905b59826e0ae495d13a89ef48ee7 (patch)
treeed2906d64c807664f4832ce98305eed2d7f08094 /cypress
parenta31a3517f647d2956965d14946af4c499a708fcc (diff)
Replace files app DOM id with class
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'cypress')
-rw-r--r--cypress/e2e/ImageView.spec.js4
-rw-r--r--cypress/e2e/files.spec.js2
-rw-r--r--cypress/e2e/images.spec.js36
-rw-r--r--cypress/e2e/share.spec.js10
-rw-r--r--cypress/e2e/viewer.spec.js2
-rw-r--r--cypress/e2e/workspace.spec.js14
-rw-r--r--cypress/support/commands.js8
7 files changed, 38 insertions, 38 deletions
diff --git a/cypress/e2e/ImageView.spec.js b/cypress/e2e/ImageView.spec.js
index 25f4e15f4..82b1089ae 100644
--- a/cypress/e2e/ImageView.spec.js
+++ b/cypress/e2e/ImageView.spec.js
@@ -2,7 +2,7 @@ import { randHash } from '../utils/index.js'
const currentUser = randHash()
-const refresh = () => cy.get('#controls .crumb:not(.hidden) a')
+const refresh = () => cy.get('.files-controls .crumb:not(.hidden) a')
.last()
.click({ force: true })
@@ -85,7 +85,7 @@ describe('Image View', () => {
})
it('with preview', () => {
- cy.get('#fileList tr[data-file="github.png"]')
+ cy.get('.files-fileList tr[data-file="github.png"]')
.should('have.attr', 'data-id')
.then(imageId => {
const fileName = `${Cypress.currentTest.title}.md`
diff --git a/cypress/e2e/files.spec.js b/cypress/e2e/files.spec.js
index 34f23ea3d..15f095168 100644
--- a/cypress/e2e/files.spec.js
+++ b/cypress/e2e/files.spec.js
@@ -26,7 +26,7 @@ describe('Files default view', function() {
})
it('See the default files list', function() {
- cy.get('#fileList tr').should('contain', 'welcome.txt')
+ cy.get('.files-fileList tr').should('contain', 'welcome.txt')
})
it('Take screenshot', function() {
diff --git a/cypress/e2e/images.spec.js b/cypress/e2e/images.spec.js
index 8d7696b07..b6bfb4515 100644
--- a/cypress/e2e/images.spec.js
+++ b/cypress/e2e/images.spec.js
@@ -147,9 +147,9 @@ describe('Test all image insertion methods', () => {
})
it('See test files in the list and display hidden files', () => {
- cy.get('#fileList tr[data-file="test.md"]', { timeout: 10000 })
+ cy.get('.files-fileList tr[data-file="test.md"]', { timeout: 10000 })
.should('contain', 'test.md')
- cy.get('#fileList tr[data-file="github.png"]', { timeout: 10000 })
+ cy.get('.files-fileList tr[data-file="github.png"]', { timeout: 10000 })
.should('contain', 'github.png')
cy.showHiddenFiles()
})
@@ -222,7 +222,7 @@ describe('Test all image insertion methods', () => {
it('test if image files are in the attachment folder', () => {
// check we stored the image names/ids
- cy.get('#fileList tr[data-file="test.md"]', { timeout: 10000 })
+ cy.get('.files-fileList tr[data-file="test.md"]', { timeout: 10000 })
.should('have.attr', 'data-id')
.then((documentId) => {
const files = attachmentFileNameToId[documentId]
@@ -231,7 +231,7 @@ describe('Test all image insertion methods', () => {
cy.openFolder('.attachments.' + documentId)
cy.screenshot()
for (const name in files) {
- cy.get(`#fileList tr[data-file="${name}"]`, { timeout: 10000 })
+ cy.get(`.files-fileList tr[data-file="${name}"]`, { timeout: 10000 })
.should('exist')
.should('have.attr', 'data-id')
.should('eq', String(files[name]))
@@ -244,7 +244,7 @@ describe('Test all image insertion methods', () => {
cy.reloadFileList()
cy.moveFile('test.md', 'subFolder/test.md')
cy.openFolder('subFolder')
- cy.get('#fileList tr[data-file="test.md"]', { timeout: 10000 })
+ cy.get('.files-fileList tr[data-file="test.md"]', { timeout: 10000 })
.should('exist')
.should('have.attr', 'data-id')
.then((documentId) => {
@@ -252,7 +252,7 @@ describe('Test all image insertion methods', () => {
cy.openFolder('.attachments.' + documentId)
cy.screenshot()
for (const name in files) {
- cy.get(`#fileList tr[data-file="${name}"]`, { timeout: 10000 })
+ cy.get(`.files-fileList tr[data-file="${name}"]`, { timeout: 10000 })
.should('exist')
.should('have.attr', 'data-id')
.should('eq', String(files[name]))
@@ -264,7 +264,7 @@ describe('Test all image insertion methods', () => {
cy.copyFile('subFolder/test.md', 'testCopied.md')
cy.reloadFileList()
- cy.get('#fileList tr[data-file="testCopied.md"]', { timeout: 10000 })
+ cy.get('.files-fileList tr[data-file="testCopied.md"]', { timeout: 10000 })
.should('exist')
.should('have.attr', 'data-id')
.then((documentId) => {
@@ -273,7 +273,7 @@ describe('Test all image insertion methods', () => {
cy.openFolder('.attachments.' + documentId)
cy.screenshot()
for (const name in files) {
- cy.get(`#fileList tr[data-file="${name}"]`, { timeout: 10000 })
+ cy.get(`.files-fileList tr[data-file="${name}"]`, { timeout: 10000 })
.should('exist')
.should('have.attr', 'data-id')
// these are new copied attachment files
@@ -284,13 +284,13 @@ describe('Test all image insertion methods', () => {
})
it('test if attachment folder is deleted after having deleted a markdown file', () => {
- cy.get('#fileList tr[data-file="testCopied.md"]', { timeout: 10000 })
+ cy.get('.files-fileList tr[data-file="testCopied.md"]', { timeout: 10000 })
.should('exist')
.should('have.attr', 'data-id')
.then((documentId) => {
cy.deleteFile('testCopied.md')
cy.reloadFileList()
- cy.get(`#fileList tr[data-file=".attachments.${documentId}"]`, { timeout: 10000 })
+ cy.get(`.files-fileList tr[data-file=".attachments.${documentId}"]`, { timeout: 10000 })
.should('not.exist')
})
// change the current user for next tests
@@ -299,35 +299,35 @@ describe('Test all image insertion methods', () => {
it('[share] check everything behaves correctly on the share target user side', () => {
// check the file list
- cy.get('#fileList tr[data-file="test.md"]', { timeout: 10000 })
+ cy.get('.files-fileList tr[data-file="test.md"]', { timeout: 10000 })
.should('contain', 'test.md')
- cy.get('#fileList tr[data-file="github.png"]').should('not.exist')
+ cy.get('files-fileList tr[data-file="github.png"]').should('not.exist')
cy.showHiddenFiles()
// check the attachment folder is not there
- cy.get('#fileList tr[data-file="test.md"]', { timeout: 10000 })
+ cy.get('.files-fileList tr[data-file="test.md"]', { timeout: 10000 })
.should('exist')
.should('have.attr', 'data-id')
.then((documentId) => {
- cy.get(`#fileList tr[data-file=".attachments.${documentId}"]`, { timeout: 10000 })
+ cy.get(`.files-fileList tr[data-file=".attachments.${documentId}"]`, { timeout: 10000 })
.should('not.exist')
})
// move the file and check the attachment folder is still not there
cy.moveFile('test.md', 'testMoved.md')
cy.reloadFileList()
- cy.get('#fileList tr[data-file="testMoved.md"]', { timeout: 10000 })
+ cy.get('.files-fileList tr[data-file="testMoved.md"]', { timeout: 10000 })
.should('exist')
.should('have.attr', 'data-id')
.then((documentId) => {
- cy.get(`#fileList tr[data-file=".attachments.${documentId}"]`, { timeout: 10000 })
+ cy.get(`.files-fileList tr[data-file=".attachments.${documentId}"]`, { timeout: 10000 })
.should('not.exist')
})
// copy the file and check the attachment folder was copied
cy.copyFile('testMoved.md', 'testCopied.md')
cy.reloadFileList()
- cy.get('#fileList tr[data-file="testCopied.md"]', { timeout: 10000 })
+ cy.get('.files-fileList tr[data-file="testCopied.md"]', { timeout: 10000 })
.should('exist')
.should('have.attr', 'data-id')
.then((documentId) => {
@@ -335,7 +335,7 @@ describe('Test all image insertion methods', () => {
cy.openFolder('.attachments.' + documentId)
cy.screenshot()
for (const name in files) {
- cy.get(`#fileList tr[data-file="${name}"]`, { timeout: 10000 })
+ cy.get(`.files-fileList tr[data-file="${name}"]`, { timeout: 10000 })
.should('exist')
.should('have.attr', 'data-id')
// these are new copied attachment files
diff --git a/cypress/e2e/share.spec.js b/cypress/e2e/share.spec.js
index 2dfc40ab0..1f0c06687 100644
--- a/cypress/e2e/share.spec.js
+++ b/cypress/e2e/share.spec.js
@@ -37,7 +37,7 @@ describe('Open test.md in viewer', function() {
cy.uploadFile('test.md', 'text/markdown', 'test2.md')
cy.uploadFile('test.md', 'text/markdown')
cy.visit('/apps/files')
- cy.get('#fileList tr[data-file="test.md"]')
+ cy.get('.files-fileList tr[data-file="test.md"]')
.should('contain', 'test.md')
})
beforeEach(function() {
@@ -46,7 +46,7 @@ describe('Open test.md in viewer', function() {
it('Shares the file as a public read only link', function() {
cy.visit('/apps/files')
- cy.get('#fileList tr[data-file="test.md"] a.action-share')
+ cy.get('.files-fileList tr[data-file="test.md"] a.action-share')
.click({ force: true })
cy.get('#app-sidebar-vue')
.should('be.visible')
@@ -68,7 +68,7 @@ describe('Open test.md in viewer', function() {
it('Shares the file as a public link with write permissions', function() {
cy.visit('/apps/files')
- cy.get('#fileList tr[data-file="test2.md"] a.action-share')
+ cy.get('.files-fileList tr[data-file="test2.md"] a.action-share')
.click({ force: true })
cy.get('#app-sidebar-vue')
.should('be.visible')
@@ -99,7 +99,7 @@ describe('Open test.md in viewer', function() {
it('Opens the editor as guest', function() {
cy.visit('/apps/files')
- cy.get('#fileList tr[data-file="test2.md"] a.action-share')
+ cy.get('.files-fileList tr[data-file="test2.md"] a.action-share')
.click({ force: true })
cy.get('#app-sidebar-vue')
.should('be.visible')
@@ -128,7 +128,7 @@ describe('Open test.md in viewer', function() {
it('Shares a folder as a public read only link', function() {
cy.visit('/apps/files')
- cy.get('#fileList tr[data-file="folder"] a.action-share')
+ cy.get('.files-fileList tr[data-file="folder"] a.action-share')
.click({ force: true })
cy.get('#app-sidebar-vue')
.should('be.visible')
diff --git a/cypress/e2e/viewer.spec.js b/cypress/e2e/viewer.spec.js
index 747f181b6..0307d5c5d 100644
--- a/cypress/e2e/viewer.spec.js
+++ b/cypress/e2e/viewer.spec.js
@@ -35,7 +35,7 @@ describe('Open test.md in viewer', function() {
})
it('See test.md in the list', function() {
- cy.get('#fileList tr[data-file="test.md"]', { timeout: 10000 })
+ cy.get('.files-fileList tr[data-file="test.md"]', { timeout: 10000 })
.should('contain', 'test.md')
})
diff --git a/cypress/e2e/workspace.spec.js b/cypress/e2e/workspace.spec.js
index cf8a414a5..782b49062 100644
--- a/cypress/e2e/workspace.spec.js
+++ b/cypress/e2e/workspace.spec.js
@@ -42,7 +42,7 @@ describe('Workspace', function() {
})
it('adds a Readme.md', function() {
- cy.get('#fileList').should('not.contain', 'Readme.md')
+ cy.get('.files-fileList').should('not.contain', 'Readme.md')
cy.openWorkspace()
.type('Hello')
.should('contain', 'Hello')
@@ -148,7 +148,7 @@ describe('Workspace', function() {
it('takes README.md into account', function() {
cy.uploadFile('test.md', 'text/markdown', `${Cypress.currentTest.title}/README.md`)
cy.reload()
- cy.get('#fileList').should('contain', 'README.md')
+ cy.get('.files-fileList').should('contain', 'README.md')
cy.get('#rich-workspace .ProseMirror')
.should('contain', 'Hello world')
})
@@ -250,7 +250,7 @@ describe('Workspace', function() {
cy.nextcloudUpdateUser(randUser, 'password', 'language', 'de_DE')
cy.uploadFile('test.md', 'text/markdown', `${Cypress.currentTest.title}/Anleitung.md`)
cy.reload()
- cy.get('#fileList').should('contain', 'Anleitung.md')
+ cy.get('.files-fileList').should('contain', 'Anleitung.md')
cy.get('#rich-workspace .ProseMirror')
.should('contain', 'Hello world')
})
@@ -259,7 +259,7 @@ describe('Workspace', function() {
cy.nextcloudUpdateUser(randUser, 'password', 'language', 'fr')
cy.uploadFile('test.md', 'text/markdown', `${Cypress.currentTest.title}/Anleitung.md`)
cy.reload()
- cy.get('#fileList').should('contain', 'Anleitung.md')
+ cy.get('.files-fileList').should('contain', 'Anleitung.md')
cy.get('.empty-workspace').should('contain', 'Ajoutez des notes, listes ou liens')
})
})
@@ -321,9 +321,9 @@ const getSubmenuItem = (parent, item) => {
}
const openSidebar = filename => {
- cy.get(`#fileList tr[data-file="${filename}"]`)
+ cy.get(`.files-fileList tr[data-file="${filename}"]`)
.should('contain', filename)
- cy.get(`#fileList tr[data-file="${filename}"] .icon-more`).click()
- cy.get(`#fileList tr[data-file="${filename}"] .icon-details`).click()
+ cy.get(`.files-fileList tr[data-file="${filename}"] .icon-more`).click()
+ cy.get(`.files-fileList tr[data-file="${filename}"] .icon-details`).click()
cy.get('.app-sidebar-header').should('contain', filename)
}
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index 01f38be90..6d466c1fb 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -217,16 +217,16 @@ Cypress.Commands.add('openFolder', (name) => {
})
Cypress.Commands.add('openFile', (fileName, params = {}) => {
- cy.get(`#fileList tr[data-file="${fileName}"] a.name`).click(params)
+ cy.get(`.files-fileList tr[data-file="${fileName}"] a.name`).click(params)
})
Cypress.Commands.add('getFile', fileName => {
- return cy.get(`#fileList tr[data-file="${fileName}"]`)
+ return cy.get(`.files-fileList tr[data-file="${fileName}"]`)
})
Cypress.Commands.add('deleteFile', fileName => {
- cy.get(`#fileList tr[data-file="${fileName}"] a.name .action-menu`).click()
- cy.get(`#fileList tr[data-file="${fileName}"] a.name + .popovermenu .action-delete`).click()
+ cy.get(`.files-fileList tr[data-file="${fileName}"] a.name .action-menu`).click()
+ cy.get(`.files-fileList tr[data-file="${fileName}"] a.name + .popovermenu .action-delete`).click()
})
Cypress.Commands.add('getEditor', () => {