diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index ef9748f98..675d35f85 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -9,65 +9,105 @@ on: env: APP_NAME: activity - CYPRESS_baseUrl: http://localhost:8081/index.php BRANCH: ${{ github.base_ref }} - PHP_VERSION: 7.4 + CYPRESS_baseUrl: http://127.0.0.1:8082/index.php + TESTING: true jobs: + init: + runs-on: ubuntu-latest + + steps: + - name: Checkout app + uses: actions/checkout@v3 + + - name: Read package.json node and npm engines version + uses: skjnldsv/read-package-engines-version-actions@v1.1 + id: versions + with: + fallbackNode: '^12' + fallbackNpm: '^6' + + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} + uses: actions/setup-node@v3 + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} + run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" + + - name: Install dependencies & build app + run: | + npm ci + TESTING=true npm run build --if-present + + - name: Save context + uses: actions/cache@v3 + with: + key: cypress-context-${{ github.run_id }} + path: /home/runner/work/activity + cypress: - name: cypress runs-on: ubuntu-latest + needs: init strategy: fail-fast: false + matrix: + # run multiple copies of the current job in parallel + containers: [1, 2, 3, 4, 5, 6, 7, 8] + + name: runner ${{ matrix.containers }} steps: - - name: Checkout server - uses: actions/checkout@v2 + - name: Restore context + uses: actions/cache@v3 with: - repository: nextcloud/server - submodules: true - ref: ${{ env.BRANCH }} + key: cypress-context-${{ github.run_id }} + path: /home/runner/work/activity - - name: Checkout ${{ env.APP_NAME }} - uses: actions/checkout@v2 - with: - path: apps/${{ env.APP_NAME }} + - name: Setup server + run: | + cd cypress + docker-compose up -d - - name: Set up php ${{ env.PHP_VERSION }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ env.PHP_VERSION }} - extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu - coverage: none - ini-values: - apc.enable_cli=on + - name: Wait for server + run: npm run wait-on $CYPRESS_baseUrl - - name: Set up Nextcloud - env: - DB_PORT: 4444 - PHP_CLI_SERVER_WORKERS: 10 + - name: Enable app & configure server run: | - mkdir data - php occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin - php occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu" - php -f index.php - php -S 0.0.0.0:8081 & - export OC_PASS=1234561 - php occ user:add --password-from-env user1 - php occ user:add --password-from-env user2 - php occ config:system:set force_language --value en - php occ app:enable activity - php occ app:list - curl -v http://localhost:8081/index.php/login - cat data/nextcloud.log + cd cypress + docker-compose exec --env APP_NAME=${{ env.APP_NAME }} --env BRANCH=${{ env.BRANCH }} -T nextcloud bash /initserver.sh - name: Cypress run - uses: cypress-io/github-action@v2 + uses: cypress-io/github-action@v4 with: - record: false # disabled for now as we have no way to savely use the token in our org - parallel: false - wait-on: '${{ env.CYPRESS_baseUrl }}' - working-directory: 'apps/${{ env.APP_NAME }}' + record: true + parallel: true + # cypress env + ci-build-id: ${{ github.sha }}-${{ github.run_number }} + tag: ${{ github.event_name }} env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + # https://github.com/cypress-io/github-action/issues/124 + COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} + TESTING: true + + - name: Upload snapshots + uses: actions/upload-artifact@v3 + if: always() + with: + name: snapshots + path: cypress/snapshots + + summary: + runs-on: ubuntu-latest + needs: [init, cypress] + + if: always() + + name: cypress-summary + + steps: + - name: Summary status + run: if ${{ needs.init.result != 'success' || ( needs.cypress.result != 'success' && needs.cypress.result != 'skipped' ) }}; then exit 1; fi diff --git a/cypress.config.js b/cypress.config.js new file mode 100644 index 000000000..ac62d9a08 --- /dev/null +++ b/cypress.config.js @@ -0,0 +1,28 @@ +const { defineConfig } = require("cypress"); +const browserify = require('@cypress/browserify-preprocessor') + +module.exports = defineConfig({ + projectId: '5bsgwk', + + viewportWidth: 1280, + viewportHeight: 720, + defaultCommandTimeout: 6000, + retries: 1, + + env: { + failSilently: false, + type: 'actual', + }, + + screenshotsFolder: 'cypress/snapshots/actual', + trashAssetsBeforeRuns: true, + + e2e: { + baseUrl: 'http://localhost:8082/index.php', + + setupNodeEvents(on, config) { + // Fix browserslist extend https://github.com/cypress-io/cypress/issues/2983#issuecomment-570616682 + on('file:preprocessor', browserify()) + }, + }, +}); diff --git a/cypress.json b/cypress.json deleted file mode 100644 index 15f2bcd54..000000000 --- a/cypress.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "baseUrl": "https://localhost:8081/index.php/", - "projectId": "hx9gqy", - "viewportWidth": 1280, - "viewportHeight": 720 -} \ No newline at end of file diff --git a/cypress/docker-compose.yml b/cypress/docker-compose.yml index 081b15052..73ae49038 100644 --- a/cypress/docker-compose.yml +++ b/cypress/docker-compose.yml @@ -1,14 +1,18 @@ -version: '3' +version: '3.7' services: nextcloud: - build: - context: . - restart: always + image: ghcr.io/nextcloud/continuous-integration-shallow-server + ports: - - 8081:80 + - 8082:80 + environment: - CYPRESS_baseUrl: - APP_SOURCE: + CYPRESS_baseUrl: "http://127.0.0.1:8082/index.php" + BRANCH: "${BRANCH:-master}" + volumes: - - ${APP_SOURCE}:/var/www/html/apps/activity + # 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/integration/activity.spec.js b/cypress/e2e/1-getting-started/activity.cy.js similarity index 84% rename from cypress/integration/activity.spec.js rename to cypress/e2e/1-getting-started/activity.cy.js index 2996a0d29..270305c5e 100644 --- a/cypress/integration/activity.spec.js +++ b/cypress/e2e/1-getting-started/activity.cy.js @@ -20,11 +20,12 @@ * */ -import { randHash } from '../utils' +import { randHash } from '../../utils' + const randUser = randHash() -describe('Open test.md in viewer', function() { - before(function() { +describe('Open test.md in viewer', function () { + before(function () { cy.nextcloudCreateUser(randUser, 'password') cy.login(randUser, 'password') @@ -33,16 +34,16 @@ describe('Open test.md in viewer', function() { cy.wait(1000) }) - after(function() { + after(function () { cy.logout() }) - it('Has creation activity', function() { + it('Has creation activity', function () { cy.showActivityTab('welcome.txt') cy.get('.activity-entry').eq(0).should('contains.text', 'You created') }) - it('Has favorite activity', function() { + it('Has favorite activity', function () { cy.addToFavorites('welcome.txt') cy.showActivityTab('welcome.txt') cy.get('.activity-entry').eq(0).should('contains.text', 'Added to favorites') @@ -52,13 +53,13 @@ describe('Open test.md in viewer', function() { cy.get('.activity-entry').eq(0).should('contains.text', 'Removed from favorites') }) - it('Has share activity', function() { + it('Has share activity', function () { cy.createPublicShare('welcome.txt') cy.showActivityTab('welcome.txt') cy.get('.activity-entry').eq(0).should('contains.text', 'Shared as public link') }) - it('Has rename activity', function() { + it('Has rename activity', function () { cy.renameFile('welcome.txt', 'new name') cy.renameFile('new name.txt', 'welcome') @@ -66,7 +67,7 @@ describe('Open test.md in viewer', function() { cy.get('.activity-entry').eq(0).should('contains.text', 'You renamed') }) - it('Has move activity', function() { + it('Has move activity', function () { cy.createFolder('Test folder') cy.moveFile('welcome.txt', 'Test folder') cy.goToDir('Test folder') @@ -75,14 +76,14 @@ describe('Open test.md in viewer', function() { cy.get('.activity-entry').eq(0).should('contains.text', 'You moved') }) - it('Has tag activity', function() { + it('Has tag activity', function () { cy.addTag('welcome.txt', 'my_tag') cy.showActivityTab('welcome.txt') cy.get('.activity-entry').eq(0).should('contains.text', 'Added system tag') }) - it('Has comment activity', function() { + it('Has comment activity', function () { cy.addComment('welcome.txt', 'A comment') cy.showActivityTab('welcome.txt') diff --git a/cypress/integration/settings.spec.js b/cypress/e2e/1-getting-started/settings.cy.js similarity index 99% rename from cypress/integration/settings.spec.js rename to cypress/e2e/1-getting-started/settings.cy.js index ba01616a9..0ec4e1abe 100644 --- a/cypress/integration/settings.spec.js +++ b/cypress/e2e/1-getting-started/settings.cy.js @@ -22,7 +22,7 @@ /// -import { randHash } from '../utils' +import { randHash } from '../../utils' const randUser = randHash() describe('Check that user\'s settings survive a reload', () => { diff --git a/cypress/integration/sidebar.spec.js b/cypress/e2e/1-getting-started/sidebar.cy.js similarity index 84% rename from cypress/integration/sidebar.spec.js rename to cypress/e2e/1-getting-started/sidebar.cy.js index 7db546ec5..45d782d9e 100644 --- a/cypress/integration/sidebar.spec.js +++ b/cypress/e2e/1-getting-started/sidebar.cy.js @@ -22,11 +22,11 @@ /// -import { randHash } from '../utils' +import { randHash } from '../../utils' const randUser = randHash() -describe('Check activity listing in the sidebar', function() { - before(function() { +describe('Check activity listing in the sidebar', function () { + before(function () { cy.nextcloudCreateUser(randUser, 'password') cy.login(randUser, 'password') @@ -35,16 +35,16 @@ describe('Check activity listing in the sidebar', function() { cy.wait(1000) }) - after(function() { + after(function () { cy.logout() }) - it('Has creation activity', function() { + it('Has creation activity', function () { cy.showActivityTab('welcome.txt') cy.get('.activity-entry').eq(0).should('contains.text', 'You created') }) - it('Has favorite activity', function() { + it('Has favorite activity', function () { cy.addToFavorites('welcome.txt') cy.showActivityTab('welcome.txt') cy.get('.activity-entry').eq(0).should('contains.text', 'Added to favorites') @@ -54,13 +54,13 @@ describe('Check activity listing in the sidebar', function() { cy.get('.activity-entry').eq(0).should('contains.text', 'Removed from favorites') }) - it('Has share activity', function() { + it('Has share activity', function () { cy.createPublicShare('welcome.txt') cy.showActivityTab('welcome.txt') cy.get('.activity-entry').eq(0).should('contains.text', 'Shared as public link') }) - it('Has rename activity', function() { + it('Has rename activity', function () { cy.renameFile('welcome.txt', 'new name') cy.renameFile('new name.txt', 'welcome') @@ -68,7 +68,7 @@ describe('Check activity listing in the sidebar', function() { cy.get('.activity-entry').eq(0).should('contains.text', 'You renamed') }) - it('Has move activity', function() { + it('Has move activity', function () { cy.createFolder('Test folder') cy.moveFile('welcome.txt', 'Test folder') cy.goToDir('Test folder') @@ -77,14 +77,14 @@ describe('Check activity listing in the sidebar', function() { cy.get('.activity-entry').eq(0).should('contains.text', 'You moved') }) - it('Has tag activity', function() { + it('Has tag activity', function () { cy.addTag('welcome.txt', 'my_tag') cy.showActivityTab('welcome.txt') cy.get('.activity-entry').eq(0).should('contains.text', 'Added system tag') }) - it('Has comment activity', function() { + it('Has comment activity', function () { cy.addComment('welcome.txt', 'A comment') cy.showActivityTab('welcome.txt') diff --git a/cypress/initserver.sh b/cypress/initserver.sh new file mode 100755 index 000000000..451e39fea --- /dev/null +++ b/cypress/initserver.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +echo "APP_NAME: $APP_NAME" +echo "BRANCH: $BRANCH" + +chown -R www-data:www-data /var/www/html/data + +su www-data -c " + php occ config:system:set force_language --value en + php occ config:system:set enforce_theme --value light + php occ app:enable $APP_NAME + php occ app:list +" \ No newline at end of file diff --git a/cypress/runLocal.sh b/cypress/runLocal.sh deleted file mode 100755 index b8e221524..000000000 --- a/cypress/runLocal.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -export CYPRESS_baseUrl=http://localhost:8081/index.php -export APP_SOURCE=$PWD/.. - -function finish { - docker-compose down -} -trap finish EXIT - -docker-compose up -d - -npm install --no-save wait-on -$(npm bin)/wait-on -i 500 -t 240000 $CYPRESS_baseUrl || (cd cypress && docker-compose logs && exit 1) -docker-compose exec -T nextcloud bash /var/www/html/apps/activity/cypress/server.sh - -(cd .. && $(npm bin)/cypress $@) - - diff --git a/cypress/server.sh b/cypress/server.sh deleted file mode 100644 index af73bf908..000000000 --- a/cypress/server.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -git clone https://github.com/nextcloud/activity /var/www/html/apps/activity -su www-data -c " -php occ config:system:set force_language --value en -php /var/www/html/occ app:enable activity -php /var/www/html/occ app:list -" diff --git a/cypress/start.sh b/cypress/start.sh new file mode 100755 index 000000000..3a6d90c43 --- /dev/null +++ b/cypress/start.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# RUN THIS SCRIPT FROM THE ROOT FOLDER OF YOUR APP +APP_NAME=${PWD##*/} +CYPRESS_baseUrl=http://127.0.0.1:8082/index.php + +if [[ $APP_NAME == "cypress" ]] +then + echo "Please run this app from your app root folder." +else + echo "Launching docker server for the $APP_NAME app" + cd cypress + docker-compose pull + docker-compose up -d --force-recreate + npm run wait-on $CYPRESS_baseUrl + echo "Nextcloud successfully installed" + docker-compose exec --env APP_NAME=$APP_NAME -T nextcloud bash /initserver.sh + echo "Nextcloud successfully configured" +fi diff --git a/cypress/stop.sh b/cypress/stop.sh new file mode 100755 index 000000000..7a736f260 --- /dev/null +++ b/cypress/stop.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# RUN THIS SCRIPT FROM THE ROOT FOLDER OF YOUR APP +appname=${PWD##*/} + +if [[ $appname == "cypress" ]] +then + echo "Please run this app from your app root folder." +else + echo "Killing server for the $appname app" + cd cypress + docker-compose stop +fi diff --git a/cypress/support/index.js b/cypress/support/e2e.js similarity index 85% rename from cypress/support/index.js rename to cypress/support/e2e.js index 7a2a87b49..f2b53c9db 100644 --- a/cypress/support/index.js +++ b/cypress/support/e2e.js @@ -1,5 +1,5 @@ // *********************************************************** -// This example support/index.js is processed and +// This example support/e2e.js is processed and // loaded automatically before your test files. // // This is a great place to put global configuration and @@ -13,5 +13,6 @@ // https://on.cypress.io/configuration // *********************************************************** +// Import commands.js using ES2015 syntax: import './commands' import './sidebar' diff --git a/package-lock.json b/package-lock.json index 2216aface..067182cd9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,13 +36,14 @@ "@types/jest": "^29.0.3", "@vue/test-utils": "^1.3.0", "babel-core": "^7.0.0-bridge.0", - "cypress": "^9.6.1", + "cypress": "^10.6.0", "jest": "^29.0.1", "jest-environment-jsdom": "^29.1.2", "jest-serializer-vue": "^2.0.2", "regenerator-runtime": "^0.13.9", "vue-jest": "^3.0.7", - "vue-template-compiler": "^2.7.10" + "vue-template-compiler": "^2.7.10", + "wait-on": "^6.0.1" }, "engines": { "node": "^16.0.0", @@ -2053,6 +2054,21 @@ "@floating-ui/core": "^0.3.0" } }, + "node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "dev": true + }, + "node_modules/@hapi/topo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", @@ -3670,6 +3686,27 @@ "node": ">= 8" } }, + "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==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@sideway/formula": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", + "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==", + "dev": true + }, + "node_modules/@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "dev": true + }, "node_modules/@sinclair/typebox": { "version": "0.24.41", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.41.tgz", @@ -6940,9 +6977,9 @@ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" }, "node_modules/cypress": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.7.0.tgz", - "integrity": "sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==", + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.10.0.tgz", + "integrity": "sha512-bU8r44x1NIYAUNNXt3CwJpLOVth7HUv2hUhYCxZmgZ1IugowDvuHNpevnoZRQx1KKOEisLvIJW+Xen5Pjn41pg==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -6965,7 +7002,7 @@ "dayjs": "^1.10.4", "debug": "^4.3.2", "enquirer": "^2.3.6", - "eventemitter2": "^6.4.3", + "eventemitter2": "6.4.7", "execa": "4.1.0", "executable": "^4.1.1", "extract-zip": "2.0.1", @@ -8786,9 +8823,9 @@ } }, "node_modules/eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "node_modules/eventemitter3": { @@ -12920,6 +12957,19 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/joi": { + "version": "17.6.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.6.3.tgz", + "integrity": "sha512-YlQsIaS9MHYekzf1Qe11LjTkNzx9qhYluK3172z38RxYoAUf82XMX1p1DG1H4Wtk2ED/vPdSn9OggqtDu+aTow==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.3", + "@sideway/formula": "^3.0.0", + "@sideway/pinpoint": "^2.0.0" + } + }, "node_modules/jquery": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz", @@ -18593,6 +18643,34 @@ "node": ">=12" } }, + "node_modules/wait-on": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-6.0.1.tgz", + "integrity": "sha512-zht+KASY3usTY5u2LgaNqn/Cd8MukxLGjdcZxT2ns5QzDmTFc4XoWBgC+C/na+sMRZTuVygQoMYwdcVjHnYIVw==", + "dev": true, + "dependencies": { + "axios": "^0.25.0", + "joi": "^17.6.0", + "lodash": "^4.17.21", + "minimist": "^1.2.5", + "rxjs": "^7.5.4" + }, + "bin": { + "wait-on": "bin/wait-on" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/wait-on/node_modules/axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.14.7" + } + }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -20902,6 +20980,21 @@ "@floating-ui/core": "^0.3.0" } }, + "@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "dev": true + }, + "@hapi/topo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, "@humanwhocodes/config-array": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", @@ -22137,6 +22230,27 @@ "fastq": "^1.6.0" } }, + "@sideway/address": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", + "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, + "@sideway/formula": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", + "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==", + "dev": true + }, + "@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "dev": true + }, "@sinclair/typebox": { "version": "0.24.41", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.41.tgz", @@ -24879,9 +24993,9 @@ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" }, "cypress": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.7.0.tgz", - "integrity": "sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==", + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.10.0.tgz", + "integrity": "sha512-bU8r44x1NIYAUNNXt3CwJpLOVth7HUv2hUhYCxZmgZ1IugowDvuHNpevnoZRQx1KKOEisLvIJW+Xen5Pjn41pg==", "dev": true, "requires": { "@cypress/request": "^2.88.10", @@ -24903,7 +25017,7 @@ "dayjs": "^1.10.4", "debug": "^4.3.2", "enquirer": "^2.3.6", - "eventemitter2": "^6.4.3", + "eventemitter2": "6.4.7", "execa": "4.1.0", "executable": "^4.1.1", "extract-zip": "2.0.1", @@ -26278,9 +26392,9 @@ "peer": true }, "eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "eventemitter3": { @@ -29387,6 +29501,19 @@ } } }, + "joi": { + "version": "17.6.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.6.3.tgz", + "integrity": "sha512-YlQsIaS9MHYekzf1Qe11LjTkNzx9qhYluK3172z38RxYoAUf82XMX1p1DG1H4Wtk2ED/vPdSn9OggqtDu+aTow==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.3", + "@sideway/formula": "^3.0.0", + "@sideway/pinpoint": "^2.0.0" + } + }, "jquery": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz", @@ -33808,6 +33935,30 @@ "xml-name-validator": "^4.0.0" } }, + "wait-on": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-6.0.1.tgz", + "integrity": "sha512-zht+KASY3usTY5u2LgaNqn/Cd8MukxLGjdcZxT2ns5QzDmTFc4XoWBgC+C/na+sMRZTuVygQoMYwdcVjHnYIVw==", + "dev": true, + "requires": { + "axios": "^0.25.0", + "joi": "^17.6.0", + "lodash": "^4.17.21", + "minimist": "^1.2.5", + "rxjs": "^7.5.4" + }, + "dependencies": { + "axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.7" + } + } + } + }, "walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", diff --git a/package.json b/package.json index bc871f5b8..2942b3ef5 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,10 @@ "stylelint:fix": "stylelint css/*.css css/*.scss src/**/*.scss src/**/*.vue --fix", "test": "NODE_ENV=test jest --passWithNoTests src/", "test:coverage": "NODE_ENV=test jest --coverage src/", - "test:update-snapshots": "NODE_ENV=test jest --updateSnapshot" + "test:update-snapshots": "NODE_ENV=test jest --updateSnapshot", + "e2e": "./cypress/start.sh; cypress run; ./cypress/stop.sh", + "e2e:gui": "./cypress/start.sh; cypress open; ./cypress/stop.sh", + "wait-on": "wait-on -i 500 -t 300000" }, "engines": { "node": "^16.0.0", @@ -98,12 +101,13 @@ "@types/jest": "^29.0.3", "@vue/test-utils": "^1.3.0", "babel-core": "^7.0.0-bridge.0", - "cypress": "^9.6.1", + "cypress": "^10.6.0", "jest": "^29.0.1", "jest-environment-jsdom": "^29.1.2", "jest-serializer-vue": "^2.0.2", "regenerator-runtime": "^0.13.9", "vue-jest": "^3.0.7", - "vue-template-compiler": "^2.7.10" + "vue-template-compiler": "^2.7.10", + "wait-on": "^6.0.1" } -} +} \ No newline at end of file