Skip to content

Commit 0681ccf

Browse files
dependabot[bot]skjnldsv
authored andcommitted
Bump cypress from 9.7.0 to 12.3.0
Bumps [cypress](https://github.com/cypress-io/cypress) from 9.7.0 to 12.3.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md) - [Commits](cypress-io/cypress@v9.7.0...v12.3.0) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
1 parent 89b7437 commit 0681ccf

File tree

15 files changed

+19320
-25010
lines changed

15 files changed

+19320
-25010
lines changed

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.

cypress/support/commands.js

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

cypress/support/commands.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import compareSnapshotCommand from 'cypress-visual-regression/dist/command'
2+
3+
compareSnapshotCommand()
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<title>Components App</title>
8+
</head>
9+
<body>
10+
<div data-cy-root></div>
11+
</body>
12+
</html>

cypress/support/component.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// ***********************************************************
2+
// This example support/component.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
import './commands'
17+
import { mount } from '@cypress/vue2'
18+
19+
// Augment the Cypress namespace to include type definitions for
20+
// your custom command.
21+
// Alternatively, can be defined in cypress/support/component.d.ts
22+
// with a <reference path="./component" /> at the top of your spec.
23+
// declare global {
24+
// namespace Cypress {
25+
// interface Chainable {
26+
// mount: typeof mount
27+
// }
28+
// }
29+
// }
30+
31+
// Example use:
32+
// cy.mount(MyComponent)
33+
Cypress.Commands.add('mount', mount)

cypress/support/index.js

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

cypress/tsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": ["./**/*.ts"],
4+
"compilerOptions": {
5+
"types": [
6+
"cypress",
7+
"cypress-visual-regression"
8+
]
9+
}
10+
}

0 commit comments

Comments
 (0)