Skip to content

Commit

Permalink
Switch to Cypress 10.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagr9K committed Jun 26, 2022
1 parent b56bbd3 commit 81fa89b
Show file tree
Hide file tree
Showing 37 changed files with 113 additions and 106 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ module.exports = {
rules: {
"react/require-default-props": "off",
"react/prop-types": "off",
"no-restricted-exports": "off",
},

parser: "@typescript-eslint/parser",
Expand Down
1 change: 1 addition & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./cypress/config";
5 changes: 0 additions & 5 deletions cypress.json

This file was deleted.

9 changes: 9 additions & 0 deletions cypress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from "cypress";

export default defineConfig({
fixturesFolder: false,
e2e: {
baseUrl: "http://localhost:9000",
specPattern: "cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
},
});
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions examples/advanced-demo/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./cypress/config";
6 changes: 0 additions & 6 deletions examples/advanced-demo/cypress.json

This file was deleted.

18 changes: 18 additions & 0 deletions examples/advanced-demo/cypress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defineConfig } from "cypress";
import pluginConfig from "./plugins/index";

export default defineConfig({
fixturesFolder: false,
chromeWebSecurity: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
pluginConfig(on);

return config;
},
baseUrl: "http://localhost:9000",
specPattern: "cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
},
});
2 changes: 1 addition & 1 deletion examples/advanced-demo/cypress/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type SiteMapData = {

type ParseSitemapArgs = { siteUrl: string; sitemapString: string };

const pluginConfig: Cypress.PluginConfig = (on) => {
const pluginConfig = (on: Cypress.PluginEvents): void => {
on("task", {
// Parse the RSS feed and return a list of links to posts
parseRss(rssString: string) {
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"axe-core": "^4.4.2",
"babel-jest": "^28.1.1",
"babel-preset-gatsby": "^2.17.0",
"cypress": "^8.7.0",
"cypress": "^10.2.0",
"cypress-axe": "^1.0.0",
"eslint": "^8.18.0",
"eslint-config-airbnb": "^19.0.4",
Expand Down
1 change: 1 addition & 0 deletions examples/amaranth-demo/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./cypress/config";
6 changes: 0 additions & 6 deletions examples/amaranth-demo/cypress.json

This file was deleted.

18 changes: 18 additions & 0 deletions examples/amaranth-demo/cypress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defineConfig } from "cypress";
import pluginConfig from "./plugins/index";

export default defineConfig({
fixturesFolder: false,
chromeWebSecurity: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
pluginConfig(on);

return config;
},
baseUrl: "http://localhost:9000",
specPattern: "cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
},
});
2 changes: 1 addition & 1 deletion examples/amaranth-demo/cypress/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type SiteMapData = {

type ParseSitemapArgs = { siteUrl: string; sitemapString: string };

const pluginConfig: Cypress.PluginConfig = (on) => {
const pluginConfig = (on: Cypress.PluginEvents): void => {
on("task", {
// Parse the RSS feed and return a list of links to posts
parseRss(rssString: string) {
Expand Down
2 changes: 1 addition & 1 deletion examples/amaranth-demo/cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"lib": ["es5", "dom"],
"types": ["cypress", "cypress-axe", "@testing-library/cypress"]
},
"include": ["./**/*.ts", "./.eslintrc.js"]
"include": ["./**/*.ts", "../eslintrc.js"]
}
2 changes: 1 addition & 1 deletion examples/amaranth-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@typescript-eslint/eslint-plugin": "^5.29.0",
"axe-core": "^4.4.2",
"babel-jest": "^28.1.1",
"cypress": "^8.7.0",
"cypress": "^10.2.0",
"cypress-axe": "^1.0.0",
"eslint": "^8.18.0",
"eslint-config-airbnb": "^19.0.4",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"babel-jest": "^28.1.1",
"cypress": "^8.7.0",
"cypress": "^10.2.0",
"cypress-axe": "^1.0.0",
"eslint": "^8.18.0",
"eslint-config-airbnb": "^19.0.4",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"**/src/**/*",
"**/__mocks__/**/*",
"**/test/**/*",
"**/index.ts"
"**/index.ts",
"**/cypress.config.ts"
],
"compilerOptions": {
"jsx": "react",
Expand Down
Loading

0 comments on commit 81fa89b

Please sign in to comment.