From 7af4a024734e35bb93479b2651bf19f8294e9db4 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Tue, 22 Apr 2025 14:29:42 +0200 Subject: [PATCH 01/14] chore: Update workflows Signed-off-by: Louis Chemineau --- .github/workflows/cypress.yml | 10 +++++----- .github/workflows/lint-php-cs.yml | 2 +- .github/workflows/lint-php.yml | 2 +- .github/workflows/node-test.yml | 2 +- .github/workflows/npm-audit-fix.yml | 4 ++-- .github/workflows/phpunit-mariadb.yml | 2 +- .github/workflows/phpunit-mysql.yml | 2 +- .github/workflows/phpunit-oci.yml | 2 +- .github/workflows/phpunit-pgsql.yml | 2 +- .github/workflows/phpunit-sqlite.yml | 2 +- .github/workflows/psalm.yml | 2 +- .github/workflows/update-nextcloud-ocp.yml | 4 ++-- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 1bdd63c53..4fda6cd47 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -30,7 +30,7 @@ permissions: jobs: init: - runs-on: ubuntu-latest-low + runs-on: ubuntu-latest outputs: nodeVersion: ${{ steps.versions.outputs.nodeVersion }} npmVersion: ${{ steps.versions.outputs.npmVersion }} @@ -95,7 +95,7 @@ jobs: matrix: # Run multiple copies of the current job in parallel # Please increase the number or runners as your tests suite grows - containers: ['1', '2', '3'] + containers: ['2', '3'] name: runner ${{ matrix.containers }} @@ -116,7 +116,7 @@ jobs: run: npm i -g 'npm@${{ needs.init.outputs.npmVersion }}' - name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests - uses: cypress-io/github-action@57b70560982e6a11d23d4b8bec7f8a487cdbb71b # v6.7.8 + uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16 with: record: ${{ secrets.CYPRESS_RECORD_KEY && true }} parallel: ${{ secrets.CYPRESS_RECORD_KEY && true }} @@ -139,7 +139,7 @@ jobs: CYPRESS_GROUP: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} - name: Upload snapshots - uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 if: always() with: name: snapshots_${{ matrix.containers }} @@ -150,7 +150,7 @@ jobs: run: docker logs nextcloud-cypress-tests-${{ env.APP_NAME }} > nextcloud.log - name: Upload NC logs - uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 if: failure() && matrix.containers != 'component' with: name: nc_logs_${{ matrix.containers }} diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index 519b345ea..a1a246fd8 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -34,7 +34,7 @@ jobs: uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 - name: Set up php${{ steps.versions.outputs.php-min }} - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 with: php-version: ${{ steps.versions.outputs.php-min }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index adaa50b8a..94de4b5fc 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -48,7 +48,7 @@ jobs: persist-credentials: false - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 with: php-version: ${{ matrix.php-versions }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index b0678c2c2..9fda53347 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -93,7 +93,7 @@ jobs: run: npm run test:coverage --if-present - name: Collect coverage - uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2 + uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 with: files: ./coverage/lcov.info diff --git a/.github/workflows/npm-audit-fix.yml b/.github/workflows/npm-audit-fix.yml index 7a01d93d5..7d4aee85d 100644 --- a/.github/workflows/npm-audit-fix.yml +++ b/.github/workflows/npm-audit-fix.yml @@ -54,7 +54,7 @@ jobs: - name: Fix npm audit id: npm-audit - uses: nextcloud-libraries/npm-audit-action@2a60bd2e79cc77f2cc4d9a3fe40f1a69896f3a87 # v0.1.0 + uses: nextcloud-libraries/npm-audit-action@1b1728b2b4a7a78d69de65608efcf4db0e3e42d0 # v0.2.0 - name: Run npm ci and npm run build if: steps.checkout.outcome == 'success' @@ -66,7 +66,7 @@ jobs: - name: Create Pull Request if: steps.checkout.outcome == 'success' - uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: token: ${{ secrets.COMMAND_BOT_PAT }} commit-message: 'fix(deps): Fix npm audit' diff --git a/.github/workflows/phpunit-mariadb.yml b/.github/workflows/phpunit-mariadb.yml index 3edb02682..442ca2e8a 100644 --- a/.github/workflows/phpunit-mariadb.yml +++ b/.github/workflows/phpunit-mariadb.yml @@ -105,7 +105,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index 9c898a613..326d1783d 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -103,7 +103,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index 1d9ae9235..4ffadfd6e 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -116,7 +116,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index 284efa294..ef8e6c264 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -106,7 +106,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index bdbc39bef..129873300 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -95,7 +95,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 452186eea..facd92b13 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -36,7 +36,7 @@ jobs: run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml - name: Set up php${{ steps.versions.outputs.php-available }} - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 with: php-version: ${{ steps.versions.outputs.php-available }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index 708c3bbe5..15701b642 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -38,7 +38,7 @@ jobs: - name: Set up php8.2 if: steps.checkout.outcome == 'success' - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0 with: php-version: 8.2 # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -107,7 +107,7 @@ jobs: - name: Create Pull Request if: steps.checkout.outcome == 'success' - uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: token: ${{ secrets.COMMAND_BOT_PAT }} commit-message: 'chore(dev-deps): Bump nextcloud/ocp package' From 65713c8be0ec959f0510f8a748c75a6f745bc6ac Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Wed, 5 Mar 2025 17:25:16 +0100 Subject: [PATCH 02/14] chore(test): Modernize Cypress config Signed-off-by: Louis Chemineau --- cypress.config.ts | 38 +-- cypress/docker-compose.yml | 18 -- cypress/dockerNode.ts | 208 -------------- cypress/tsconfig.json | 9 +- package-lock.json | 542 ++++++++++++++++++++++++++++++++----- package.json | 6 +- tsconfig.json | 16 +- 7 files changed, 515 insertions(+), 322 deletions(-) delete mode 100644 cypress/docker-compose.yml delete mode 100644 cypress/dockerNode.ts diff --git a/cypress.config.ts b/cypress.config.ts index 205b06965..8269debbf 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -1,9 +1,4 @@ -import { - configureNextcloud, - startNextcloud, - stopNextcloud, - waitOnNextcloud, -} from './cypress/dockerNode' +import { configureNextcloud, startNextcloud, stopNextcloud, waitOnNextcloud } from '@nextcloud/cypress/docker' // eslint-disable-next-line n/no-extraneous-import import { defineConfig } from 'cypress' @@ -48,8 +43,18 @@ export default defineConfig({ // Fix browserslist extend https://github.com/cypress-io/cypress/issues/2983#issuecomment-570616682 on('file:preprocessor', vitePreprocessor({ configFile: false })) - // Enable the snapshot compare plugin - configureVisualRegression(on) + // This allows to store global data (e.g. the name of a snapshot) + // because Cypress.env() and other options are local to the current spec file. + const data = {} + on('task', { + setVariable({ key, value }) { + data[key] = value + return null + }, + getVariable({ key }) { + return data[key] ?? null + }, + }) // Disable spell checking to prevent rendering differences on('before:browser:launch', (browser, launchOptions) => { @@ -76,17 +81,12 @@ export default defineConfig({ // Before the browser launches // starting Nextcloud testing container - return startNextcloud(process.env.BRANCH) - .then((ip) => { - // Setting container's IP as base Url - config.baseUrl = `http://${ip}/index.php` - return ip - }) - .then(waitOnNextcloud) - .then(() => configureNextcloud(process.env.BRANCH)) - .then(() => { - return config - }) + const ip = await startNextcloud(process.env.BRANCH || 'master') + // Setting container's IP as base Url + config.baseUrl = `http://${ip}/index.php` + await waitOnNextcloud(ip) + await configureNextcloud(['viewer']) + return config }, }, diff --git a/cypress/docker-compose.yml b/cypress/docker-compose.yml deleted file mode 100644 index 73ae49038..000000000 --- a/cypress/docker-compose.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: '3.7' - -services: - nextcloud: - image: ghcr.io/nextcloud/continuous-integration-shallow-server - - ports: - - 8082:80 - - environment: - CYPRESS_baseUrl: "http://127.0.0.1:8082/index.php" - BRANCH: "${BRANCH:-master}" - - volumes: - # Using fallback to make sure this script doesn't mess - # with the mounting if APP_NAME is not provided. - - ../:/var/www/html/apps/${APP_NAME:-activity} - - ./initserver.sh:/initserver.sh diff --git a/cypress/dockerNode.ts b/cypress/dockerNode.ts deleted file mode 100644 index b65a93043..000000000 --- a/cypress/dockerNode.ts +++ /dev/null @@ -1,208 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ -/* eslint-disable no-console */ -/* eslint-disable n/no-unpublished-import */ -/* eslint-disable n/no-extraneous-import */ - -import Docker from 'dockerode' -import path from 'path' -import waitOn from 'wait-on' - -import { fileURLToPath } from 'url'; -const __dirname = fileURLToPath(new URL('.', import.meta.url)); - -export const docker = new Docker() - -const APP_PATH = path.resolve(__dirname, '../') -const APP_NAME = 'activity' - -const CONTAINER_NAME = 'nextcloud-cypress-tests-' + APP_NAME -const SERVER_IMAGE = 'ghcr.io/nextcloud/continuous-integration-shallow-server' - -/** - * Start the testing container - */ -export const startNextcloud = async function(branch: string = 'master'): Promise { - - try { - // Pulling images - console.log('\nPulling images... ⏳') - await new Promise((resolve, reject): any => docker.pull(SERVER_IMAGE, (err, stream) => { - if (err) { - reject(err) - } - // https://github.com/apocas/dockerode/issues/357 - docker.modem.followProgress(stream, onFinished) - - /** - * - * @param err - */ - function onFinished(err) { - if (!err) { - resolve(true) - return - } - reject(err) - } - })) - console.log('└─ Done') - - // Remove old container if exists - console.log('\nChecking running containers... πŸ”') - try { - const oldContainer = docker.getContainer(CONTAINER_NAME) - const oldContainerData = await oldContainer.inspect() - if (oldContainerData) { - console.log('β”œβ”€ Existing running container found') - console.log('β”œβ”€ Removing... ⏳') - // Forcing any remnants to be removed just in case - await oldContainer.remove({ force: true }) - console.log('└─ Done') - } - } catch (error) { - console.log('└─ None found!') - } - - // Starting container - console.log('\nStarting Nextcloud container... πŸš€') - console.log(`β”œβ”€ Using branch '${branch}'`) - console.log(`β”œβ”€ And binding app '${APP_NAME}' from '${APP_PATH}'`) - const container = await docker.createContainer({ - Image: SERVER_IMAGE, - name: CONTAINER_NAME, - HostConfig: { - Binds: [ - // TODO: improve local app directory detection - `${APP_PATH}/:/var/www/html/apps/${APP_NAME}:ro`, - ], - }, - Env: [ - `BRANCH=${branch}`, - ], - }) - await container.start() - - // Get container's IP - const ip = await getContainerIP(container) - - console.log(`β”œβ”€ Nextcloud container's IP is ${ip} 🌏`) - return ip - } catch (err) { - console.log('└─ Unable to start the container πŸ›‘') - console.log(err) - stopNextcloud() - throw new Error('Unable to start the container') - } -} - -/** - * Configure Nextcloud - */ -export const configureNextcloud = async function(branch: string = 'master') { - console.log('\nConfiguring nextcloud...') - const container = docker.getContainer(CONTAINER_NAME) - await runExec(container, ['php', 'occ', '--version'], true) - - // Clone the viewer app - await runExec(container, ['git', 'clone', '--depth', '1', '--branch', branch, 'https://github.com/nextcloud/viewer.git', '/var/www/html/apps/viewer'], true) - - // Be consistent for screenshots - await runExec(container, ['php', 'occ', 'config:system:set', 'default_language', '--value', 'en'], true) - await runExec(container, ['php', 'occ', 'config:system:set', 'force_language', '--value', 'en'], true) - await runExec(container, ['php', 'occ', 'config:system:set', 'default_locale', '--value', 'en_US'], true) - await runExec(container, ['php', 'occ', 'config:system:set', 'force_locale', '--value', 'en_US'], true) - await runExec(container, ['php', 'occ', 'config:system:set', 'enforce_theme', '--value', 'light'], true) - - console.log('└─ Nextcloud is now ready to use πŸŽ‰') -} - -/** - * Force stop the testing container - */ -export const stopNextcloud = async function() { - try { - const container = docker.getContainer(CONTAINER_NAME) - console.log('Stopping Nextcloud container...') - container.remove({ force: true }) - console.log('└─ Nextcloud container removed πŸ₯€') - } catch (err) { - console.log(err) - } -} - -/** - * Get the testing container's IP - */ -export const getContainerIP = async function( - container: Docker.Container = docker.getContainer(CONTAINER_NAME) -): Promise { - let ip = '' - let tries = 0 - while (ip === '' && tries < 10) { - tries++ - - await container.inspect(function(err, data) { - if (err) { - throw err - } - ip = data?.NetworkSettings?.IPAddress || '' - }) - - if (ip !== '') { - break - } - - await sleep(1000 * tries) - } - - return ip -} - -// Would be simpler to start the container from cypress.config.ts, -// but when checking out different branches, it can take a few seconds -// Until we can properly configure the baseUrl retry intervals, -// We need to make sure the server is already running before cypress -// https://github.com/cypress-io/cypress/issues/22676 -export const waitOnNextcloud = async function(ip: string) { - console.log('β”œβ”€ Waiting for Nextcloud to be ready... ⏳') - await waitOn({ resources: [`http://${ip}/index.php`] }) - console.log('└─ Done') -} - -const runExec = async function( - container: Docker.Container, - command: string[], - verbose = false, - user = 'www-data' -) { - const exec = await container.exec({ - Cmd: command, - AttachStdout: true, - AttachStderr: true, - User: user, - }) - - return new Promise((resolve, reject) => { - exec.start({}, (err, stream) => { - if (err) { - reject(err) - } - if (stream) { - stream.setEncoding('utf-8') - stream.on('data', str => { - if (verbose && str.trim() !== '') { - console.log(`β”œβ”€ ${str.trim().replace(/\n/gi, '\nβ”œβ”€ ')}`) - } - }) - stream.on('end', resolve) - } - }) - }) -} - -const sleep = function(milliseconds: number) { - return new Promise((resolve) => setTimeout(resolve, milliseconds)) -} diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json index ad5fa26b9..beee02da8 100644 --- a/cypress/tsconfig.json +++ b/cypress/tsconfig.json @@ -1,13 +1,16 @@ { "extends": "../tsconfig.json", - "include": ["./**/*.ts"], + "include": [ + "../*.ts", + "." + ], "compilerOptions": { + "rootDir": "..", "types": [ - "@testing-library/cypress", "cypress", "dockerode", "node", "@testing-library/cypress" ] } -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 20e16e121..47bc9327f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,15 +35,15 @@ "@nextcloud/vite-config": "^1.2.3", "@testing-library/cypress": "^10.0.3", "@testing-library/vue": "^5.9.0", - "@types/dockerode": "^3.3.29", + "@types/dockerode": "^3.3.34", "@vitest/coverage-v8": "^2.0.2", "@vue/test-utils": "^1.3.6", "@vue/tsconfig": "^0.5.1", "cypress": "^13.13.0", "cypress-visual-regression": "^5.0.0", - "cypress-vite": "^1.5.0", + "cypress-vite": "^1.6.0", "cypress-wait-until": "^3.0.1", - "dockerode": "^4.0.2", + "dockerode": "^4.0.4", "eslint-plugin-cypress": "^3.2.0", "happy-dom": "^14.12.3", "typescript": "^5.4.5", @@ -1194,6 +1194,37 @@ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz", "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" }, + "node_modules/@grpc/grpc-js": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.13.3.tgz", + "integrity": "sha512-FTXHdOoPbZrBjlVLHuKbDZnsTxXv2BlHF57xw6LuThXacXvtkahEPED0CKMk6obZDf65Hv4k3z62eyPNpvinIg==", + "dev": true, + "dependencies": { + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" + }, + "engines": { + "node": ">=12.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.15.tgz", + "integrity": "sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ==", + "dev": true, + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", @@ -1410,6 +1441,16 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/@linusborg/vue-simple-portal": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/@linusborg/vue-simple-portal/-/vue-simple-portal-0.1.5.tgz", @@ -2418,6 +2459,70 @@ "node": ">=14" } }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "dev": true + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "dev": true + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "dev": true + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "dev": true + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dev": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "dev": true + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "dev": true + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "dev": true + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "dev": true + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "dev": true + }, "node_modules/@rollup/plugin-inject": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz", @@ -3060,9 +3165,9 @@ } }, "node_modules/@types/dockerode": { - "version": "3.3.29", - "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.29.tgz", - "integrity": "sha512-5PRRq/yt5OT/Jf77ltIdz4EiR9+VLnPF+HpU4xGFwUqmV24Co2HKBNW3w+slqZ1CYchbcDeqJASHDYWzZCcMiQ==", + "version": "3.3.38", + "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.38.tgz", + "integrity": "sha512-nnrcfUe2iR+RyOuz0B4bZgQwD9djQa9ADEjp7OAgBs10pYT0KSCtplJjcmBDJz0qaReX5T7GbE5i4VplvzUHvA==", "dev": true, "dependencies": { "@types/docker-modem": "*", @@ -5329,6 +5434,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", @@ -5571,15 +5690,15 @@ } }, "node_modules/cpu-features": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz", - "integrity": "sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==", + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.10.tgz", + "integrity": "sha512-9IkYqtX3YHPCzoVg1Py+o9057a3i0fp7S530UWokCSaFVTc7CwXPRiOjRjBQQ18ZCNafx78YfnG+HALxtVmOGA==", "dev": true, "hasInstallScript": true, "optional": true, "dependencies": { "buildcheck": "~0.0.6", - "nan": "^2.17.0" + "nan": "^2.19.0" }, "engines": { "node": ">=10.0.0" @@ -5808,16 +5927,16 @@ } }, "node_modules/cypress-vite": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cypress-vite/-/cypress-vite-1.5.0.tgz", - "integrity": "sha512-vvTMqJZgI3sN2ylQTi4OQh8LRRjSrfrIdkQD5fOj+EC/e9oHkxS96lif1SyDF1PwailG1tnpJE+VpN6+AwO/rg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/cypress-vite/-/cypress-vite-1.6.0.tgz", + "integrity": "sha512-6oZPDvHgLEZjuFgoejtRuyph369zbVn7fjh4hzhMar3XvKT5YhTEoA+KixksMuxNEaLn9uqA4HJVz6l7BybwBQ==", "dev": true, "dependencies": { "chokidar": "^3.5.3", "debug": "^4.3.4" }, "peerDependencies": { - "vite": "^2.9.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" + "vite": "^2.9.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" } }, "node_modules/cypress-wait-until": { @@ -6111,9 +6230,9 @@ } }, "node_modules/docker-modem": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.3.tgz", - "integrity": "sha512-89zhop5YVhcPEt5FpUFGr3cDyceGhq/F9J+ZndQ4KfqNvfbJpPMfgeixFgUj5OjCYAboElqODxY5Z1EBsSa6sg==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.6.tgz", + "integrity": "sha512-ens7BiayssQz/uAxGzH8zGXCtiV24rRWXdjNha5V4zSOcxmAZsfGVm/PPFbwQdqEkDnhG+SyR9E3zSHUbOKXBQ==", "dev": true, "dependencies": { "debug": "^4.1.1", @@ -6126,19 +6245,36 @@ } }, "node_modules/dockerode": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-4.0.2.tgz", - "integrity": "sha512-9wM1BVpVMFr2Pw3eJNXrYYt6DT9k0xMcsSCjtPvyQ+xa1iPg/Mo3T/gUcwI0B2cczqCeCYRPF8yFYDwtFXT0+w==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-4.0.6.tgz", + "integrity": "sha512-FbVf3Z8fY/kALB9s+P9epCpWhfi/r0N2DgYYcYpsAUlaTxPjdsitsFobnltb+lyCgAIvf9C+4PSWlTnHlJMf1w==", "dev": true, "dependencies": { "@balena/dockerignore": "^1.0.2", - "docker-modem": "^5.0.3", - "tar-fs": "~2.0.1" + "@grpc/grpc-js": "^1.11.1", + "@grpc/proto-loader": "^0.7.13", + "docker-modem": "^5.0.6", + "protobufjs": "^7.3.2", + "tar-fs": "~2.1.2", + "uuid": "^10.0.0" }, "engines": { "node": ">= 8.0" } }, + "node_modules/dockerode/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -7872,6 +8008,15 @@ "node": ">=6.9.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -9522,6 +9667,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true + }, "node_modules/lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", @@ -9643,6 +9794,12 @@ "node": ">=0.1.90" } }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "dev": true + }, "node_modules/longest-streak": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", @@ -10869,9 +11026,9 @@ "license": "MIT" }, "node_modules/nan": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", - "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.2.tgz", + "integrity": "sha512-DANghxFkS1plDdRsX0X9pm0Z6SJNN6gBdtXfanwoZ8hooC5gosGFSBGRYHUVPz1asKA/kMRqDRdHrluZ61SpBQ==", "dev": true, "optional": true }, @@ -11821,6 +11978,30 @@ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", "dev": true }, + "node_modules/protobufjs": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.0.tgz", + "integrity": "sha512-Z2E/kOY1QjoMlCytmexzYfDm/w5fKAiRwpSzGtdnXW1zC88Z2yXazHHrOtwCzn+7wSxyE8PYM4rvVcMphF9sOA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/proxy-from-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", @@ -12373,6 +12554,15 @@ "throttleit": "^1.0.0" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -13085,9 +13275,9 @@ "license": "BSD-3-Clause" }, "node_modules/ssh2": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz", - "integrity": "sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.16.0.tgz", + "integrity": "sha512-r1X4KsBGedJqo7h8F5c4Ybpcr5RjyP+aWIG007uBPRjmdQWfEiVLzSK71Zji1B9sKxwaCvD8y8cwSkYrlLiRRg==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -13098,8 +13288,8 @@ "node": ">=10.16.0" }, "optionalDependencies": { - "cpu-features": "~0.0.9", - "nan": "^2.18.0" + "cpu-features": "~0.0.10", + "nan": "^2.20.0" } }, "node_modules/sshpk": { @@ -13758,15 +13948,15 @@ } }, "node_modules/tar-fs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz", - "integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz", + "integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==", "dev": true, "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", - "tar-stream": "^2.0.0" + "tar-stream": "^2.1.4" } }, "node_modules/tar-stream": { @@ -15668,12 +15858,39 @@ "node": ">=0.4" } }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", "dev": true }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", @@ -15684,6 +15901,15 @@ "node": ">=10" } }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", @@ -16415,6 +16641,28 @@ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz", "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" }, + "@grpc/grpc-js": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.13.3.tgz", + "integrity": "sha512-FTXHdOoPbZrBjlVLHuKbDZnsTxXv2BlHF57xw6LuThXacXvtkahEPED0CKMk6obZDf65Hv4k3z62eyPNpvinIg==", + "dev": true, + "requires": { + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" + } + }, + "@grpc/proto-loader": { + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.15.tgz", + "integrity": "sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ==", + "dev": true, + "requires": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + } + }, "@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", @@ -16577,6 +16825,12 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "dev": true + }, "@linusborg/vue-simple-portal": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/@linusborg/vue-simple-portal/-/vue-simple-portal-0.1.5.tgz", @@ -17262,6 +17516,70 @@ "dev": true, "optional": true }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "dev": true + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "dev": true + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "dev": true + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "dev": true + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dev": true, + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "dev": true + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "dev": true + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "dev": true + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "dev": true + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "dev": true + }, "@rollup/plugin-inject": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz", @@ -17663,9 +17981,9 @@ } }, "@types/dockerode": { - "version": "3.3.29", - "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.29.tgz", - "integrity": "sha512-5PRRq/yt5OT/Jf77ltIdz4EiR9+VLnPF+HpU4xGFwUqmV24Co2HKBNW3w+slqZ1CYchbcDeqJASHDYWzZCcMiQ==", + "version": "3.3.38", + "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.38.tgz", + "integrity": "sha512-nnrcfUe2iR+RyOuz0B4bZgQwD9djQa9ADEjp7OAgBs10pYT0KSCtplJjcmBDJz0qaReX5T7GbE5i4VplvzUHvA==", "dev": true, "requires": { "@types/docker-modem": "*", @@ -19298,6 +19616,17 @@ "string-width": "^4.2.0" } }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, "clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", @@ -19499,14 +19828,14 @@ } }, "cpu-features": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz", - "integrity": "sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==", + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.10.tgz", + "integrity": "sha512-9IkYqtX3YHPCzoVg1Py+o9057a3i0fp7S530UWokCSaFVTc7CwXPRiOjRjBQQ18ZCNafx78YfnG+HALxtVmOGA==", "dev": true, "optional": true, "requires": { "buildcheck": "~0.0.6", - "nan": "^2.17.0" + "nan": "^2.19.0" } }, "create-ecdh": { @@ -19715,9 +20044,9 @@ } }, "cypress-vite": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cypress-vite/-/cypress-vite-1.5.0.tgz", - "integrity": "sha512-vvTMqJZgI3sN2ylQTi4OQh8LRRjSrfrIdkQD5fOj+EC/e9oHkxS96lif1SyDF1PwailG1tnpJE+VpN6+AwO/rg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/cypress-vite/-/cypress-vite-1.6.0.tgz", + "integrity": "sha512-6oZPDvHgLEZjuFgoejtRuyph369zbVn7fjh4hzhMar3XvKT5YhTEoA+KixksMuxNEaLn9uqA4HJVz6l7BybwBQ==", "dev": true, "requires": { "chokidar": "^3.5.3", @@ -19908,9 +20237,9 @@ } }, "docker-modem": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.3.tgz", - "integrity": "sha512-89zhop5YVhcPEt5FpUFGr3cDyceGhq/F9J+ZndQ4KfqNvfbJpPMfgeixFgUj5OjCYAboElqODxY5Z1EBsSa6sg==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.6.tgz", + "integrity": "sha512-ens7BiayssQz/uAxGzH8zGXCtiV24rRWXdjNha5V4zSOcxmAZsfGVm/PPFbwQdqEkDnhG+SyR9E3zSHUbOKXBQ==", "dev": true, "requires": { "debug": "^4.1.1", @@ -19920,14 +20249,26 @@ } }, "dockerode": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-4.0.2.tgz", - "integrity": "sha512-9wM1BVpVMFr2Pw3eJNXrYYt6DT9k0xMcsSCjtPvyQ+xa1iPg/Mo3T/gUcwI0B2cczqCeCYRPF8yFYDwtFXT0+w==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-4.0.6.tgz", + "integrity": "sha512-FbVf3Z8fY/kALB9s+P9epCpWhfi/r0N2DgYYcYpsAUlaTxPjdsitsFobnltb+lyCgAIvf9C+4PSWlTnHlJMf1w==", "dev": true, "requires": { "@balena/dockerignore": "^1.0.2", - "docker-modem": "^5.0.3", - "tar-fs": "~2.0.1" + "@grpc/grpc-js": "^1.11.1", + "@grpc/proto-loader": "^0.7.13", + "docker-modem": "^5.0.6", + "protobufjs": "^7.3.2", + "tar-fs": "~2.1.2", + "uuid": "^10.0.0" + }, + "dependencies": { + "uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "dev": true + } } }, "doctrine": { @@ -21213,6 +21554,12 @@ "dev": true, "peer": true }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -22411,6 +22758,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true + }, "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", @@ -22509,6 +22862,12 @@ } } }, + "long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "dev": true + }, "longest-streak": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", @@ -23309,9 +23668,9 @@ "dev": true }, "nan": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", - "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.2.tgz", + "integrity": "sha512-DANghxFkS1plDdRsX0X9pm0Z6SJNN6gBdtXfanwoZ8hooC5gosGFSBGRYHUVPz1asKA/kMRqDRdHrluZ61SpBQ==", "dev": true, "optional": true }, @@ -23970,6 +24329,26 @@ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", "dev": true }, + "protobufjs": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.0.tgz", + "integrity": "sha512-Z2E/kOY1QjoMlCytmexzYfDm/w5fKAiRwpSzGtdnXW1zC88Z2yXazHHrOtwCzn+7wSxyE8PYM4rvVcMphF9sOA==", + "dev": true, + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + } + }, "proxy-from-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", @@ -24360,6 +24739,12 @@ "throttleit": "^1.0.0" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, "require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -24868,15 +25253,15 @@ "dev": true }, "ssh2": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz", - "integrity": "sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.16.0.tgz", + "integrity": "sha512-r1X4KsBGedJqo7h8F5c4Ybpcr5RjyP+aWIG007uBPRjmdQWfEiVLzSK71Zji1B9sKxwaCvD8y8cwSkYrlLiRRg==", "dev": true, "requires": { "asn1": "^0.2.6", "bcrypt-pbkdf": "^1.0.2", - "cpu-features": "~0.0.9", - "nan": "^2.18.0" + "cpu-features": "~0.0.10", + "nan": "^2.20.0" } }, "sshpk": { @@ -25367,15 +25752,15 @@ "peer": true }, "tar-fs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz", - "integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz", + "integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==", "dev": true, "requires": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", - "tar-stream": "^2.0.0" + "tar-stream": "^2.1.4" } }, "tar-stream": { @@ -26604,12 +26989,41 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", "dev": true }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "dependencies": { + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } + }, "yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", diff --git a/package.json b/package.json index 547c080b6..6c3e518ab 100644 --- a/package.json +++ b/package.json @@ -65,15 +65,15 @@ "@nextcloud/vite-config": "^1.2.3", "@testing-library/cypress": "^10.0.3", "@testing-library/vue": "^5.9.0", - "@types/dockerode": "^3.3.29", + "@types/dockerode": "^3.3.34", "@vitest/coverage-v8": "^2.0.2", "@vue/test-utils": "^1.3.6", "@vue/tsconfig": "^0.5.1", "cypress": "^13.13.0", "cypress-visual-regression": "^5.0.0", - "cypress-vite": "^1.5.0", + "cypress-vite": "^1.6.0", "cypress-wait-until": "^3.0.1", - "dockerode": "^4.0.2", + "dockerode": "^4.0.4", "eslint-plugin-cypress": "^3.2.0", "happy-dom": "^14.12.3", "typescript": "^5.4.5", diff --git a/tsconfig.json b/tsconfig.json index e904f1a59..89bb67031 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,17 @@ { "extends": "@vue/tsconfig/tsconfig.json", - "include": ["./src/**/*.ts", "./src/**/*.vue"], + "include": [ + "./src" + ], "compilerOptions": { - "allowJs": true, - "allowSyntheticDefaultImports": true, - "moduleResolution": "Bundler", + "lib": [ + "DOM", + "ES2015" + ], + "rootDir": "src", "noImplicitAny": false, - "outDir": "./js/", - "strict": true }, "vueCompilerOptions": { "target": 2.7 } -} \ No newline at end of file +} From e8b85261a0b22b215cc042932f910b011640215f Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Thu, 22 May 2025 18:27:49 +0200 Subject: [PATCH 03/14] test(cypress): Remove unused import of cypress-visual-regression Signed-off-by: Louis Chemineau --- cypress.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/cypress.config.ts b/cypress.config.ts index 8269debbf..2c820683e 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -3,7 +3,6 @@ import { configureNextcloud, startNextcloud, stopNextcloud, waitOnNextcloud } fr import { defineConfig } from 'cypress' import vitePreprocessor from 'cypress-vite' -import { configureVisualRegression } from 'cypress-visual-regression/dist/plugin' export default defineConfig({ projectId: '5bsgwk', From 3e488975d2859050b1f399202e68e07bbccb34cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Fri, 18 Apr 2025 17:55:04 +0200 Subject: [PATCH 04/14] fix(cypress): Force click on activity tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel MΓΌller Signed-off-by: Louis Chemineau --- cypress/e2e/sidebarUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/sidebarUtils.ts b/cypress/e2e/sidebarUtils.ts index f3c10a29c..f72a0972a 100644 --- a/cypress/e2e/sidebarUtils.ts +++ b/cypress/e2e/sidebarUtils.ts @@ -30,7 +30,7 @@ export function showActivityTab(fileName: string) { cy.intercept('GET', '/ocs/v2.php/apps/activity/api/v2/activity/filter**').as('getActivities') showSidebarForFile(fileName) - cy.get('#app-sidebar-vue').contains('Activity').click() + cy.get('#app-sidebar-vue').contains('Activity').click({ force: true }) cy.wait('@getActivities') } From 736f203afc3908719da6ce1b864fc50e613b0a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Fri, 18 Apr 2025 18:07:24 +0200 Subject: [PATCH 05/14] chore: Enable video recording on debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel MΓΌller Signed-off-by: Louis Chemineau --- .github/workflows/cypress.yml | 6 ++++-- cypress.config.ts | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 4fda6cd47..2fb2fba6b 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -142,8 +142,10 @@ jobs: uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 if: always() with: - name: snapshots_${{ matrix.containers }} - path: cypress/snapshots + name: snapshots_videos_${{ matrix.containers }} + path: | + cypress/snapshots + cypress/videos - name: Extract NC logs if: failure() && matrix.containers != 'component' diff --git a/cypress.config.ts b/cypress.config.ts index 2c820683e..0e0c25cf5 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -21,6 +21,9 @@ export default defineConfig({ // Needed to trigger `after:run` events with cypress open experimentalInteractiveRunEvents: true, + // disabled if running in CI but enabled in debug mode + video: !process.env.CI || !!process.env.RUNNER_DEBUG, + // faster video processing videoCompression: false, From 9551aaae2637471627fdcae8e1f110af7b0d6d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Fri, 18 Apr 2025 18:15:54 +0200 Subject: [PATCH 06/14] fix(cypress): Extracting nextcloud logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel MΓΌller Signed-off-by: Louis Chemineau --- .github/workflows/cypress.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 2fb2fba6b..499da19aa 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -149,7 +149,7 @@ jobs: - name: Extract NC logs if: failure() && matrix.containers != 'component' - run: docker logs nextcloud-cypress-tests-${{ env.APP_NAME }} > nextcloud.log + run: docker logs nextcloud-cypress-tests_${{ env.APP_NAME }} > nextcloud.log - name: Upload NC logs uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 From df8e2369efeb097b669f0601c2ed71a30c684fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Fri, 18 Apr 2025 18:33:54 +0200 Subject: [PATCH 07/14] chore: Only stop containers when not on CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel MΓΌller Signed-off-by: Louis Chemineau --- cypress.config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cypress.config.ts b/cypress.config.ts index 0e0c25cf5..38ad15332 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -78,7 +78,9 @@ export default defineConfig({ // Remove container after run on('after:run', () => { - stopNextcloud() + if (!process.env.CI) { + stopNextcloud() + } }) // Before the browser launches From 8fe9661f763a68df8fdd2b9a48dce6e70bb76ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Fri, 18 Apr 2025 18:38:27 +0200 Subject: [PATCH 08/14] fix(cypress): Prevent file being locked on rename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel MΓΌller Signed-off-by: Louis Chemineau --- cypress/e2e/filesUtils.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cypress/e2e/filesUtils.ts b/cypress/e2e/filesUtils.ts index 5b45ac4dd..bc26a514a 100644 --- a/cypress/e2e/filesUtils.ts +++ b/cypress/e2e/filesUtils.ts @@ -40,7 +40,12 @@ export const triggerActionForFile = (filename: string, actionId: string) => { } export function renameFile(fileName: string, newName: string) { + // The file must exist and the preview loaded as it locks the file getRowForFile(fileName) + .should('be.visible') + .find('.files-list__row-icon-preview--loaded') + .should('exist') + triggerActionForFile(fileName, 'rename') // intercept the move so we can wait for it From 08dc33381efa65ee6a7645e3855d9dcf1d14af1e Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Thu, 22 May 2025 18:04:19 +0200 Subject: [PATCH 09/14] test(cypress): Expose container port Signed-off-by: Louis Chemineau --- cypress.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress.config.ts b/cypress.config.ts index 38ad15332..8ce110acd 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -85,7 +85,7 @@ export default defineConfig({ // Before the browser launches // starting Nextcloud testing container - const ip = await startNextcloud(process.env.BRANCH || 'master') + const ip = await startNextcloud(process.env.BRANCH || 'master', undefined, { exposePort: 8080 }) // Setting container's IP as base Url config.baseUrl = `http://${ip}/index.php` await waitOnNextcloud(ip) From f1dbdb8f8b8c8781cf9ffd5bf17375b7fe68ea43 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Thu, 22 May 2025 18:27:12 +0200 Subject: [PATCH 10/14] chore: Bump @nextcloud/cypress to v1.0.0-beta15 Signed-off-by: Louis Chemineau --- package-lock.json | 151 +++++++++++++++++++++++++++++++++++----------- package.json | 2 +- 2 files changed, 116 insertions(+), 37 deletions(-) diff --git a/package-lock.json b/package-lock.json index 47bc9327f..4e6386389 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ }, "devDependencies": { "@nextcloud/browserslist-config": "^3.0.0", - "@nextcloud/cypress": "^1.0.0-beta.8", + "@nextcloud/cypress": "^1.0.0-beta.15", "@nextcloud/eslint-config": "^8.4.1", "@nextcloud/stylelint-config": "^2.4.0", "@nextcloud/vite-config": "^1.2.3", @@ -1698,21 +1698,70 @@ } }, "node_modules/@nextcloud/cypress": { - "version": "1.0.0-beta.8", - "resolved": "https://registry.npmjs.org/@nextcloud/cypress/-/cypress-1.0.0-beta.8.tgz", - "integrity": "sha512-VK3RyXj2HJISx0wUEs1yBBJ3fkDX5C1CAM92Px4Brf9IPz5YfCZAICvxjM8HIXPACR0yb5MUCtGz7E9hv1H/wA==", + "version": "1.0.0-beta.15", + "resolved": "https://registry.npmjs.org/@nextcloud/cypress/-/cypress-1.0.0-beta.15.tgz", + "integrity": "sha512-0pTweoFmw9x0J2R1Ou+ycIw8aGuJGTrbudaorl4vFXUEDEIo4GAx136RzH1TzYkRn1zPxDloFi2qmHh54NMdng==", "dev": true, "dependencies": { "dockerode": "^4.0.2", - "fast-xml-parser": "^4.3.6", - "wait-on": "^7.2.0" + "fast-xml-parser": "^5.2.2", + "wait-on": "^8.0.0" }, "engines": { "node": "^20.0.0", "npm": "^10.0.0" }, "peerDependencies": { - "cypress": "^13.2.0" + "cypress": "^13.9.0" + } + }, + "node_modules/@nextcloud/cypress/node_modules/fast-xml-parser": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.2.3.tgz", + "integrity": "sha512-OdCYfRqfpuLUFonTNjvd30rCBZUneHpSQkCqfaeWQ9qrKcl6XlWeDBNVwGb+INAIxRshuN2jF+BE0L6gbBO2mw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "dependencies": { + "strnum": "^2.1.0" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/@nextcloud/cypress/node_modules/strnum": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", + "integrity": "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ] + }, + "node_modules/@nextcloud/cypress/node_modules/wait-on": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-8.0.3.tgz", + "integrity": "sha512-nQFqAFzZDeRxsu7S3C7LbuxslHhk+gnJZHyethuGKAn2IVleIbTB9I3vJSQiSR+DifUqmdzfPMoMPJfLqMF2vw==", + "dev": true, + "dependencies": { + "axios": "^1.8.2", + "joi": "^17.13.3", + "lodash": "^4.17.21", + "minimist": "^1.2.8", + "rxjs": "^7.8.2" + }, + "bin": { + "wait-on": "bin/wait-on" + }, + "engines": { + "node": ">=12.0.0" } }, "node_modules/@nextcloud/dialogs": { @@ -3039,9 +3088,9 @@ } }, "node_modules/@sideway/address": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", - "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", + "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", "dev": true, "dependencies": { "@hapi/hoek": "^9.0.0" @@ -9325,14 +9374,14 @@ "license": "MIT" }, "node_modules/joi": { - "version": "17.11.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.11.0.tgz", - "integrity": "sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ==", + "version": "17.13.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz", + "integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==", "dev": true, "dependencies": { - "@hapi/hoek": "^9.0.0", - "@hapi/topo": "^5.0.0", - "@sideway/address": "^4.1.3", + "@hapi/hoek": "^9.3.0", + "@hapi/topo": "^5.1.0", + "@sideway/address": "^4.1.5", "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } @@ -12867,9 +12916,9 @@ } }, "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "dev": true, "dependencies": { "tslib": "^2.1.0" @@ -17027,14 +17076,44 @@ } }, "@nextcloud/cypress": { - "version": "1.0.0-beta.8", - "resolved": "https://registry.npmjs.org/@nextcloud/cypress/-/cypress-1.0.0-beta.8.tgz", - "integrity": "sha512-VK3RyXj2HJISx0wUEs1yBBJ3fkDX5C1CAM92Px4Brf9IPz5YfCZAICvxjM8HIXPACR0yb5MUCtGz7E9hv1H/wA==", + "version": "1.0.0-beta.15", + "resolved": "https://registry.npmjs.org/@nextcloud/cypress/-/cypress-1.0.0-beta.15.tgz", + "integrity": "sha512-0pTweoFmw9x0J2R1Ou+ycIw8aGuJGTrbudaorl4vFXUEDEIo4GAx136RzH1TzYkRn1zPxDloFi2qmHh54NMdng==", "dev": true, "requires": { "dockerode": "^4.0.2", - "fast-xml-parser": "^4.3.6", - "wait-on": "^7.2.0" + "fast-xml-parser": "^5.2.2", + "wait-on": "^8.0.0" + }, + "dependencies": { + "fast-xml-parser": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.2.3.tgz", + "integrity": "sha512-OdCYfRqfpuLUFonTNjvd30rCBZUneHpSQkCqfaeWQ9qrKcl6XlWeDBNVwGb+INAIxRshuN2jF+BE0L6gbBO2mw==", + "dev": true, + "requires": { + "strnum": "^2.1.0" + } + }, + "strnum": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", + "integrity": "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==", + "dev": true + }, + "wait-on": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-8.0.3.tgz", + "integrity": "sha512-nQFqAFzZDeRxsu7S3C7LbuxslHhk+gnJZHyethuGKAn2IVleIbTB9I3vJSQiSR+DifUqmdzfPMoMPJfLqMF2vw==", + "dev": true, + "requires": { + "axios": "^1.8.2", + "joi": "^17.13.3", + "lodash": "^4.17.21", + "minimist": "^1.2.8", + "rxjs": "^7.8.2" + } + } } }, "@nextcloud/dialogs": { @@ -17875,9 +17954,9 @@ } }, "@sideway/address": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", - "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", + "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", "dev": true, "requires": { "@hapi/hoek": "^9.0.0" @@ -22492,14 +22571,14 @@ "dev": true }, "joi": { - "version": "17.11.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.11.0.tgz", - "integrity": "sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ==", + "version": "17.13.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz", + "integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==", "dev": true, "requires": { - "@hapi/hoek": "^9.0.0", - "@hapi/topo": "^5.0.0", - "@sideway/address": "^4.1.3", + "@hapi/hoek": "^9.3.0", + "@hapi/topo": "^5.1.0", + "@sideway/address": "^4.1.5", "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } @@ -24940,9 +25019,9 @@ } }, "rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "dev": true, "requires": { "tslib": "^2.1.0" diff --git a/package.json b/package.json index 6c3e518ab..cc84eda4b 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ }, "devDependencies": { "@nextcloud/browserslist-config": "^3.0.0", - "@nextcloud/cypress": "^1.0.0-beta.8", + "@nextcloud/cypress": "^1.0.0-beta.15", "@nextcloud/eslint-config": "^8.4.1", "@nextcloud/stylelint-config": "^2.4.0", "@nextcloud/vite-config": "^1.2.3", From aa8419ecf0f46a8dbf51cc35d40cf92965bd9a32 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Thu, 22 May 2025 17:47:23 +0200 Subject: [PATCH 11/14] test(cypress): Enable test isolation Signed-off-by: Louis Chemineau --- cypress.config.ts | 7 +++---- cypress/e2e/settings.cy.ts | 14 ++++++++++---- cypress/e2e/sidebar.cy.ts | 2 +- cypress/e2e/sidebarUtils.ts | 4 ++++ 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/cypress.config.ts b/cypress.config.ts index 8ce110acd..59307470c 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -11,9 +11,10 @@ export default defineConfig({ viewportWidth: 1280, viewportHeight: 720, - // Tries again 2 more times on failure + requestTimeout: 20000, + retries: { - runMode: 2, + runMode: 0, // do not retry in `cypress open` openMode: 0, }, @@ -37,8 +38,6 @@ export default defineConfig({ trashAssetsBeforeRuns: true, e2e: { - testIsolation: false, - // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. async setupNodeEvents(on, config) { diff --git a/cypress/e2e/settings.cy.ts b/cypress/e2e/settings.cy.ts index 9e51aadb5..a8010634d 100644 --- a/cypress/e2e/settings.cy.ts +++ b/cypress/e2e/settings.cy.ts @@ -3,13 +3,19 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +import type { User } from "@nextcloud/cypress" + describe('Check that user\'s settings survive a reload', () => { + let user: User + before(() => { cy.createRandomUser() - .then((user) => { - cy.login(user) - cy.visit('/settings/user/notifications') - }) + .then(_user => user = _user) + }) + + beforeEach(() => { + cy.login(user) + cy.visit('/settings/user/notifications') }) it('Form survive a reload', () => { diff --git a/cypress/e2e/sidebar.cy.ts b/cypress/e2e/sidebar.cy.ts index 6d82c86a5..84b6b6d73 100644 --- a/cypress/e2e/sidebar.cy.ts +++ b/cypress/e2e/sidebar.cy.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -import { createFolder, moveFile, navigateToFolder, renameFile } from './filesUtils' +import { createFolder, navigateToFolder, moveFile, renameFile } from './filesUtils' import { addComment, addTag, addToFavorites, createPublicShare, removeFromFavorites, showActivityTab } from './sidebarUtils' describe('Check activity listing in the sidebar', { testIsolation: true }, () => { diff --git a/cypress/e2e/sidebarUtils.ts b/cypress/e2e/sidebarUtils.ts index f72a0972a..1be6a8c2e 100644 --- a/cypress/e2e/sidebarUtils.ts +++ b/cypress/e2e/sidebarUtils.ts @@ -100,3 +100,7 @@ export function addComment(fileName: string, comment: string) { cy.wait('@comment') } + +export function randHash() { + return Math.random().toString(36).replace(/[^a-z]+/g, '').slice(0, 10) +} From 95e49e2fa0764d1cb72a2a2b5df165eacf72e278 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Thu, 22 May 2025 17:53:07 +0200 Subject: [PATCH 12/14] test(tag): Ensure tag does not already exists in the server Useful when retrying tests. Signed-off-by: Louis Chemineau --- cypress/e2e/sidebar.cy.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/sidebar.cy.ts b/cypress/e2e/sidebar.cy.ts index 84b6b6d73..642c25fda 100644 --- a/cypress/e2e/sidebar.cy.ts +++ b/cypress/e2e/sidebar.cy.ts @@ -4,7 +4,7 @@ */ import { createFolder, navigateToFolder, moveFile, renameFile } from './filesUtils' -import { addComment, addTag, addToFavorites, createPublicShare, removeFromFavorites, showActivityTab } from './sidebarUtils' +import { addComment, addTag, addToFavorites, createPublicShare, randHash, removeFromFavorites, showActivityTab } from './sidebarUtils' describe('Check activity listing in the sidebar', { testIsolation: true }, () => { beforeEach(function() { @@ -56,7 +56,8 @@ describe('Check activity listing in the sidebar', { testIsolation: true }, () => }) it('Has tag activity', () => { - addTag('welcome.txt', 'my_tag') + addTag('welcome.txt', `my_tag_${randHash()}`) + cy.visit('/apps/files') showActivityTab('welcome.txt') cy.get('.activity-entry').first().should('contains.text', 'Added system tag') From b97a685b1344b0442d386c5e70d31363ce9d25bd Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Mon, 26 May 2025 13:21:23 +0200 Subject: [PATCH 13/14] test(share): Ensure file list row is visible Signed-off-by: Louis Chemineau --- cypress/e2e/filesUtils.ts | 4 ++++ cypress/e2e/sidebar.cy.ts | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/filesUtils.ts b/cypress/e2e/filesUtils.ts index bc26a514a..3ec982d57 100644 --- a/cypress/e2e/filesUtils.ts +++ b/cypress/e2e/filesUtils.ts @@ -116,6 +116,10 @@ export function moveFile (fileName: string, dirName: string) { }) } +export function getFileListRow(filename: string) { + return cy.get(`[data-cy-files-list] [data-cy-files-list-row-name="${CSS.escape(filename)}"]`) +} + export function toggleMenuAction(fileName: string) { cy.get(`[data-cy-files-list] [data-cy-files-list-row-name="${CSS.escape(fileName)}"] [data-cy-files-list-row-actions]`) .should('be.visible') diff --git a/cypress/e2e/sidebar.cy.ts b/cypress/e2e/sidebar.cy.ts index 642c25fda..1122bb12a 100644 --- a/cypress/e2e/sidebar.cy.ts +++ b/cypress/e2e/sidebar.cy.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -import { createFolder, navigateToFolder, moveFile, renameFile } from './filesUtils' +import { createFolder, navigateToFolder, moveFile, renameFile, getFileListRow } from './filesUtils' import { addComment, addTag, addToFavorites, createPublicShare, randHash, removeFromFavorites, showActivityTab } from './sidebarUtils' describe('Check activity listing in the sidebar', { testIsolation: true }, () => { @@ -32,8 +32,9 @@ describe('Check activity listing in the sidebar', { testIsolation: true }, () => it('Has share activity', () => { createPublicShare('welcome.txt') - cy.get('body').contains('Link share created').should('exist') - cy.get('.toast-close').click({ multiple: true }) + cy.visit('/apps/files') + getFileListRow('welcome.txt').should('be.visible') + showActivityTab('welcome.txt') cy.get('.activity-entry').first().should('contains.text', 'Shared as public link') }) From 5e74f225eb358eae44ac7bf83f0a3d4685c4fd3f Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Mon, 26 May 2025 22:51:22 +0200 Subject: [PATCH 14/14] test(cypress): Wait for files actions to be loaded Signed-off-by: Louis Chemineau --- cypress/e2e/filesUtils.ts | 8 ++++++++ cypress/e2e/sidebarUtils.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/filesUtils.ts b/cypress/e2e/filesUtils.ts index 3ec982d57..52f0dc5ce 100644 --- a/cypress/e2e/filesUtils.ts +++ b/cypress/e2e/filesUtils.ts @@ -3,6 +3,8 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +import { closeSidebar } from "./sidebarUtils" + export const getRowForFile = (filename: string) => cy.get(`[data-cy-files-list-row-name="${CSS.escape(filename)}"]`) export const getActionsForFile = (filename: string) => getRowForFile(filename).find('[data-cy-files-list-row-actions]') export const getActionButtonForFile = (filename: string) => getActionsForFile(filename).findByRole('button', { name: 'Actions' }) @@ -121,6 +123,12 @@ export function getFileListRow(filename: string) { } export function toggleMenuAction(fileName: string) { + closeSidebar() + + // Wait for the files actions to be loaded. + cy.get('.files-list__row-mtime') + .should('be.visible') + cy.get(`[data-cy-files-list] [data-cy-files-list-row-name="${CSS.escape(fileName)}"] [data-cy-files-list-row-actions]`) .should('be.visible') .findByRole('button', { name: 'Actions' }) diff --git a/cypress/e2e/sidebarUtils.ts b/cypress/e2e/sidebarUtils.ts index 1be6a8c2e..36e289563 100644 --- a/cypress/e2e/sidebarUtils.ts +++ b/cypress/e2e/sidebarUtils.ts @@ -15,7 +15,7 @@ function showSidebarForFile(fileName: string) { cy.get('#app-sidebar-vue').should('be.visible') } -function closeSidebar() { +export function closeSidebar() { cy.get('body') .then(($body) => { if ($body.find('.app-sidebar__close').length !== 0) {