File tree Expand file tree Collapse file tree
packages/cypress-plugin-visual-regression-diff Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 "scripts" : {
66 "build" : " pnpm -r build" ,
77 "lint" : " eslint '**/*.ts' --ignore-pattern '**/*.d.ts'" ,
8- "lint: fix" : " pnpm lint --fix" ,
8+ "fix" : " pnpm lint --fix" ,
99 "lint:ci" : " pnpm lint --max-warnings 0" ,
1010 "format" : " pnpm -r format" ,
1111 "format:ci" : " pnpm -r format:ci" ,
Original file line number Diff line number Diff line change @@ -12,23 +12,23 @@ No code change is required inside your tests. You only need to update **how you
1212
1313### What changed
1414
15- | Location | Before (all Cypress versions) | After (Cypress ≥ 15.10) |
16- | ---| ---| ---|
17- | CLI flag | ` --env "key=value" ` | ` --expose "key=value" ` |
18- | ` cypress.config.ts ` | ` env: { key: value } ` | ` expose: { key: value } ` |
19- | ` cypress.env.json ` | ` { "key": "value" } ` | use ` expose ` in ` cypress.config.ts ` instead |
15+ | Location | Before (all Cypress versions) | After (Cypress ≥ 15.10) |
16+ | ------------------- | ----------------------------- | ------------------------------------------- |
17+ | CLI flag | ` --env "key=value" ` | ` --expose "key=value" ` |
18+ | ` cypress.config.ts ` | ` env: { key: value } ` | ` expose: { key: value } ` |
19+ | ` cypress.env.json ` | ` { "key": "value" } ` | use ` expose ` in ` cypress.config.ts ` instead |
2020
2121### Plugin option names
2222
2323All option names stay the same — they are prefixed with ` pluginVisualRegression ` :
2424
25- | Option | Config key |
26- | ---| ---|
27- | ` updateImages ` | ` pluginVisualRegressionUpdateImages ` |
28- | ` cleanupUnusedImages ` | ` pluginVisualRegressionCleanupUnusedImages ` |
29- | ` diffConfig ` | ` pluginVisualRegressionDiffConfig ` |
25+ | Option | Config key |
26+ | ------------------------ | ---------------------------------------------- |
27+ | ` updateImages ` | ` pluginVisualRegressionUpdateImages ` |
28+ | ` cleanupUnusedImages ` | ` pluginVisualRegressionCleanupUnusedImages ` |
29+ | ` diffConfig ` | ` pluginVisualRegressionDiffConfig ` |
3030| ` forceDeviceScaleFactor ` | ` pluginVisualRegressionForceDeviceScaleFactor ` |
31- | ` maxDiffThreshold ` | ` pluginVisualRegressionMaxDiffThreshold ` |
31+ | ` maxDiffThreshold ` | ` pluginVisualRegressionMaxDiffThreshold ` |
3232
3333### CLI
3434
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ const getPluginEnv = <K extends keyof Cypress.MatchImageOptions>(key: K) => {
6464 if ( supportsExpose ( Cypress . version ) ) {
6565 return Cypress . expose ( envKey ) as Cypress . MatchImageOptions [ K ] | undefined ;
6666 }
67- // eslint-disable-next-line @typescript-eslint/no-deprecated
67+
6868 return Cypress . env ( envKey ) as Cypress . MatchImageOptions [ K ] | undefined ;
6969} ;
7070
Original file line number Diff line number Diff line change @@ -25,7 +25,10 @@ export const initPlugin = (
2525 config : Cypress . PluginConfigOptions ,
2626) => {
2727 /* c8 ignore start */
28- if ( getPluginConfig ( config , 'pluginVisualRegressionForceDeviceScaleFactor' ) !== false ) {
28+ if (
29+ getPluginConfig ( config , 'pluginVisualRegressionForceDeviceScaleFactor' ) !==
30+ false
31+ ) {
2932 initForceDeviceScaleFactor ( on ) ;
3033 }
3134 /* c8 ignore stop */
You can’t perform that action at this time.
0 commit comments