Skip to content

Commit

Permalink
fix: Upgrade eyes-cypress to latest (apache#27195)
Browse files Browse the repository at this point in the history
Co-authored-by: Evan Rusackas <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>
  • Loading branch information
3 people authored and jingyi-zhao-01 committed May 16, 2024
1 parent 6f03af3 commit 60254ce
Show file tree
Hide file tree
Showing 5 changed files with 7,984 additions and 11,115 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ jobs:
# 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
# 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/[email protected]'
# 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/[email protected], 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'
91 changes: 47 additions & 44 deletions superset-frontend/cypress-base/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,52 +18,55 @@
*/
// eslint-disable-next-line import/no-extraneous-dependencies
import { defineConfig } from 'cypress';
import eyesPlugin from '@applitools/eyes-cypress';

export default defineConfig({
chromeWebSecurity: false,
defaultCommandTimeout: 8000,
numTestsKeptInMemory: 0,
experimentalFetchPolyfill: true,
requestTimeout: 10000,
video: false,
videoUploadOnPasses: false,
viewportWidth: 1280,
viewportHeight: 1024,
projectId: 'ukwxzo',
retries: {
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';
}
export default eyesPlugin(
defineConfig({
chromeWebSecurity: false,
defaultCommandTimeout: 8000,
numTestsKeptInMemory: 0,
experimentalFetchPolyfill: true,
requestTimeout: 10000,
video: false,
videoUploadOnPasses: false,
viewportWidth: 1280,
viewportHeight: 1024,
projectId: 'ukwxzo',
retries: {
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;
});
return arg;
});

launchOptions.args.push(
...['--disable-dev-shm-usage', '--disable-gpu'],
);
}
return launchOptions;
});
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);
// 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}'],
},
baseUrl: 'http://localhost:8088',
excludeSpecPattern: ['**/*.applitools.test.ts'],
specPattern: ['cypress/e2e/**/*.{js,jsx,ts,tsx}'],
},
});
}),
);
Loading

0 comments on commit 60254ce

Please sign in to comment.