Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update cypress and associates #1696

Merged
merged 4 commits into from
Jun 28, 2023
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
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ module.exports = {
oc_defaults: true,
},
extends: [
'@nextcloud',
'@nextcloud/eslint-config/typescript',
],
}
4 changes: 2 additions & 2 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
TESTING=true npm run build --if-present

- name: Save context
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: buildjet/cache/save@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
with:
key: cypress-context-${{ github.run_id }}
path: ./
Expand All @@ -63,7 +63,7 @@ jobs:

steps:
- name: Restore context
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: buildjet/cache/restore@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
with:
fail-on-cache-miss: true
key: cypress-context-${{ github.run_id }}
Expand Down
5 changes: 2 additions & 3 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ export default defineConfig({
trashAssetsBeforeRuns: true,

e2e: {
// Enable session management and disable isolation
experimentalSessionAndOrigin: true,
testIsolation: 'off',
// Disable isolation
testIsolation: false,

// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
Expand Down
4 changes: 2 additions & 2 deletions cypress/dockerNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export const stopNextcloud = async function() {
* @param container the container to get the ip from
*/
export const getContainerIP = async function(
container: Container = docker.getContainer(CONTAINER_NAME)
container: Container = docker.getContainer(CONTAINER_NAME),
): Promise<string> {
let ip = ''
let tries = 0
Expand Down Expand Up @@ -195,7 +195,7 @@ export const waitOnNextcloud = async function(ip: string) {
const runExec = async function(
container: Docker.Container,
command: string[],
verbose = false
verbose = false,
) {
const exec = await container.exec({
Cmd: command,
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/actions/sidebar.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('Open the sidebar from the viewer and open viewer with sidebar already
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
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')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/audios/audios.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Open mp3 and ogg audio in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', 'audio.mp3')
cy.get('body > .viewer .modal-name').should('contain', 'audio.mp3')
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')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/images/images-custom-list-loadmore.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ describe('Open custom list of images in viewer with pagination', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
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')
})
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/images/images-custom-list.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('Open custom images list in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
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')
})
Expand Down Expand Up @@ -134,7 +134,7 @@ describe('Open custom images list in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', 'image3.jpg')
cy.get('body > .viewer .modal-name').should('contain', 'image3.jpg')
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')
})
Expand All @@ -160,7 +160,7 @@ describe('Open custom images list in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
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')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/images/images.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('Open images in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
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')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/mixins/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function(fileName = 'audio.ogg', mimeType = 'audio/ogg') {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', fileName)
cy.get('body > .viewer .modal-name').should('contain', fileName)
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')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/mixins/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function(fileName = 'image1.jpg', mimeType = 'image/jpeg', source
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', fileName)
cy.get('body > .viewer .modal-name').should('contain', fileName)
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')
})
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/mixins/oddname.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ export default function(file, type, sidebar = false) {
*/
function menuOk() {
cy.get('body > .viewer .icon-error').should('not.exist')
cy.get('body > .viewer .modal-title').should('contain', placedName)
cy.get('body > .viewer .modal-name').should('contain', placedName)
cy.get('body > .viewer .modal-header button.header-close').should(
'be.visible'
'be.visible',
)
}

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/mixins/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function(fileName = 'image1.jpg', mimeType = 'image/jpeg') {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', fileName)
cy.get('body > .viewer .modal-name').should('contain', fileName)
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')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/non-dav-files.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('Open non-dav files in viewer', function() {
})

it('See the title and close button on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', basename)
cy.get('body > .viewer .modal-name').should('contain', basename)
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/sharing/download-share-disabled.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe(`Download ${fileName} in viewer`, function() {
})

it('See the title on the viewer header but not the Download button', function() {
cy.get('body > .viewer .modal-title').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header a.action-item .download-icon').should('not.exist')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/sharing/download-share.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe(`Download ${fileName} from viewer in link share`, function() {
})

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

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/sharing/files-shares.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('See shared folder with link share', function() {
})

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

Expand Down Expand Up @@ -141,7 +141,7 @@ describe('See shared folder with link share', function() {
cy.get('body > .viewer .modal-container video').should('have.length', 1)
cy.get('body > .viewer button.prev').should('be.visible')
cy.get('body > .viewer button.next').should('be.visible')
cy.get('body > .viewer .modal-title').should('contain', 'video1.mp4')
cy.get('body > .viewer .modal-name').should('contain', 'video1.mp4')
})

it('Does not see a loading animation', function() {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/videos/videos.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Open mp4 videos in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', 'video1.mp4')
cy.get('body > .viewer .modal-name').should('contain', 'video1.mp4')
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')
})
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/visual-regression.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Visual regression tests ', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-title').should('contain', 'test-card.mp4')
cy.get('body > .viewer .modal-name').should('contain', 'test-card.mp4')
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')
})
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('Visual regression tests ', function() {
cy.get('body > .viewer').should('not.exist')
cy.openFile('test-card.png')
cy.get('body > .viewer').should('be.visible')
cy.get('body > .viewer .modal-title').should('contain', 'test-card.png')
cy.get('body > .viewer .modal-name').should('contain', 'test-card.png')
cy.get('body > .viewer .modal-container img').should('have.length', 1)
cy.get('body > .viewer .modal-container img').should('have.attr', 'src')
cy.get('body > .viewer button.prev').should('be.visible')
Expand Down
Binary file modified cypress/snapshots/base/visual-regression.cy.js/video.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions js/viewer-components.js

Large diffs are not rendered by default.

23 changes: 2 additions & 21 deletions js/viewer-components.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,9 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/

/*!
* focus-trap 7.1.0
* focus-trap 7.4.3
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/

/*!
* tabbable 6.0.1
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/

/*! Hammer.JS - v2.0.7 - 2016-04-22
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
* Licensed under the MIT license */
2 changes: 1 addition & 1 deletion js/viewer-components.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/viewer-filerobot.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-filerobot.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/viewer-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-main.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* MIT Licensed
*/

/*! @license DOMPurify 2.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.3/LICENSE */
/*! @license DOMPurify 3.0.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.3/LICENSE */

/*! For license information please see isFullscreen.js.LICENSE.txt */

Expand Down
2 changes: 1 addition & 1 deletion js/viewer-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/viewer-plyr.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-plyr.js.map

Large diffs are not rendered by default.

Loading