diff --git a/.changeset/soft-hornets-relax.md b/.changeset/soft-hornets-relax.md new file mode 100644 index 00000000000..f9d0b5a439a --- /dev/null +++ b/.changeset/soft-hornets-relax.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Change e2e default browser to electron diff --git a/.github/actions/e2e/action.yml b/.github/actions/e2e/action.yml index 68fc60de97f..d2c1cf931d5 100644 --- a/.github/actions/e2e/action.yml +++ b/.github/actions/e2e/action.yml @@ -53,7 +53,7 @@ runs: using: "composite" steps: - name: e2e with reports - uses: cypress-io/github-action@v5 + uses: cypress-io/github-action@v6 with: install: ${{inputs.install}} browser: ${{inputs.browser}} diff --git a/.github/workflows/tests-nightly.yml b/.github/workflows/tests-nightly.yml index 905c622a323..c9fda1fe255 100644 --- a/.github/workflows/tests-nightly.yml +++ b/.github/workflows/tests-nightly.yml @@ -31,10 +31,10 @@ on: browser: required: true description: "Browser" - default: "chrome" + default: "electron" type: choice options: - - chrome + - electron - firefox - all @@ -161,12 +161,12 @@ jobs: - name: Cypress install id: cypress-install if: ${{ github.event.inputs.tests != 'Critical' && github.event_name != 'repository_dispatch'}} - uses: cypress-io/github-action@v5 + uses: cypress-io/github-action@v6 with: runTests: false - - name: Cypress run chrome - id: cypress-chrome + - name: Cypress run electron + id: cypress-electron if: ${{ github.event.inputs.tests != 'Critical' && github.event_name != 'repository_dispatch' && contains(fromJSON('["chrome", "all"]'), steps.get-browsers.outputs.result) && ! cancelled() }} uses: ./.github/actions/e2e with: @@ -186,7 +186,7 @@ jobs: splitIndex: ${{ strategy.job-index }} commitInfoMessage: All tests triggered via ${{ github.event_name}} on ${{ steps.get-env-uri.outputs.ENV_URI }} install: false - browser: chrome + browser: electron - name: Cypress run firefox id: cypress-firefox @@ -308,7 +308,7 @@ jobs: - name: Cypress run - automatically id: cypress continue-on-error: true - uses: cypress-io/github-action@v5 + uses: cypress-io/github-action@v6 env: API_URI: ${{ needs.get-environment-variables.outputs.url }}graphql/ APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }} @@ -329,7 +329,7 @@ jobs: with: install: false parallel: true - group: "UI - Chrome" + group: "UI - Electron" record: true tag: ${{github.event.client_payload.project}}, ${{github.event.client_payload.environment}}, ${{ needs.get-environment-variables.outputs.url }} diff --git a/cypress.config.js b/cypress.config.js index eff2c428187..384450108a5 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -13,6 +13,8 @@ module.exports = defineConfig({ viewportHeight: 660, screenshotsFolder: "cypress/reports/mochareports", screenshotOnRunFailure: true, + experimentalMemoryManagement: true, + numTestsKeptInMemory: 0, retries: { runMode: 2, openMode: 0, @@ -25,8 +27,6 @@ module.exports = defineConfig({ env: { grepFilterSpecs: true, grepOmitFiltered: true, - numTestsKeptInMemory: 10, - experimentalMemoryManagement: true, }, baseUrl: process.env.BASE_URL, async setupNodeEvents(on, config) { diff --git a/package-lock.json b/package-lock.json index 21251f91297..250bc920bc0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -226,7 +226,7 @@ "@types/jest": "^26.0.14", "@types/setup-polly-jest": "^0.5.0", "chromatic": "^6.17.4", - "cypress": "^12.4.0", + "cypress": "12.17.0", "cypress-file-upload": "^5.0.8", "cypress-mailhog": "^1.3.0", "cypress-mochawesome-reporter": "^3.5.1", @@ -16528,13 +16528,13 @@ } }, "node_modules/cypress": { - "version": "12.17.2", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.2.tgz", - "integrity": "sha512-hxWAaWbqQBzzMuadSGSuQg5PDvIGOovm6xm0hIfpCVcORsCAj/gF2p0EvfnJ4f+jK2PCiDgP6D2eeE9/FK4Mjg==", + "version": "12.17.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.0.tgz", + "integrity": "sha512-nq0ug8Zrjq/2khHU1PTNxg+3/n1oqtmAFCxwQhS6QzkQ4mR6RLitX+cGIOuIMfnEbDAtVub0hZh661FOA16JxA==", "hasInstallScript": true, "optional": true, "dependencies": { - "@cypress/request": "^2.88.11", + "@cypress/request": "^2.88.10", "@cypress/xvfb": "^1.2.4", "@types/node": "^14.14.31", "@types/sinonjs__fake-timers": "8.1.1", @@ -48078,12 +48078,12 @@ } }, "cypress": { - "version": "12.17.2", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.2.tgz", - "integrity": "sha512-hxWAaWbqQBzzMuadSGSuQg5PDvIGOovm6xm0hIfpCVcORsCAj/gF2p0EvfnJ4f+jK2PCiDgP6D2eeE9/FK4Mjg==", + "version": "12.17.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.0.tgz", + "integrity": "sha512-nq0ug8Zrjq/2khHU1PTNxg+3/n1oqtmAFCxwQhS6QzkQ4mR6RLitX+cGIOuIMfnEbDAtVub0hZh661FOA16JxA==", "optional": true, "requires": { - "@cypress/request": "^2.88.11", + "@cypress/request": "^2.88.10", "@cypress/xvfb": "^1.2.4", "@types/node": "^14.14.31", "@types/sinonjs__fake-timers": "8.1.1", diff --git a/package.json b/package.json index 0c442f04565..bd36bc47c0d 100644 --- a/package.json +++ b/package.json @@ -229,7 +229,7 @@ "@types/jest": "^26.0.14", "@types/setup-polly-jest": "^0.5.0", "chromatic": "^6.17.4", - "cypress": "^12.4.0", + "cypress": "^12.17.0", "cypress-file-upload": "^5.0.8", "cypress-mailhog": "^1.3.0", "cypress-mochawesome-reporter": "^3.5.1",