@abi-software/flatmapvuer 1.10.1-beta.2 → 1.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cypress.config.js CHANGED
@@ -19,15 +19,52 @@ const config = defineConfig({
19
19
  bundler: "vite",
20
20
  },
21
21
  env: {
22
+ projectId: process.env.CYPRESS_PROJECT_ID,
22
23
  visualRegressionType: 'regression',
23
24
  visualRegressionBaseDirectory: 'cypress/screenshots/MultiFlatmapVuer.cy.js/base',
24
25
  visualRegressionDiffDirectory: 'cypress/screenshots/diff',
25
26
  visualRegressionGenerateDiff: 'always',
26
27
  visualRegressionFailSilently: true,
28
+ HUMAN_FEMALE_UUID: process.env.HUMAN_FEMALE_UUID ? process.env.HUMAN_FEMALE_UUID : '',
29
+ HUMAN_MALE_UUID: process.env.HUMAN_MALE_UUID ? process.env.HUMAN_MALE_UUID : '',
30
+ RAT_UUID: process.env.RAT_UUID ? process.env.RAT_UUID : '',
31
+ MOUSE_UUID: process.env.MOUSE_UUID ? process.env.MOUSE_UUID : '',
32
+ PIG_UUID: process.env.PIG_UUID ? process.env.PIG_UUID : '',
33
+ CAT_UUID: process.env.CAT_UUID ? process.env.CAT_UUID : '',
34
+ ERROR_TOLERANCE: process.env.ERROR_TOLERANCE ? process.env.ERROR_TOLERANCE : 0.0001
27
35
  },
28
36
  screenshotsFolder: './cypress/screenshots',
29
37
  setupNodeEvents(on, config) {
30
38
  configureVisualRegression(on)
39
+
40
+ on('before:browser:launch', (browser, launchOptions) => {
41
+ if (browser.name === 'chrome' && browser.isHeadless) {
42
+ // fullPage screenshot size is 1400x1200 on non-retina screens
43
+ // and 2800x2400 on retina screens
44
+ launchOptions.args.push('--window-size=1400,1200')
45
+
46
+ // force screen to be non-retina (1400x1200 size)
47
+ launchOptions.args.push('--force-device-scale-factor=1')
48
+
49
+ // force screen to be retina (2800x2400 size)
50
+ // launchOptions.args.push('--force-device-scale-factor=2')
51
+ }
52
+
53
+ if (browser.name === 'electron' && browser.isHeadless) {
54
+ // fullPage screenshot size is 1400x1200
55
+ launchOptions.preferences.width = 2000
56
+ launchOptions.preferences.height = 2000
57
+ }
58
+
59
+ if (browser.name === 'firefox' && browser.isHeadless) {
60
+ // menubars take up height on the screen
61
+ // so fullPage screenshot size is 1400x1126
62
+ launchOptions.args.push('--width=1400')
63
+ launchOptions.args.push('--height=1200')
64
+ }
65
+
66
+ return launchOptions
67
+ })
31
68
  },
32
69
  },
33
70
  });