diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index fa0493b86..60537740b 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Version 1: no parallelization - name: Cypress run diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ffa778d24..39ba78126 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Version 1: no parallelization - name: Cypress run diff --git a/cypress.json b/cypress.json deleted file mode 100644 index d7a538445..000000000 --- a/cypress.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "baseUrl": "http://localhost:3000", - "viewportHeight": 1000, - "viewportWidth": 1280, - "projectId": "pefcjb" -} diff --git a/cypress/config/dev.config.js b/cypress/config/dev.config.js new file mode 100644 index 000000000..65a6289f2 --- /dev/null +++ b/cypress/config/dev.config.js @@ -0,0 +1,11 @@ +const { defineConfig } = require('cypress') + +module.exports = defineConfig({ + viewportHeight: 1000, + viewportWidth: 1280, + projectId: 'pefcjb', + e2e: { + baseUrl: 'https://nextjs-cypress-j6ls5tggc-muratkeremozcan.vercel.app/', + specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', + }, +}) diff --git a/cypress/config/dev.json b/cypress/config/dev.json deleted file mode 100644 index d5fe9a446..000000000 --- a/cypress/config/dev.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "baseUrl": "https://nextjs-cypress-j6ls5tggc-muratkeremozcan.vercel.app/", - "viewportHeight": 1000, - "viewportWidth": 1280, - "projectId": "pefcjb" -} diff --git a/cypress/config/local.config.js b/cypress/config/local.config.js new file mode 100644 index 000000000..02ffc1d6b --- /dev/null +++ b/cypress/config/local.config.js @@ -0,0 +1,11 @@ +const { defineConfig } = require('cypress') + +module.exports = defineConfig({ + viewportHeight: 1000, + viewportWidth: 1280, + projectId: 'pefcjb', + e2e: { + baseUrl: 'http://localhost:3000', + specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', + }, +}) diff --git a/cypress/config/local.json b/cypress/config/local.json deleted file mode 100644 index d7a538445..000000000 --- a/cypress/config/local.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "baseUrl": "http://localhost:3000", - "viewportHeight": 1000, - "viewportWidth": 1280, - "projectId": "pefcjb" -} diff --git a/cypress/integration/header.spec.js b/cypress/e2e/header.spec.js similarity index 100% rename from cypress/integration/header.spec.js rename to cypress/e2e/header.spec.js diff --git a/cypress/integration/home.spec.js b/cypress/e2e/home.spec.js similarity index 100% rename from cypress/integration/home.spec.js rename to cypress/e2e/home.spec.js diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js deleted file mode 100644 index 59b2bab6e..000000000 --- a/cypress/plugins/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -/** - * @type {Cypress.PluginConfig} - */ -// eslint-disable-next-line no-unused-vars -module.exports = (on, config) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config -} diff --git a/cypress/support/index.js b/cypress/support/e2e.js similarity index 100% rename from cypress/support/index.js rename to cypress/support/e2e.js diff --git a/package.json b/package.json index 143d87be6..033131ca5 100644 --- a/package.json +++ b/package.json @@ -12,13 +12,13 @@ "start": "turbo run start", "types": "turbo run types", "prettier-fix": "prettier --write .", - "cy:open-local": "cypress open --config-file cypress/config/local.json", - "cy:run-local": "cypress run --config-file cypress/config/local.json", - "cy:open-dev": "cypress open --config-file cypress/config/dev.json", - "cy:run-dev": "cypress run --config-file cypress/config/dev.json" + "cy:open-local": "cypress open --config-file cypress/config/local.config.js", + "cy:run-local": "cypress run --config-file cypress/config/local.config.js", + "cy:open-dev": "cypress open --config-file cypress/config/dev.config.js", + "cy:run-dev": "cypress run --config-file cypress/config/dev.config.js" }, "devDependencies": { - "cypress": "9.6.1", + "cypress": "10.3.1", "husky": "7.0.4", "prettier": "2.5.1", "turbo": "1.1.2" diff --git a/site/comments.md b/site/comments.md index e4f315a7a..bc85bb4b9 100644 --- a/site/comments.md +++ b/site/comments.md @@ -75,7 +75,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Cypress run uses: cypress-io/github-action@v3.0.4 @@ -114,7 +114,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Cypress run uses: cypress-io/github-action@v3.0.4 diff --git a/yarn.lock b/yarn.lock index 2e164969a..1c041d0bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3007,10 +3007,10 @@ csstype@^3.0.2, csstype@^3.0.4: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33" integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw== -cypress@9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.6.1.tgz#a7d6b5a53325b3dc4960181f5800a5ade0f085eb" - integrity sha512-ECzmV7pJSkk+NuAhEw6C3D+RIRATkSb2VAHXDY6qGZbca/F9mv5pPsj2LO6Ty6oIFVBTrwCyL9agl28MtJMe2g== +cypress@10.3.1: + version "10.3.1" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.3.1.tgz#7fab4ef43481c05a9a17ebe9a0ec860e15b95a19" + integrity sha512-As9HrExjAgpgjCnbiQCuPdw5sWKx5HUJcK2EOKziu642akwufr/GUeqL5UnCPYXTyyibvEdWT/pSC2qnGW/e5w== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4"