Skip to content

Commit

Permalink
Update cypress to 9.5.3
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
  • Loading branch information
raimund-schluessler committed Apr 6, 2022
1 parent 7268862 commit 304c3f6
Show file tree
Hide file tree
Showing 7 changed files with 2,460 additions and 10,462 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,34 @@ jobs:
name: Runner ${{ matrix.containers }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v1.1
uses: skjnldsv/read-package-engines-version-actions@v1.2
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
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
run: |
npm ci
- name: Cypress run
uses: cypress-io/github-action@v2
with:
record: true
parallel: true
tag: ${{ github.event_name }}
command: npm run cypress
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# https://github.com/cypress-io/github-action/issues/124
Expand Down
8 changes: 5 additions & 3 deletions cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
"viewportWidth": 1920,
"viewportHeight": 1080,
"defaultCommandTimeout": 6000,
"experimentalComponentTesting": true,
"componentFolder": "tests/visual",
"integrationFolder": "tests/visual",
"testFiles": "**/*.visual.*",
"nodeVersion": "system",
"env": {
"failSilently": false,
"type": "actual"
},
"component": {
"componentFolder": "tests/visual",
"testFiles": "**/*.visual.{js,ts,jsx,tsx}"
},
"screenshotsFolder": "cypress/snapshots/actual",
"trashAssetsBeforeRuns": true
}
6 changes: 6 additions & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
const getCompareSnapshotsPlugin = require('cypress-visual-regression/dist/plugin')

const webpack = require('@cypress/webpack-preprocessor')
const { startDevServer } = require('@cypress/webpack-dev-server')

const webpackOptions = require('../../webpack.dev.js')
webpackOptions.externals = {}
Expand All @@ -29,6 +30,10 @@ module.exports = (on, config) => {
getCompareSnapshotsPlugin(on, config)
on('file:preprocessor', webpack(options))

on('dev-server:start', (options) => {
return startDevServer({ options, webpackConfig: webpackOptions })
})

// Disable spell checking to prevent rendering differences
on('before:browser:launch', (browser, launchOptions) => {
if (browser.family === 'chromium' && browser.name !== 'electron') {
Expand All @@ -51,4 +56,5 @@ module.exports = (on, config) => {
return launchOptions
}
})
return config
}
1 change: 0 additions & 1 deletion cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@
// https://on.cypress.io/configuration
// ***********************************************************

import 'cypress-vue-unit-test/dist/support'
import './commands'
Loading

0 comments on commit 304c3f6

Please sign in to comment.