Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions cypress/integration/audio.mpeg.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,25 @@ describe('Open audio.mp3 in viewer', function() {

it('Open the viewer on file click', function() {
cy.openFile('audio.mp3')
cy.get('#viewer-content').should('be.visible')
cy.get('body > .viewer').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
})

it('See the menu icon and title on the viewer header', function() {
cy.get('#viewer-content .modal-title').should('contain', 'audio.mp3')
cy.get('#viewer-content .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('#viewer-content .modal-header button.icon-close').should('be.visible')
cy.get('body > .viewer .modal-title').should('contain', 'audio.mp3')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.icon-close').should('be.visible')
})

it('Does not see navigation arrows', function() {
cy.get('#viewer-content a.prev').should('not.be.visible')
cy.get('#viewer-content a.next').should('not.be.visible')
cy.get('body > .viewer a.prev').should('not.be.visible')
cy.get('body > .viewer a.next').should('not.be.visible')
})

it('Take screenshot', function() {
Expand Down
14 changes: 7 additions & 7 deletions cypress/integration/audio.ogg.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,25 @@ describe('Open audio.ogg in viewer', function() {

it('Open the viewer on file click', function() {
cy.openFile('audio.ogg')
cy.get('#viewer-content').should('be.visible')
cy.get('body > .viewer').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
})

it('See the menu icon and title on the viewer header', function() {
cy.get('#viewer-content .modal-title').should('contain', 'audio.ogg')
cy.get('#viewer-content .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('#viewer-content .modal-header button.icon-close').should('be.visible')
cy.get('body > .viewer .modal-title').should('contain', 'audio.ogg')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.icon-close').should('be.visible')
})

it('Does not see navigation arrows', function() {
cy.get('#viewer-content a.prev').should('not.be.visible')
cy.get('#viewer-content a.next').should('not.be.visible')
cy.get('body > .viewer a.prev').should('not.be.visible')
cy.get('body > .viewer a.next').should('not.be.visible')
})

it('Take screenshot', function() {
Expand Down
30 changes: 15 additions & 15 deletions cypress/integration/audios.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,26 @@ describe('Open mp3 and ogg audio in viewer', function() {

it('Open the viewer on file click', function() {
cy.openFile('audio.mp3')
cy.get('#viewer-content').should('be.visible')
cy.get('body > .viewer').should('be.visible')
})

it('See the menu icon and title on the viewer header', function() {
cy.get('#viewer-content .modal-title').should('contain', 'audio.mp3')
cy.get('#viewer-content .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('#viewer-content .modal-header button.icon-close').should('be.visible')
cy.get('body > .viewer .modal-title').should('contain', 'audio.mp3')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.icon-close').should('be.visible')
})

it('Does see next navigation arrows', function() {
cy.get('#viewer-content .modal-container audio').should('have.length', 2)
cy.get('#viewer-content .modal-container .file-view.active audio')
cy.get('body > .viewer .modal-container audio').should('have.length', 2)
cy.get('body > .viewer .modal-container .viewer__file.viewer__file--active audio')
.should('have.attr', 'src')
.and('contain', `/remote.php/dav/files/${randUser}/audio.mp3`)
cy.get('#viewer-content a.next').should('be.visible')
cy.get('#viewer-content a.next').should('be.visible')
cy.get('body > .viewer a.next').should('be.visible')
cy.get('body > .viewer a.next').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
Expand All @@ -80,17 +80,17 @@ describe('Open mp3 and ogg audio in viewer', function() {
})

it('Show audio.ogg on next', function() {
cy.get('#viewer-content a.next').click()
cy.get('#viewer-content .modal-container audio').should('have.length', 2)
cy.get('#viewer-content .modal-container .file-view.active audio')
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container audio').should('have.length', 2)
cy.get('body > .viewer .modal-container .viewer__file.viewer__file--active audio')
.should('have.attr', 'src')
.and('contain', `/remote.php/dav/files/${randUser}/audio.ogg`)
cy.get('#viewer-content a.prev').should('be.visible')
cy.get('#viewer-content a.next').should('be.visible')
cy.get('body > .viewer a.prev').should('be.visible')
cy.get('body > .viewer a.next').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
Expand Down
8 changes: 4 additions & 4 deletions cypress/integration/delete.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,25 @@ describe('Open image.png in viewer', function() {

it('Open the viewer on file click', function() {
cy.openFile('image.png')
cy.get('#viewer-content').should('be.visible')
cy.get('body > .viewer').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
})

it('Delete the image and close viewer', function() {
// open the menu
cy.get('#viewer-content .modal-header button.action-item__menutoggle').click()
cy.get('body > .viewer .modal-header button.action-item__menutoggle').click()
// delete the file
cy.get('.action-button__icon.icon-delete').click()
})

it('Does not see the viewer anymore', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('not.be.visible')
})

Expand Down
72 changes: 36 additions & 36 deletions cypress/integration/files-shares.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,42 +86,42 @@ describe('See shared folder with link share', function() {

it('Open the viewer on file click', function() {
cy.openFile('image1.jpg')
cy.get('#viewer-content').should('be.visible')
cy.get('body > .viewer').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
})

it('See the menu icon and title on the viewer header', function() {
cy.get('#viewer-content .modal-title').should('contain', 'image1.jpg')
cy.get('#viewer-content .modal-header button.action-item__menutoggle').should('not.be.visible')
cy.get('#viewer-content .modal-header button.icon-close').should('be.visible')
cy.get('body > .viewer .modal-title').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('not.be.visible')
cy.get('body > .viewer .modal-header button.icon-close').should('be.visible')
})

it('Does see next navigation arrows', function() {
cy.get('#viewer-content .modal-container img').should('have.length', 2)
cy.get('#viewer-content .modal-container img').should('have.attr', 'src')
cy.get('#viewer-content a.next').should('be.visible')
cy.get('#viewer-content a.next').should('be.visible')
cy.get('body > .viewer .modal-container img').should('have.length', 2)
cy.get('body > .viewer .modal-container img').should('have.attr', 'src')
cy.get('body > .viewer a.next').should('be.visible')
cy.get('body > .viewer a.next').should('be.visible')
})

it('Does not have any visual regression 4', function() {
cy.matchImageSnapshot()
})

it('Show image2 on next', function() {
cy.get('#viewer-content a.next').click()
cy.get('#viewer-content .modal-container img').should('have.length', 3)
cy.get('#viewer-content a.prev').should('be.visible')
cy.get('#viewer-content a.next').should('be.visible')
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 3)
cy.get('body > .viewer a.prev').should('be.visible')
cy.get('body > .viewer a.next').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
Expand All @@ -132,14 +132,14 @@ describe('See shared folder with link share', function() {
})

it('Show image3 on next', function() {
cy.get('#viewer-content a.next').click()
cy.get('#viewer-content .modal-container img').should('have.length', 3)
cy.get('#viewer-content a.prev').should('be.visible')
cy.get('#viewer-content a.next').should('be.visible')
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 3)
cy.get('body > .viewer a.prev').should('be.visible')
cy.get('body > .viewer a.next').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
Expand All @@ -150,14 +150,14 @@ describe('See shared folder with link share', function() {
})

it('Show image4 on next', function() {
cy.get('#viewer-content a.next').click()
cy.get('#viewer-content .modal-container img').should('have.length', 2)
cy.get('#viewer-content a.prev').should('be.visible')
cy.get('#viewer-content a.next').should('be.visible')
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 2)
cy.get('body > .viewer a.prev').should('be.visible')
cy.get('body > .viewer a.next').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
Expand All @@ -168,17 +168,17 @@ describe('See shared folder with link share', function() {
})

it('Show video1 on next', function() {
cy.get('#viewer-content a.next').click()
cy.get('body > .viewer a.next').click()
// only 2 because we don't know if we're at the end of the slideshow, current vid and prev img
cy.get('#viewer-content .modal-container img').should('have.length', 1)
cy.get('#viewer-content .modal-container video').should('have.length', 1)
cy.get('#viewer-content a.prev').should('be.visible')
cy.get('#viewer-content a.next').should('be.visible')
cy.get('#viewer-content .modal-title').should('contain', 'video1.mp4')
cy.get('body > .viewer .modal-container img').should('have.length', 1)
cy.get('body > .viewer .modal-container video').should('have.length', 1)
cy.get('body > .viewer a.prev').should('be.visible')
cy.get('body > .viewer a.next').should('be.visible')
cy.get('body > .viewer .modal-title').should('contain', 'video1.mp4')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
Expand All @@ -189,14 +189,14 @@ describe('See shared folder with link share', function() {
})

it('Show image1 again on next', function() {
cy.get('#viewer-content a.next').click()
cy.get('#viewer-content .modal-container img').should('have.length', 2)
cy.get('#viewer-content a.prev').should('be.visible')
cy.get('#viewer-content a.next').should('be.visible')
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 2)
cy.get('body > .viewer a.prev').should('be.visible')
cy.get('body > .viewer a.next').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
Expand Down
14 changes: 7 additions & 7 deletions cypress/integration/image-small.png.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,25 @@ describe('Open image-small.png in viewer', function() {

it('Open the viewer on file click', function() {
cy.openFile('image-small.png')
cy.get('#viewer-content').should('be.visible')
cy.get('body > .viewer').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
})

it('See the menu icon and title on the viewer header', function() {
cy.get('#viewer-content .modal-title').should('contain', 'image-small.png')
cy.get('#viewer-content .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('#viewer-content .modal-header button.icon-close').should('be.visible')
cy.get('body > .viewer .modal-title').should('contain', 'image-small.png')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.icon-close').should('be.visible')
})

it('Does not see navigation arrows', function() {
cy.get('#viewer-content a.prev').should('not.be.visible')
cy.get('#viewer-content a.next').should('not.be.visible')
cy.get('body > .viewer a.prev').should('not.be.visible')
cy.get('body > .viewer a.next').should('not.be.visible')
})

it('Does not have any visual regression', function() {
Expand Down
14 changes: 7 additions & 7 deletions cypress/integration/image.gif.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,25 @@ describe('Open image.gif in viewer', function() {

it('Open the viewer on file click', function() {
cy.openFile('image.gif')
cy.get('#viewer-content').should('be.visible')
cy.get('body > .viewer').should('be.visible')
})

it('Does not see a loading animation', function() {
cy.get('#viewer-content', { timeout: 10000 })
cy.get('body > .viewer', { timeout: 10000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
})

it('See the menu icon and title on the viewer header', function() {
cy.get('#viewer-content .modal-title').should('contain', 'image.gif')
cy.get('#viewer-content .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('#viewer-content .modal-header button.icon-close').should('be.visible')
cy.get('body > .viewer .modal-title').should('contain', 'image.gif')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.icon-close').should('be.visible')
})

it('Does not see navigation arrows', function() {
cy.get('#viewer-content a.prev').should('not.be.visible')
cy.get('#viewer-content a.next').should('not.be.visible')
cy.get('body > .viewer a.prev').should('not.be.visible')
cy.get('body > .viewer a.next').should('not.be.visible')
})

it('Take screenshot', function() {
Expand Down
Loading