Skip to content

Commit ef6cd55

Browse files
authored
Merge pull request #3609 from nextcloud/dependabot/npm_and_yarn/cypress-12.3.0
Bump cypress from 9.7.0 to 12.3.0
2 parents c1b22f5 + b3ea3f5 commit ef6cd55

File tree

209 files changed

+19377
-24992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+19377
-24992
lines changed

.github/workflows/cypress.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ jobs:
1919
matrix:
2020
# run x copies of the current job in parallel
2121
containers: [1, 2]
22-
node-version: [14]
22+
node-version: [16]
2323

2424
name: Runner ${{ matrix.containers }}
2525

2626
steps:
2727
- uses: actions/checkout@v3
2828

2929
- name: Read package.json node and npm engines version
30-
uses: skjnldsv/read-package-engines-version-actions@v1.2
30+
uses: skjnldsv/read-package-engines-version-actions@v2
3131
id: versions
3232
with:
33-
fallbackNode: '^12'
34-
fallbackNpm: '^6'
33+
fallbackNode: '^14'
34+
fallbackNpm: '^7'
3535

3636
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
3737
uses: actions/setup-node@v3
@@ -46,16 +46,20 @@ jobs:
4646
npm ci
4747
4848
- name: Cypress run
49-
uses: cypress-io/github-action@v2
49+
uses: cypress-io/github-action@v5
5050
with:
51+
component: true
52+
install: false # we have already installed all dependencies above
5153
record: true
5254
parallel: true
55+
# cypress dashboard env
5356
tag: ${{ github.event_name }}
54-
command: npm run cypress
5557
env:
5658
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
5759
# https://github.com/cypress-io/github-action/issues/124
5860
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
61+
# https://github.com/cypress-io/github-action/issues/524
62+
npm_package_name: ${{ env.APP_NAME }}
5963

6064
- name: Upload snapshots
6165
uses: actions/upload-artifact@v2

cypress.config.ts

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import { defineConfig } from 'cypress'
2+
import { DefinePlugin } from 'webpack'
3+
import getCompareSnapshotsPlugin from 'cypress-visual-regression/dist/plugin'
4+
import path from 'path'
5+
import webpackConfig from '@nextcloud/webpack-vue-config'
6+
import webpackRules from '@nextcloud/webpack-vue-config/rules'
7+
8+
import { loadTranslations } from './resources/translations'
9+
10+
const SCOPE_VERSION = Date.now()
11+
webpackRules.RULE_SCSS.use.push({
12+
loader: 'sass-loader',
13+
options: {
14+
additionalData: `@use 'sass:math'; $scope_version:${SCOPE_VERSION}; @import 'variables'; @import 'material-icons';`,
15+
/**
16+
* ! needed for resolve-url-loader
17+
*/
18+
sourceMap: true,
19+
sassOptions: {
20+
sourceMapContents: false,
21+
includePaths: [
22+
path.resolve(__dirname, './src/assets'),
23+
],
24+
},
25+
},
26+
})
27+
28+
webpackConfig.module.rules = Object.values(webpackRules)
29+
30+
export default defineConfig({
31+
projectId: '3paxvy',
32+
viewportWidth: 1920,
33+
viewportHeight: 1080,
34+
defaultCommandTimeout: 6000,
35+
36+
env: {
37+
failSilently: false,
38+
type: 'actual',
39+
},
40+
41+
screenshotsFolder: 'cypress/snapshots/actual',
42+
trashAssetsBeforeRuns: true,
43+
44+
component: {
45+
setupNodeEvents(on, config) {
46+
getCompareSnapshotsPlugin(on, config)
47+
48+
// Disable spell checking to prevent rendering differences
49+
on('before:browser:launch', (browser, launchOptions) => {
50+
if (browser.family === 'chromium' && browser.name !== 'electron') {
51+
launchOptions.preferences.default['browser.enable_spellchecking'] = false
52+
return launchOptions
53+
}
54+
55+
if (browser.family === 'firefox') {
56+
launchOptions.preferences['layout.spellcheckDefault'] = 0
57+
return launchOptions
58+
}
59+
60+
if (browser.name === 'electron') {
61+
launchOptions.preferences.spellcheck = false
62+
return launchOptions
63+
}
64+
})
65+
66+
},
67+
68+
devServer: {
69+
framework: 'vue',
70+
bundler: 'webpack',
71+
webpackConfig: async () => {
72+
const translations = await loadTranslations(path.resolve(__dirname, './l10n'))
73+
webpackConfig.plugins.push(new DefinePlugin({
74+
PRODUCTION: false,
75+
SCOPE_VERSION,
76+
TRANSLATIONS: JSON.stringify(translations),
77+
}))
78+
79+
return webpackConfig
80+
},
81+
},
82+
},
83+
})

cypress.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

cypress/plugins/index.js

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)