diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 000000000..665e6a53e --- /dev/null +++ b/cypress.config.ts @@ -0,0 +1,29 @@ +/* + * Copyright 2017-2022 Allegro.pl + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { defineConfig } from "cypress"; + +export default defineConfig({ + video: false, + viewportWidth: 1280, + viewportHeight: 1024, + e2e: { + // We've imported your old cypress plugins here. + // You may want to clean this up later by importing these. + setupNodeEvents(on, config) { + return require("./cypress/plugins/index.js")(on, config); + } + } +}); diff --git a/cypress.json b/cypress.json deleted file mode 100644 index a6b8f93d9..000000000 --- a/cypress.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "video": false, - "viewportWidth": 1280, - "viewportHeight": 1024 -} - diff --git a/cypress/integration/bar-chart.spec.ts b/cypress/e2e/bar-chart.cy.ts similarity index 100% rename from cypress/integration/bar-chart.spec.ts rename to cypress/e2e/bar-chart.cy.ts diff --git a/cypress/integration/boolean-filter-menu.spec.ts b/cypress/e2e/boolean-filter-menu.cy.ts similarity index 100% rename from cypress/integration/boolean-filter-menu.spec.ts rename to cypress/e2e/boolean-filter-menu.cy.ts diff --git a/cypress/integration/csv-data-source.spec.ts b/cypress/e2e/csv-data-source.cy.ts similarity index 100% rename from cypress/integration/csv-data-source.spec.ts rename to cypress/e2e/csv-data-source.cy.ts diff --git a/cypress/integration/fixed-time-filter-menu.spec.ts b/cypress/e2e/fixed-time-filter-menu.cy.ts similarity index 100% rename from cypress/integration/fixed-time-filter-menu.spec.ts rename to cypress/e2e/fixed-time-filter-menu.cy.ts diff --git a/cypress/integration/grid.spec.ts b/cypress/e2e/grid.cy.ts similarity index 100% rename from cypress/integration/grid.spec.ts rename to cypress/e2e/grid.cy.ts diff --git a/cypress/integration/home-page.spec.ts b/cypress/e2e/home-page.cy.ts similarity index 100% rename from cypress/integration/home-page.spec.ts rename to cypress/e2e/home-page.cy.ts diff --git a/cypress/integration/legend.spec.ts b/cypress/e2e/legend.cy.ts similarity index 100% rename from cypress/integration/legend.spec.ts rename to cypress/e2e/legend.cy.ts diff --git a/cypress/integration/line-chart.spec.ts b/cypress/e2e/line-chart.cy.ts similarity index 100% rename from cypress/integration/line-chart.spec.ts rename to cypress/e2e/line-chart.cy.ts diff --git a/cypress/integration/pinboard.spec.ts b/cypress/e2e/pinboard.cy.ts similarity index 100% rename from cypress/integration/pinboard.spec.ts rename to cypress/e2e/pinboard.cy.ts diff --git a/cypress/integration/relative-time-filter-menu.spec.ts b/cypress/e2e/relative-time-filter-menu.cy.ts similarity index 100% rename from cypress/integration/relative-time-filter-menu.spec.ts rename to cypress/e2e/relative-time-filter-menu.cy.ts diff --git a/cypress/integration/scatterplot.spec.ts b/cypress/e2e/scatterplot.cy.ts similarity index 100% rename from cypress/integration/scatterplot.spec.ts rename to cypress/e2e/scatterplot.cy.ts diff --git a/cypress/integration/split-tile.spec.ts b/cypress/e2e/split-tile.cy.ts similarity index 100% rename from cypress/integration/split-tile.spec.ts rename to cypress/e2e/split-tile.cy.ts diff --git a/cypress/integration/string-split-menu.spec.ts b/cypress/e2e/string-split-menu.cy.ts similarity index 100% rename from cypress/integration/string-split-menu.spec.ts rename to cypress/e2e/string-split-menu.cy.ts diff --git a/cypress/integration/table.spec.ts b/cypress/e2e/table.cy.ts similarity index 100% rename from cypress/integration/table.spec.ts rename to cypress/e2e/table.cy.ts diff --git a/cypress/integration/totals.spec.ts b/cypress/e2e/totals.cy.ts similarity index 100% rename from cypress/integration/totals.spec.ts rename to cypress/e2e/totals.cy.ts 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-lock.json b/package-lock.json index 8965a3a19..e8fb99f37 100644 --- a/package-lock.json +++ b/package-lock.json @@ -102,7 +102,7 @@ "css-loader": "5.2.7", "css-minimizer-webpack-plugin": "1.3.0", "css-modules-require-hook": "4.2.3", - "cypress": "9.7.0", + "cypress": "11.2.0", "enzyme": "3.3.0", "enzyme-adapter-react-16": "1.7.1", "file-loader": "6.2.0", @@ -7663,9 +7663,9 @@ "dev": true }, "node_modules/cypress": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.7.0.tgz", - "integrity": "sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-11.2.0.tgz", + "integrity": "sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -7688,7 +7688,7 @@ "dayjs": "^1.10.4", "debug": "^4.3.2", "enquirer": "^2.3.6", - "eventemitter2": "^6.4.3", + "eventemitter2": "6.4.7", "execa": "4.1.0", "executable": "^4.1.1", "extract-zip": "2.0.1", @@ -9792,9 +9792,9 @@ } }, "node_modules/eventemitter2": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.5.tgz", - "integrity": "sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "node_modules/events": { @@ -30675,9 +30675,9 @@ "dev": true }, "cypress": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.7.0.tgz", - "integrity": "sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-11.2.0.tgz", + "integrity": "sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA==", "dev": true, "requires": { "@cypress/request": "^2.88.10", @@ -30699,7 +30699,7 @@ "dayjs": "^1.10.4", "debug": "^4.3.2", "enquirer": "^2.3.6", - "eventemitter2": "^6.4.3", + "eventemitter2": "6.4.7", "execa": "4.1.0", "executable": "^4.1.1", "extract-zip": "2.0.1", @@ -32331,9 +32331,9 @@ } }, "eventemitter2": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.5.tgz", - "integrity": "sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "events": { diff --git a/package.json b/package.json index 5e179fb7c..a036bf705 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "css-loader": "5.2.7", "css-minimizer-webpack-plugin": "1.3.0", "css-modules-require-hook": "4.2.3", - "cypress": "9.7.0", + "cypress": "11.2.0", "enzyme": "3.3.0", "enzyme-adapter-react-16": "1.7.1", "file-loader": "6.2.0",