Skip to content

Commit

Permalink
Merge pull request #1208 from nextcloud/backport/1206/stable23
Browse files Browse the repository at this point in the history
[stable23] Properly cancel and reset ongoing streams when unmounting
  • Loading branch information
szaimen authored Apr 13, 2022
2 parents 04f332f + 1f9e2f4 commit 4b562f5
Show file tree
Hide file tree
Showing 20 changed files with 229 additions and 1,238 deletions.
4 changes: 0 additions & 4 deletions cypress/integration/delete.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,4 @@ describe('Delete image.png in viewer', function() {
cy.get('#fileList tr[data-file="image.png"]', { timeout: 10000 })
.should('not.exist')
})

it('Does not have any visual regression', function() {
// cy.matchImageSnapshot()
})
})
12 changes: 0 additions & 12 deletions cypress/integration/download-share-disabled.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ describe(`Download ${fileName} in viewer`, function() {
cy.get('#fileList tr').should('contain', 'Photos')
})

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

it('See shared files in the list', function() {
cy.openFile('Photos')
cy.get('#fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
Expand All @@ -64,10 +60,6 @@ describe(`Download ${fileName} in viewer`, function() {
.should('contain', 'image2.jpg')
})

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

it('Share the Photos folder with a share link and access the share link', function() {
cy.createLinkShare('/Photos').then(token => {
// Open the sidebar
Expand All @@ -86,10 +78,6 @@ describe(`Download ${fileName} in viewer`, function() {
})
})

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

it('Open the viewer on file click', function() {
cy.openFile('image1.jpg')
cy.get('body > .viewer').should('be.visible')
Expand Down
12 changes: 0 additions & 12 deletions cypress/integration/download-share.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ describe(`Download ${fileName} from viewer in link share`, function() {
cy.get('#fileList tr').should('contain', 'Photos')
})

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

it('See shared files in the list', function() {
cy.openFile('Photos')
cy.get('#fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
Expand All @@ -63,21 +59,13 @@ describe(`Download ${fileName} from viewer in link share`, function() {
.should('contain', 'image2.jpg')
})

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

it('Share the Photos folder with a share link and access the share link', function() {
cy.createLinkShare('/Photos').then(token => {
cy.logout()
cy.visit(`/s/${token}`)
})
})

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

it('Open the viewer on file click', function() {
cy.openFile('image1.jpg')
cy.get('body > .viewer').should('be.visible')
Expand Down
36 changes: 0 additions & 36 deletions cypress/integration/files-shares.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ describe('See shared folder with link share', function() {
cy.get('#fileList tr').should('contain', 'Photos')
})

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

it('See shared files in the list', function() {
cy.openFile('Photos')
cy.get('#fileList tr[data-file="image1.jpg"]', { timeout: 10000 })
Expand All @@ -69,21 +65,13 @@ describe('See shared folder with link share', function() {
.should('contain', 'video1.mp4')
})

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

it('Share the Photos folder with a share link and access the share link', function() {
cy.createLinkShare('/Photos').then(token => {
cy.logout()
cy.visit(`/s/${token}`)
})
})

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

it('Open the viewer on file click', function() {
cy.openFile('image1.jpg')
cy.get('body > .viewer').should('be.visible')
Expand All @@ -108,10 +96,6 @@ describe('See shared folder with link share', function() {
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('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 3)
Expand All @@ -126,10 +110,6 @@ describe('See shared folder with link share', function() {
.and('not.have.class', 'icon-loading')
})

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

it('Show image3 on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 3)
Expand All @@ -144,10 +124,6 @@ describe('See shared folder with link share', function() {
.and('not.have.class', 'icon-loading')
})

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

it('Show image4 on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 2)
Expand All @@ -162,10 +138,6 @@ describe('See shared folder with link share', function() {
.and('not.have.class', 'icon-loading')
})

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

it('Show video1 on next', function() {
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
Expand All @@ -183,10 +155,6 @@ describe('See shared folder with link share', function() {
.and('not.have.class', 'icon-loading')
})

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

it('Show image1 again on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 2)
Expand All @@ -200,8 +168,4 @@ describe('See shared folder with link share', function() {
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
})

it('Does not have any visual regression 9', function() {
// cy.matchImageSnapshot()
})
})
4 changes: 0 additions & 4 deletions cypress/integration/image-small.png.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,4 @@ describe('Open image-small.png in viewer', function() {
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() {
// cy.matchImageSnapshot()
})
})
4 changes: 0 additions & 4 deletions cypress/integration/image.png.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,4 @@ describe('Open image.png in viewer', function() {
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() {
// cy.matchImageSnapshot()
})
})
4 changes: 0 additions & 4 deletions cypress/integration/image.svg.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,4 @@ describe('Open image.svg in viewer', function() {
.should('have.attr', 'src')
.should('contain', 'data:image/svg+xml;base64')
})

it('Does not have any visual regression', function() {
// cy.matchImageSnapshot()
})
})
4 changes: 0 additions & 4 deletions cypress/integration/image.webp.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,4 @@ describe('Open image.webp in viewer', function() {
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() {
cy.matchImageSnapshot()
})
})
20 changes: 0 additions & 20 deletions cypress/integration/images-custom-list-loadmore.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ describe('Open custom list of images in viewer with pagination', function() {
cy.get('body > .viewer a.next').should('be.visible')
})

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

it('Show image2 on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 2)
Expand All @@ -164,10 +160,6 @@ describe('Open custom list of images in viewer with pagination', function() {
.and('not.have.class', 'icon-loading')
})

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

it('Show image3 on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 3)
Expand All @@ -182,10 +174,6 @@ describe('Open custom list of images in viewer with pagination', function() {
.and('not.have.class', 'icon-loading')
})

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

it('Show image4 on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 2)
Expand All @@ -200,10 +188,6 @@ describe('Open custom list of images in viewer with pagination', function() {
.and('not.have.class', 'icon-loading')
})

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

it('Show image1 again on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 2)
Expand All @@ -217,8 +201,4 @@ describe('Open custom list of images in viewer with pagination', function() {
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
})

it('Does not have any visual regression 5', function() {
// cy.matchImageSnapshot()
})
})
12 changes: 0 additions & 12 deletions cypress/integration/images-custom-list.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ describe('Open custom images list in viewer', function() {
cy.get('body > .viewer a.next').should('be.visible')
})

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

it('Show image3 on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 2)
Expand All @@ -135,10 +131,6 @@ describe('Open custom images list in viewer', function() {
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})

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

it('Show image1 on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 2)
Expand All @@ -158,8 +150,4 @@ describe('Open custom images list in viewer', function() {
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})

it('Does not have any visual regression 3', function() {
// cy.matchImageSnapshot()
})
})
20 changes: 0 additions & 20 deletions cypress/integration/images.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ describe('Open images in viewer', function() {
cy.get('body > .viewer a.next').should('be.visible')
})

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

it('Show image2 on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 3)
Expand All @@ -98,10 +94,6 @@ describe('Open images in viewer', function() {
.and('not.have.class', 'icon-loading')
})

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

it('Show image3 on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 3)
Expand All @@ -116,10 +108,6 @@ describe('Open images in viewer', function() {
.and('not.have.class', 'icon-loading')
})

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

it('Show image4 on next', function() {
cy.get('body > .viewer a.next').click()
// only 2 because we don't know if we're at the end of the slideshow, current img and previous one
Expand All @@ -135,10 +123,6 @@ describe('Open images in viewer', function() {
.and('not.have.class', 'icon-loading')
})

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

it('Show image1 again on next', function() {
cy.get('body > .viewer a.next').click()
cy.get('body > .viewer .modal-container img').should('have.length', 2)
Expand All @@ -152,8 +136,4 @@ describe('Open images in viewer', function() {
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
})

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

0 comments on commit 4b562f5

Please sign in to comment.