fix: Upgrade eyes-cypress to latest (#27195)

Co-authored-by: Evan Rusackas <evan@rusackas.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
Geido 2024-04-17 16:41:03 +02:00 committed by GitHub
parent cd15655ed3
commit f3c538a3dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 1182 additions and 4313 deletions

View File

@ -24,4 +24,6 @@ jobs:
# find SPDX identifiers here: https://spdx.org/licenses/ # find SPDX identifiers here: https://spdx.org/licenses/
deny-licenses: MS-LPL, BUSL-1.1, QPL-1.0, Sleepycat, SSPL-1.0, CPOL-1.02, AGPL-3.0, GPL-1.0+, BSD-4-Clause-UC, NPL-1.0, NPL-1.1, JSON deny-licenses: MS-LPL, BUSL-1.1, QPL-1.0, Sleepycat, SSPL-1.0, CPOL-1.02, AGPL-3.0, GPL-1.0+, BSD-4-Clause-UC, NPL-1.0, NPL-1.1, JSON
# adding an exception for an ambigious license on store2, which has been resolved in the latest version. It's MIT: https://github.com/nbubna/store/blob/master/LICENSE-MIT # adding an exception for an ambigious license on store2, which has been resolved in the latest version. It's MIT: https://github.com/nbubna/store/blob/master/LICENSE-MIT
allow-dependencies-licenses: 'pkg:npm/store2@2.14.2' # adding exception for all applitools modules (eyes-cypress and its dependencies), which has an explicit OSS license approved by ASF
# license: https://applitools.com/legal/open-source-terms-of-use/
allow-dependencies-licenses: 'pkg:npm/store2@2.14.2, pkg:npm/applitools/core, pkg:npm/applitools/core-base, pkg:npm/applitools/css-tree, pkg:npm/applitools/ec-client, pkg:npm/applitools/eg-socks5-proxy-server, pkg:npm/applitools/eyes, pkg:npm/applitools/eyes-cypress, pkg:npm/applitools/nml-client, pkg:npm/applitools/tunnel-client, pkg:npm/applitools/utils'

View File

@ -18,52 +18,55 @@
*/ */
// eslint-disable-next-line import/no-extraneous-dependencies // eslint-disable-next-line import/no-extraneous-dependencies
import { defineConfig } from 'cypress'; import { defineConfig } from 'cypress';
import eyesPlugin from '@applitools/eyes-cypress';
export default defineConfig({ export default eyesPlugin(
chromeWebSecurity: false, defineConfig({
defaultCommandTimeout: 8000, chromeWebSecurity: false,
numTestsKeptInMemory: 0, defaultCommandTimeout: 8000,
experimentalFetchPolyfill: true, numTestsKeptInMemory: 0,
requestTimeout: 10000, experimentalFetchPolyfill: true,
video: false, requestTimeout: 10000,
videoUploadOnPasses: false, video: false,
viewportWidth: 1280, videoUploadOnPasses: false,
viewportHeight: 1024, viewportWidth: 1280,
projectId: 'ukwxzo', viewportHeight: 1024,
retries: { projectId: 'ukwxzo',
runMode: 2, retries: {
openMode: 0, runMode: 2,
}, openMode: 0,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
// ECONNRESET on Chrome/Chromium 117.0.5851.0 when using Cypress <12.15.0
// Check https://github.com/cypress-io/cypress/issues/27804 for context
// TODO: This workaround should be removed when upgrading Cypress
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome' && browser.isHeadless) {
// eslint-disable-next-line no-param-reassign
launchOptions.args = launchOptions.args.map(arg => {
if (arg === '--headless') {
return '--headless=new';
}
return arg;
});
launchOptions.args.push(
...['--disable-dev-shm-usage', '--disable-gpu'],
);
}
return launchOptions;
});
// eslint-disable-next-line global-require,import/extensions
return require('./cypress/plugins/index.js')(on, config);
}, },
baseUrl: 'http://localhost:8088', e2e: {
excludeSpecPattern: ['**/*.applitools.test.ts'], // We've imported your old cypress plugins here.
specPattern: ['cypress/e2e/**/*.{js,jsx,ts,tsx}'], // You may want to clean this up later by importing these.
}, setupNodeEvents(on, config) {
}); // ECONNRESET on Chrome/Chromium 117.0.5851.0 when using Cypress <12.15.0
// Check https://github.com/cypress-io/cypress/issues/27804 for context
// TODO: This workaround should be removed when upgrading Cypress
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome' && browser.isHeadless) {
// eslint-disable-next-line no-param-reassign
launchOptions.args = launchOptions.args.map(arg => {
if (arg === '--headless') {
return '--headless=new';
}
return arg;
});
launchOptions.args.push(
...['--disable-dev-shm-usage', '--disable-gpu'],
);
}
return launchOptions;
});
// eslint-disable-next-line global-require,import/extensions
return require('./cypress/plugins/index.js')(on, config);
},
baseUrl: 'http://localhost:8088',
excludeSpecPattern: ['**/*.applitools.test.ts'],
specPattern: ['cypress/e2e/**/*.{js,jsx,ts,tsx}'],
},
}),
);

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
] ]
}, },
"dependencies": { "dependencies": {
"@applitools/eyes-cypress": "^3.29.1", "@applitools/eyes-cypress": "^3.41.0",
"@cypress/code-coverage": "^3.10.4", "@cypress/code-coverage": "^3.10.4",
"@superset-ui/core": "^2.1.0", "@superset-ui/core": "^2.1.0",
"brace": "^0.11.1", "brace": "^0.11.1",

View File

@ -6,7 +6,7 @@
"strict": true, "strict": true,
"target": "es2019", "target": "es2019",
"lib": ["es2019", "DOM"], "lib": ["es2019", "DOM"],
"types": ["cypress"], "types": ["cypress", "@applitools/eyes-cypress", "node"],
"allowJs": true, "allowJs": true,
"noEmit": true "noEmit": true
}, },