chore(cypress-11): upgrade to cypress 11.2 (#2251)

* chore: upgrade to cypress 11.2

* fix: update grep tags
This commit is contained in:
Joe Tsang 2022-11-30 12:32:01 +00:00 committed by GitHub
parent 2f600207f7
commit 5bc861b5ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 78 additions and 40 deletions

View File

@ -4,7 +4,7 @@ module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
require('cypress-grep/src/plugin')(config);
require('@cypress/grep/src/plugin')(config);
return config;
},
baseUrl: 'http://localhost:4200',

20
apps/console-lite-e2e/index.d.ts vendored Normal file
View File

@ -0,0 +1,20 @@
/// <reference types="cypress" />
declare namespace Cypress {
// specify additional properties in the TestConfig object
// in our case we will add "tags" property
interface SuiteConfigOverrides {
/**
* List of tags for this test
* @example a single tag
* it('logs in', { tags: '@smoke' }, () => { ... })
* @example multiple tags
* it('works', { tags: ['@smoke', '@slow'] }, () => { ... })
*/
tags?: string | string[];
}
interface Cypress {
grep?: (grep?: string, tags?: string, burn?: string) => void;
}
}

View File

@ -17,7 +17,7 @@ import '@vegaprotocol/cypress';
import 'cypress-real-events/support';
// Import commands.js using ES2015 syntax:
import './commands';
import registerCypressGrep from 'cypress-grep';
import registerCypressGrep from '@cypress/grep';
import { aliasQuery } from '@vegaprotocol/cypress';
registerCypressGrep();

View File

@ -7,7 +7,7 @@
"allowSyntheticDefaultImports": true,
"outDir": "../../dist/out-tsc",
"allowJs": true,
"types": ["cypress", "node", "cypress-real-events", "cypress-grep"]
"types": ["cypress", "node", "cypress-real-events", "@cypress/grep"]
},
"include": ["src/**/*.ts", "src/**/*.js", "./declaration.d.ts"]
"include": ["src/**/*.ts", "src/**/*.js", "./declaration.d.ts", "index.d.ts"]
}

View File

@ -5,7 +5,7 @@ module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
require('cypress-grep/src/plugin')(config);
require('@cypress/grep/src/plugin')(config);
return config;
},
baseUrl: 'http://localhost:3000',

View File

@ -15,5 +15,5 @@
import '@vegaprotocol/cypress';
import './common.functions.js';
import registerCypressGrep from 'cypress-grep';
import registerCypressGrep from '@cypress/grep';
registerCypressGrep();

View File

@ -4,7 +4,7 @@
"jsx": "react-jsx",
"sourceMap": false,
"outDir": "../../dist/out-tsc",
"types": ["cypress", "node", "cypress-grep"],
"types": ["cypress", "node", "@cypress/grep"],
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,

View File

@ -6,7 +6,7 @@
"allowSyntheticDefaultImports": true,
"outDir": "../../dist/out-tsc",
"allowJs": true,
"types": ["cypress", "node", "cypress-real-events", "cypress-grep"]
"types": ["cypress", "node", "cypress-real-events", "@cypress/grep"]
},
"include": ["src/**/*.ts", "src/**/*.js"]
}

View File

@ -4,7 +4,7 @@ module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
require('cypress-grep/src/plugin')(config);
require('@cypress/grep/src/plugin')(config);
return config;
},
baseUrl: 'http://localhost:3010',

View File

@ -7,7 +7,7 @@
"allowSyntheticDefaultImports": true,
"outDir": "../../dist/out-tsc",
"allowJs": true,
"types": ["cypress", "node", "cypress-grep"]
"types": ["cypress", "node", "@cypress/grep"]
},
"include": ["src/**/*.ts", "src/**/*.js"]
}

View File

@ -5,7 +5,7 @@ module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
require('cypress-grep/src/plugin')(config);
require('@cypress/grep/src/plugin')(config);
return config;
},
baseUrl: 'http://localhost:4210',

View File

@ -6,7 +6,7 @@ import './governance.functions.js';
import './wallet-eth.functions.js';
import './wallet-teardown.functions.js';
import './wallet-vega.functions.js';
import registerCypressGrep from 'cypress-grep';
import registerCypressGrep from '@cypress/grep';
import { aliasQuery } from '@vegaprotocol/cypress';
registerCypressGrep();

View File

@ -7,7 +7,7 @@
"allowSyntheticDefaultImports": true,
"outDir": "../../dist/out-tsc",
"allowJs": true,
"types": ["cypress", "node", "cypress-grep"]
"types": ["cypress", "node", "@cypress/grep"]
},
"include": ["src/**/*.ts", "src/**/*.js"]
}

View File

@ -16,7 +16,7 @@ module.exports = defineConfig({
},
e2e: {
setupNodeEvents(on, config) {
require('cypress-grep/src/plugin')(config);
require('@cypress/grep/src/plugin')(config);
return config;
},
baseUrl: 'http://localhost:4200',

20
apps/trading-e2e/src/index.d.ts vendored Normal file
View File

@ -0,0 +1,20 @@
/// <reference types="cypress" />
declare namespace Cypress {
// specify additional properties in the TestConfig object
// in our case we will add "tags" property
interface SuiteConfigOverrides {
/**
* List of tags for this test
* @example a single tag
* it('logs in', { tags: '@smoke' }, () => { ... })
* @example multiple tags
* it('works', { tags: ['@smoke', '@slow'] }, () => { ... })
*/
tags?: string | string[];
}
interface Cypress {
grep?: (grep?: string, tags?: string, burn?: string) => void;
}
}

View File

@ -1,6 +1,6 @@
import '@vegaprotocol/cypress';
import 'cypress-real-events/support';
import registerCypressGrep from 'cypress-grep';
import registerCypressGrep from '@cypress/grep';
import { addMockTradingPage } from './trading';
registerCypressGrep();
addMockTradingPage();

View File

@ -5,7 +5,7 @@
"sourceMap": false,
"outDir": "../../dist/out-tsc",
"allowJs": true,
"types": ["cypress", "node", "cypress-real-events", "cypress-grep"],
"types": ["cypress", "node", "cypress-real-events", "@cypress/grep"],
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,

View File

@ -92,6 +92,7 @@
"@babel/preset-typescript": "7.12.13",
"@commitlint/cli": "^16.2.4",
"@commitlint/config-conventional": "^16.2.4",
"@cypress/grep": "^3.1.0",
"@ethersproject/experimental": "^5.6.0",
"@graphql-codegen/cli": "^2.11.8",
"@graphql-codegen/near-operation-file-preset": "^2.4.1",
@ -144,8 +145,7 @@
"autoprefixer": "10.4.8",
"babel-jest": "27.5.1",
"babel-loader": "8.1.0",
"cypress": "^10.2.0",
"cypress-grep": "^3.0.3",
"cypress": "^11.2.0",
"cypress-real-events": "^1.7.1",
"dotenv": "^16.0.1",
"eslint": "8.15.0",

View File

@ -501,7 +501,7 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
"@babel/parser@^7.1.0", "@babel/parser@^7.1.3", "@babel/parser@^7.12.13", "@babel/parser@^7.14.0", "@babel/parser@^7.16.5", "@babel/parser@^7.16.8":
"@babel/parser@^7.1.0", "@babel/parser@^7.1.3", "@babel/parser@^7.12.13", "@babel/parser@^7.14.0", "@babel/parser@^7.16.8":
version "7.19.4"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.4.tgz#03c4339d2b8971eb3beca5252bafd9b9f79db3dc"
integrity sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA==
@ -511,6 +511,11 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2"
integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==
"@babel/parser@^7.16.5":
version "7.20.5"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.5.tgz#7f3c7335fe417665d929f34ae5dceae4c04015e8"
integrity sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2"
@ -1750,6 +1755,15 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"
"@cypress/grep@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@cypress/grep/-/grep-3.1.0.tgz#d055fd63a9dd59326020af90e2fe56610ea89ec6"
integrity sha512-ZSAwUyEw7e7Lu4KhjQLZrJDnzA04awqikj7ZcPHr+oW4wDpiVscn7VEZ/P/WRC1fBydUoZ5e24aFEPxXmKCreg==
dependencies:
debug "^4.3.2"
find-test-names "^1.19.0"
globby "^11.0.4"
"@cypress/request@^2.88.10":
version "2.88.10"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.10.tgz#b66d76b07f860d3a4b8d7a0604d020c662752cce"
@ -11102,24 +11116,15 @@ cyclist@^1.0.1:
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
integrity sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A==
cypress-grep@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/cypress-grep/-/cypress-grep-3.0.3.tgz#fb79b26a30333ce75f512b52824bc3b288f90919"
integrity sha512-N7AErz9HJavM0+l59ktRa0Ix9/kljp59eXYqW/JuuYQg2xaa4LsWxk93KPwXeaaEyPvWcrABEgXNSxFe1L/qCQ==
dependencies:
debug "4.3.1"
find-test-names "^1.17.2"
globby "^11.0.4"
cypress-real-events@^1.7.1:
version "1.7.1"
resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.7.1.tgz#8f430d67c29ea4f05b9c5b0311780120cbc9b935"
integrity sha512-/Bg15RgJ0SYsuXc6lPqH08x19z6j2vmhWN4wXfJqm3z8BTAFiK2MvipZPzxT8Z0jJP0q7kuniWrLIvz/i/8lCQ==
cypress@^10.2.0:
version "10.10.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.10.0.tgz#fd671297b2ca3e64dfffd55fe3857c388cfbb695"
integrity sha512-bU8r44x1NIYAUNNXt3CwJpLOVth7HUv2hUhYCxZmgZ1IugowDvuHNpevnoZRQx1KKOEisLvIJW+Xen5Pjn41pg==
cypress@^11.2.0:
version "11.2.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-11.2.0.tgz#63edef8c387b687066c5493f6f0ad7b9ced4b2b7"
integrity sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA==
dependencies:
"@cypress/request" "^2.88.10"
"@cypress/xvfb" "^1.2.4"
@ -11420,13 +11425,6 @@ debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, d
dependencies:
ms "2.1.2"
debug@4.3.1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
dependencies:
ms "2.1.2"
debug@~3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
@ -13112,7 +13110,7 @@ find-root@^1.1.0:
resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4"
integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==
find-test-names@^1.17.2:
find-test-names@^1.19.0:
version "1.21.0"
resolved "https://registry.yarnpkg.com/find-test-names/-/find-test-names-1.21.0.tgz#fe0d0bdd7e8ad9df6b5e0f08986e982654fc4417"
integrity sha512-yYcl4X2U1maVXCktO24e9K7qs1uDqDTQWe51gso6JgK2iinRbNyHKrb43/LQTit8/SteA2qODqPkapgeuSdzZw==