зеркало из https://github.com/nextcloud/viewer.git
Add prefix to fileList selector
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
This commit is contained in:
Родитель
243f62326b
Коммит
4c6f81ffb4
|
@ -41,7 +41,7 @@ describe('Open audio.mp3 in viewer', function() {
|
|||
})
|
||||
|
||||
it('See audio.mp3 in the list', function() {
|
||||
cy.get('.fileList tr[data-file="audio.mp3"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="audio.mp3"]', { timeout: 10000 })
|
||||
.should('contain', 'audio.mp3')
|
||||
})
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('Open audio.ogg in viewer', function() {
|
|||
})
|
||||
|
||||
it('See audio.ogg in the list', function() {
|
||||
cy.get('.fileList tr[data-file="audio.ogg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="audio.ogg"]', { timeout: 10000 })
|
||||
.should('contain', 'audio.ogg')
|
||||
})
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ describe('Open mp3 and ogg audio in viewer', function() {
|
|||
})
|
||||
|
||||
it('See audios in the list', function() {
|
||||
cy.get('.fileList tr[data-file="audio.mp3"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="audio.mp3"]', { timeout: 10000 })
|
||||
.should('contain', 'audio.mp3')
|
||||
cy.get('.fileList tr[data-file="audio.ogg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="audio.ogg"]', { timeout: 10000 })
|
||||
.should('contain', 'audio.ogg')
|
||||
})
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('Delete image.png in viewer', function() {
|
|||
})
|
||||
|
||||
it('See image.png in the list', function() {
|
||||
cy.get('.fileList tr[data-file="image.png"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image.png"]', { timeout: 10000 })
|
||||
.should('contain', 'image.png')
|
||||
})
|
||||
|
||||
|
@ -71,7 +71,7 @@ describe('Delete image.png in viewer', function() {
|
|||
|
||||
it('Does not see image.png in the list anymore', function() {
|
||||
cy.visit('/apps/files')
|
||||
cy.get('.fileList tr[data-file="image.png"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image.png"]', { timeout: 10000 })
|
||||
.should('not.exist')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -48,15 +48,15 @@ describe(`Download ${fileName} in viewer`, function() {
|
|||
})
|
||||
|
||||
it('See the default files list', function() {
|
||||
cy.get('.fileList tr').should('contain', 'welcome.txt')
|
||||
cy.get('.fileList tr').should('contain', 'Photos')
|
||||
cy.get('.files-fileList tr').should('contain', 'welcome.txt')
|
||||
cy.get('.files-fileList tr').should('contain', 'Photos')
|
||||
})
|
||||
|
||||
it('See shared files in the list', function() {
|
||||
cy.openFile('Photos')
|
||||
cy.get('.fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image1.jpg')
|
||||
cy.get('.fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image2.jpg')
|
||||
})
|
||||
|
||||
|
@ -64,7 +64,7 @@ describe(`Download ${fileName} in viewer`, function() {
|
|||
cy.createLinkShare('/Photos').then(token => {
|
||||
// Open the sidebar
|
||||
cy.visit('/apps/files')
|
||||
cy.get('.fileList tr[data-file="Photos"] .fileactions .action-share', { timeout: 10000 }).click()
|
||||
cy.get('.files-fileList tr[data-file="Photos"] .fileactions .action-share', { timeout: 10000 }).click()
|
||||
cy.get('aside.app-sidebar').should('be.visible')
|
||||
|
||||
// Open the share menu
|
||||
|
|
|
@ -47,15 +47,15 @@ describe(`Download ${fileName} from viewer in link share`, function() {
|
|||
})
|
||||
|
||||
it('See the default files list', function() {
|
||||
cy.get('.fileList tr').should('contain', 'welcome.txt')
|
||||
cy.get('.fileList tr').should('contain', 'Photos')
|
||||
cy.get('.files-fileList tr').should('contain', 'welcome.txt')
|
||||
cy.get('.files-fileList tr').should('contain', 'Photos')
|
||||
})
|
||||
|
||||
it('See shared files in the list', function() {
|
||||
cy.openFile('Photos')
|
||||
cy.get('.fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image1.jpg')
|
||||
cy.get('.fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image2.jpg')
|
||||
})
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ describe(`Download ${fileName} in viewer`, function() {
|
|||
})
|
||||
|
||||
it(`See "${fileName}" in the list`, function() {
|
||||
cy.get(`.fileList tr[data-file="${fileName}"]`, { timeout: 10000 })
|
||||
cy.get(`.files-fileList tr[data-file="${fileName}"]`, { timeout: 10000 })
|
||||
.should('contain', fileName)
|
||||
})
|
||||
|
||||
|
|
|
@ -47,21 +47,21 @@ describe('See shared folder with link share', function() {
|
|||
})
|
||||
|
||||
it('See the default files list', function() {
|
||||
cy.get('.fileList tr').should('contain', 'welcome.txt')
|
||||
cy.get('.fileList tr').should('contain', 'Photos')
|
||||
cy.get('.files-fileList tr').should('contain', 'welcome.txt')
|
||||
cy.get('.files-fileList tr').should('contain', 'Photos')
|
||||
})
|
||||
|
||||
it('See shared files in the list', function() {
|
||||
cy.openFile('Photos')
|
||||
cy.get('.fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image1.jpg')
|
||||
cy.get('.fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image2.jpg')
|
||||
cy.get('.fileList tr[data-file="image3.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image3.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image3.jpg')
|
||||
cy.get('.fileList tr[data-file="image4.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image4.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image4.jpg')
|
||||
cy.get('.fileList tr[data-file="video1.mp4"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="video1.mp4"]', { timeout: 10000 })
|
||||
.should('contain', 'video1.mp4')
|
||||
})
|
||||
|
||||
|
|
|
@ -29,7 +29,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() {
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('Open image-small.png in viewer', function() {
|
|||
})
|
||||
|
||||
it('See image-small.png in the list', function() {
|
||||
cy.get('.fileList tr[data-file="image-small.png"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image-small.png"]', { timeout: 10000 })
|
||||
.should('contain', 'image-small.png')
|
||||
})
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ describe('Open image.gif in viewer', function() {
|
|||
})
|
||||
|
||||
it('See image.gif in the list', function() {
|
||||
cy.get('.fileList tr[data-file="image.gif"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image.gif"]', { timeout: 10000 })
|
||||
.should('contain', 'image.gif')
|
||||
})
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('Open image.png in viewer', function() {
|
|||
})
|
||||
|
||||
it('See image.png in the list', function() {
|
||||
cy.get('.fileList tr[data-file="image.png"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image.png"]', { timeout: 10000 })
|
||||
.should('contain', 'image.png')
|
||||
})
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ describe('Open image.svg in viewer', function() {
|
|||
})
|
||||
|
||||
it('See image.svg in the list', function() {
|
||||
cy.get('.fileList tr[data-file="image.svg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image.svg"]', { timeout: 10000 })
|
||||
.should('contain', 'image.svg')
|
||||
})
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('Open image.webp in viewer', function() {
|
|||
})
|
||||
|
||||
it('See image.webp in the list', function() {
|
||||
cy.get('.fileList tr[data-file="image.webp"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image.webp"]', { timeout: 10000 })
|
||||
.should('contain', 'image.webp')
|
||||
})
|
||||
|
||||
|
|
|
@ -44,13 +44,13 @@ describe('Open custom list of images in viewer with pagination', function() {
|
|||
})
|
||||
|
||||
it('See images in the list', function() {
|
||||
cy.get('.fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image1.jpg')
|
||||
cy.get('.fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image2.jpg')
|
||||
cy.get('.fileList tr[data-file="image3.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image3.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image3.jpg')
|
||||
cy.get('.fileList tr[data-file="image4.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image4.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image4.jpg')
|
||||
})
|
||||
|
||||
|
|
|
@ -44,13 +44,13 @@ describe('Open custom images list in viewer', function() {
|
|||
})
|
||||
|
||||
it('See images in the list', function() {
|
||||
cy.get('.fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image1.jpg')
|
||||
cy.get('.fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image2.jpg')
|
||||
cy.get('.fileList tr[data-file="image3.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image3.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image3.jpg')
|
||||
cy.get('.fileList tr[data-file="image4.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image4.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image4.jpg')
|
||||
})
|
||||
|
||||
|
|
|
@ -44,13 +44,13 @@ describe('Open images in viewer', function() {
|
|||
})
|
||||
|
||||
it('See images in the list', function() {
|
||||
cy.get('.fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image1.jpg')
|
||||
cy.get('.fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image2.jpg')
|
||||
cy.get('.fileList tr[data-file="image3.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image3.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image3.jpg')
|
||||
cy.get('.fileList tr[data-file="image4.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image4.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image4.jpg')
|
||||
})
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ export default function(file, type) {
|
|||
}
|
||||
|
||||
it(`See ${file} as ${placedName} in the list`, function() {
|
||||
cy.get(`.fileList tr[data-file="${placedNameCss}"]`, {
|
||||
cy.get(`.files-fileList tr[data-file="${placedNameCss}"]`, {
|
||||
timeout: 10000,
|
||||
}).should('contain', placedName)
|
||||
})
|
||||
|
|
|
@ -45,13 +45,13 @@ describe('Open the sidebar from the viewer and open viewer with sidebar already
|
|||
})
|
||||
|
||||
it('See images in the list', function() {
|
||||
cy.get('.fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image1.jpg')
|
||||
cy.get('.fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image2.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image2.jpg')
|
||||
cy.get('.fileList tr[data-file="image3.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image3.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image3.jpg')
|
||||
cy.get('.fileList tr[data-file="image4.jpg"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="image4.jpg"]', { timeout: 10000 })
|
||||
.should('contain', 'image4.jpg')
|
||||
})
|
||||
|
||||
|
@ -134,7 +134,7 @@ describe('Open the sidebar from the viewer and open viewer with sidebar already
|
|||
cy.get('body > .viewer').should('not.exist')
|
||||
|
||||
// open the sidebar without viewer open
|
||||
cy.get('.fileList tr[data-file="image1.jpg"] .date .modified').click()
|
||||
cy.get('.files-fileList tr[data-file="image1.jpg"] .date .modified').click()
|
||||
|
||||
cy.openFile('image1.jpg')
|
||||
cy.get('body > .viewer', { timeout: 10000 })
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('Open video.mkv in viewer', function() {
|
|||
})
|
||||
|
||||
it('See video.mkv in the list', function() {
|
||||
cy.get('.fileList tr[data-file="video.mkv"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="video.mkv"]', { timeout: 10000 })
|
||||
.should('contain', 'video.mkv')
|
||||
})
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('Open video1.mp4 in viewer', function() {
|
|||
})
|
||||
|
||||
it('See video1.mp4 in the list', function() {
|
||||
cy.get('.fileList tr[data-file="video1.mp4"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="video1.mp4"]', { timeout: 10000 })
|
||||
.should('contain', 'video1.mp4')
|
||||
})
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('Open video.ogv in viewer', function() {
|
|||
})
|
||||
|
||||
it('See video.ogv in the list', function() {
|
||||
cy.get('.fileList tr[data-file="video.ogv"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="video.ogv"]', { timeout: 10000 })
|
||||
.should('contain', 'video.ogv')
|
||||
})
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('Open video.webm in viewer', function() {
|
|||
})
|
||||
|
||||
it('See video.webm in the list', function() {
|
||||
cy.get('.fileList tr[data-file="video.webm"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="video.webm"]', { timeout: 10000 })
|
||||
.should('contain', 'video.webm')
|
||||
})
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ describe('Open mp4 videos in viewer', function() {
|
|||
})
|
||||
|
||||
it('See videos in the list', function() {
|
||||
cy.get('.fileList tr[data-file="video1.mp4"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="video1.mp4"]', { timeout: 10000 })
|
||||
.should('contain', 'video1.mp4')
|
||||
cy.get('.fileList tr[data-file="video2.mp4"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="video2.mp4"]', { timeout: 10000 })
|
||||
.should('contain', 'video2.mp4')
|
||||
})
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ describe('Visual regression tests ', function() {
|
|||
})
|
||||
|
||||
it('See files in the list', function() {
|
||||
cy.get('.fileList tr[data-file="test-card.mp4"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="test-card.mp4"]', { timeout: 10000 })
|
||||
.should('contain', 'test-card.mp4')
|
||||
cy.get('.fileList tr[data-file="test-card.png"]', { timeout: 10000 })
|
||||
cy.get('.files-fileList tr[data-file="test-card.png"]', { timeout: 10000 })
|
||||
.should('contain', 'test-card.png')
|
||||
})
|
||||
|
||||
|
|
|
@ -111,26 +111,26 @@ Cypress.Commands.add('uploadFile', (fixtureFileName, mimeType, path = '', upload
|
|||
})
|
||||
|
||||
Cypress.Commands.add('createFolder', dirName => {
|
||||
cy.get('#controls .actions > .button.new').click()
|
||||
cy.get('#controls .actions .newFileMenu a[data-action="folder"]').click()
|
||||
cy.get('#controls .actions .newFileMenu a[data-action="folder"] input[type="text"]').type(dirName)
|
||||
cy.get('#controls .actions .newFileMenu a[data-action="folder"] input.icon-confirm').click()
|
||||
cy.get('.files-controls .actions > .button.new').click()
|
||||
cy.get('.files-controls .actions .newFileMenu a[data-action="folder"]').click()
|
||||
cy.get('.files-controls .actions .newFileMenu a[data-action="folder"] input[type="text"]').type(dirName)
|
||||
cy.get('.files-controls .actions .newFileMenu a[data-action="folder"] input.icon-confirm').click()
|
||||
cy.log('Created folder', dirName)
|
||||
})
|
||||
|
||||
Cypress.Commands.add('openFile', fileName => {
|
||||
cy.get(`.fileList tr[data-file="${CSS.escape(fileName)}"] a.name`).click()
|
||||
cy.get(`.files-fileList tr[data-file="${CSS.escape(fileName)}"] a.name`).click()
|
||||
cy.wait(250)
|
||||
})
|
||||
|
||||
Cypress.Commands.add('getFileId', fileName => {
|
||||
return cy.get(`.fileList tr[data-file="${CSS.escape(fileName)}"]`)
|
||||
return cy.get(`.files-fileList tr[data-file="${CSS.escape(fileName)}"]`)
|
||||
.should('have.attr', 'data-id')
|
||||
})
|
||||
|
||||
Cypress.Commands.add('deleteFile', fileName => {
|
||||
cy.get(`.fileList tr[data-file="${CSS.escape(fileName)}"] a.name .action-menu`).click()
|
||||
cy.get(`.fileList tr[data-file="${CSS.escape(fileName)}"] a.name + .popovermenu .action-delete`).click()
|
||||
cy.get(`.files-fileList tr[data-file="${CSS.escape(fileName)}"] a.name .action-menu`).click()
|
||||
cy.get(`.files-fileList tr[data-file="${CSS.escape(fileName)}"] a.name + .popovermenu .action-delete`).click()
|
||||
})
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче