-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Upgrade Cypress from v9 to v12 (#37810)
- Loading branch information
Showing
145 changed files
with
604 additions
and
604 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { defineConfig } from "cypress" | ||
import { addMatchImageSnapshotPlugin } from "@simonsmith/cypress-image-snapshot/plugin" | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
baseUrl: `http://localhost:9000`, | ||
specPattern: `cypress/integration/**/*.{js,ts}`, | ||
projectId: `2193cm`, | ||
viewportWidth: 1440, | ||
viewportHeight: 900, | ||
retries: { | ||
runMode: 0, | ||
openMode: 0 | ||
}, | ||
videoUploadOnPasses: false, | ||
setupNodeEvents(on, config) { | ||
addMatchImageSnapshotPlugin(on, config) | ||
on("before:browser:launch", (browser = {} as Cypress.Browser, launchOptions) => { | ||
if (browser.family === "chromium" || browser.name === "chrome") { | ||
// Make retina screens run at 1x density so they match the versions in CI | ||
launchOptions.args.push("--force-device-scale-factor=1") | ||
} | ||
return launchOptions | ||
}) | ||
}, | ||
}, | ||
env: { | ||
requireSnapshots: true, | ||
} | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import { parseSrcset } from "srcset" | ||
|
||
const testConfig = { | ||
retries: { | ||
runMode: 2, | ||
|
This file was deleted.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import "gatsby-cypress" | ||
import { addMatchImageSnapshotCommand } from "@simonsmith/cypress-image-snapshot/command" | ||
import { register } from "@cypress/snapshot" | ||
|
||
addMatchImageSnapshotCommand({ | ||
customDiffDir: `/__diff_output__`, | ||
customDiffConfig: { | ||
threshold: 0.1, | ||
}, | ||
failureThreshold: 0.08, | ||
failureThresholdType: `percent`, | ||
}) | ||
|
||
register() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["es5", "dom"], | ||
"types": ["cypress", "node"] | ||
}, | ||
"include": ["**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { defineConfig } from "cypress" | ||
import { addMatchImageSnapshotPlugin } from "@simonsmith/cypress-image-snapshot/plugin" | ||
import { gatsbyConfigUtils } from "./cypress/utils/gatsby-config" | ||
import { blockResourcesUtils } from "./cypress/utils/block-resources" | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
baseUrl: `http://localhost:8000`, | ||
specPattern: `cypress/integration/**/*.{js,ts}`, | ||
projectId: `nusozx`, | ||
experimentalRunAllSpecs: true, | ||
chromeWebSecurity: false, | ||
defaultCommandTimeout: 30000, | ||
retries: 2, | ||
videoUploadOnPasses: false, | ||
setupNodeEvents(on, config) { | ||
addMatchImageSnapshotPlugin(on, config) | ||
on(`task`, { | ||
...blockResourcesUtils, | ||
...gatsbyConfigUtils, | ||
}) | ||
on(`before:browser:launch`, (browser = {} as Cypress.Browser, launchOptions) => { | ||
if (browser.family === `chromium` || browser.name === `chrome`) { | ||
// Make retina screens run at 1x density so they match the versions in CI | ||
launchOptions.args.push(`--force-device-scale-factor=1`) | ||
} | ||
return launchOptions | ||
}) | ||
}, | ||
}, | ||
env: { | ||
requireSnapshots: true, | ||
} | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.