diff --git a/.eslintignore b/.eslintignore index 858f9bcdaf..b65cade128 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,10 +10,10 @@ !/test !/cypress +/cypress/e2e/**/*.js +/cypress/e2e/**/*.js.map /cypress/fixtures/**/*.js /cypress/fixtures/**/*.js.map -/cypress/integration/**/*.js -/cypress/integration/**/*.js.map /cypress/pages/**/*.js /cypress/pages/**/*.js.map /cypress/screenshots diff --git a/.gitignore b/.gitignore index b3343ac7a5..bf67dbc8f7 100644 --- a/.gitignore +++ b/.gitignore @@ -20,10 +20,10 @@ coverage/ .rpt2_cache # built files +/cypress/e2e/**/*.js +/cypress/e2e/**/*.js.map /cypress/fixtures/**/*.js /cypress/fixtures/**/*.js.map -/cypress/integration/**/*.js -/cypress/integration/**/*.js.map /cypress/pages/**/*.js /cypress/pages/**/*.js.map /cypress/screenshots/ diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 0000000000..4d715b4aba --- /dev/null +++ b/cypress.config.ts @@ -0,0 +1,24 @@ +import { defineConfig } from "cypress"; + +export default defineConfig({ + env: { + SNAPSHOT_BASE_DIRECTORY: "./cypress/snapshots/base", + SNAPSHOT_DIFF_DIRECTORY: "./cypress/snapshots/diff", + }, + screenshotsFolder: "./cypress/snapshots/actual", + trashAssetsBeforeRuns: true, + viewportHeight: 1600, + viewportWidth: 1200, + e2e: { + // We've imported your old cypress plugins here. + // You may want to clean this up later by importing these. + async setupNodeEvents(on, config) { + return (await import("./cypress/plugins/index.js")).default(on, config); + }, + specPattern: [ + "cypress/e2e/visual/**/*.spec.js", + "cypress/e2e/functional/**/*.spec.js", + ], + supportFile: "cypress/support/e2e.js", + }, +}); diff --git a/cypress.json b/cypress.json deleted file mode 100644 index 6a8e6ecca4..0000000000 --- a/cypress.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "env": { - "SNAPSHOT_BASE_DIRECTORY": "./cypress/snapshots/base", - "SNAPSHOT_DIFF_DIRECTORY": "./cypress/snapshots/diff" - }, - "screenshotsFolder": "./cypress/snapshots/actual", - "trashAssetsBeforeRuns": true, - "viewportHeight": 1600, - "viewportWidth": 1200 -} diff --git a/cypress/integration/functional/clicks.spec.ts b/cypress/e2e/functional/clicks.spec.ts similarity index 99% rename from cypress/integration/functional/clicks.spec.ts rename to cypress/e2e/functional/clicks.spec.ts index b1d0203f56..29bcce722f 100644 --- a/cypress/integration/functional/clicks.spec.ts +++ b/cypress/e2e/functional/clicks.spec.ts @@ -1,6 +1,6 @@ import { VisEvent } from "../helpers"; -context("Clicks", (): void => { +context("Clicks", { testIsolation: false }, (): void => { /* * The canvas starts at 200x200 and ends at 400x400. */ diff --git a/cypress/integration/functional/directed-hierarchical-layout.spec.ts b/cypress/e2e/functional/directed-hierarchical-layout.spec.ts similarity index 56% rename from cypress/integration/functional/directed-hierarchical-layout.spec.ts rename to cypress/e2e/functional/directed-hierarchical-layout.spec.ts index a3d560edf4..eca989debe 100644 --- a/cypress/integration/functional/directed-hierarchical-layout.spec.ts +++ b/cypress/e2e/functional/directed-hierarchical-layout.spec.ts @@ -184,162 +184,145 @@ describe("Directed hierarchical layout", (): void => { }) ); - describe(name, (): void => { - it("Preparation", (): void => { - cy.visVisitUniversal(); + it(name, (): void => { + cy.visVisitUniversal(); - cy.visRun(({ network, nodes, edges }): void => { - network.setOptions({ - edges: { - arrows: { - to: true, - }, + cy.visRun(({ network, nodes, edges }): void => { + network.setOptions({ + edges: { + arrows: { + to: true, }, - layout: { - hierarchical: { - enabled: true, - sortMethod: "directed", - }, + }, + layout: { + hierarchical: { + enabled: true, + sortMethod: "directed", }, - }); - - nodes.add(data.nodes); - edges.add(data.edges); + }, }); + + nodes.add(data.nodes); + edges.add(data.edges); }); configs.forEach(({ expectedVisibleEdges, nodesToCluster }, cid): void => { const clusterDescribeName = cid === 0 ? "Without clustering" : `With ${cid} clusters`; - describe(clusterDescribeName, (): void => { - if (cid > 0) { - it("Cluster", (): void => { - cy.visRun(({ network }): void => { - network.cluster({ - clusterNodeProperties: { - label: `Cluster #${cid}`, - }, - joinCondition: ({ id }): boolean => nodesToCluster.has(id), - }); - }); + if (cid > 0) { + cy.visRun(({ network }): void => { + network.cluster({ + clusterNodeProperties: { + label: `Cluster #${cid}`, + }, + joinCondition: ({ id }): boolean => nodesToCluster.has(id), }); - } + }); + } - /* - * There's no point in testing running this test for cyclic graphs. - * Such graphs are always invalid. + /* + * There's no point in testing running this test for cyclic graphs. + * Such graphs are always invalid. + */ + if (!cyclic) { + /** + * Test that children are placed below their parents and parents + * above their children. + * + * This also tests that the required number of edges is visible on + * the canvas. Since the number is available there anyway, it can as + * well be tested. */ - if (!cyclic) { - /** - * Test that children are placed below their parents and parents - * above their children. - * - * This also tests that the required number of edges is visible on - * the canvas. Since the number is available there anyway, it can as - * well be tested. - */ - it("Hierarchical order of nodes", (): void => { - cy.visRun(({ network }): void => { - const visibleNodeIds = new Set( - Object.keys(network.getPositions()) - ); + cy.visRun(({ network }): void => { + const visibleNodeIds = new Set(Object.keys(network.getPositions())); - /* - * No matter how much ESLint think they're unnecessary, these two - * assertions are indeed necessary. - */ - const visibleEdges = Object.values( - ( - network as unknown as { - body: { - edges: { - fromId: string; - toId: string; - }[]; - }; - } - ).body.edges - ).filter( - (edge): boolean => - visibleNodeIds.has(edge.fromId) && - visibleNodeIds.has(edge.toId) - ); - - const invalidEdges = visibleEdges - .map( - ({ - fromId, - toId, - }): { - fromId: IdType; - fromPosition: Point; - toId: IdType; - toPosition: Point; - } => ({ - fromId, - fromPosition: network.getPositions([fromId])[fromId], - toId, - toPosition: network.getPositions([toId])[toId], - }) - ) - .filter(({ fromPosition, toPosition }): boolean => { - return !(fromPosition.y < toPosition.y); - }); - - expect(invalidEdges).to.deep.equal([]); - expect(visibleEdges).to.have.lengthOf(expectedVisibleEdges); - }); - }); - - /** - * Test that all levels are evenly spaced without gaps. + /* + * No matter how much ESLint think they're unnecessary, these two + * assertions are indeed necessary. */ - it("Spacing between levels", (): void => { - cy.visRun(({ network }): void => { - const levels = Array.from( - new Set( - Object.values(network.getPositions()).map( - ({ y }): number => y - ) - ) - ).sort((a, b): number => a - b); + const visibleEdges = Object.values( + ( + network as unknown as { + body: { + edges: { + fromId: string; + toId: string; + }[]; + }; + } + ).body.edges + ).filter( + (edge): boolean => + visibleNodeIds.has(edge.fromId) && visibleNodeIds.has(edge.toId) + ); - const gaps = new Array(levels.length - 1) - .fill(null) - .map((_, i): number => { - return levels[i] - levels[i + 1]; - }); - - expect( - gaps.every((gap, _i, arr): boolean => { - return gap === arr[0]; - }), - "All levels should be evenly spaced without gaps." - ).to.be.true; + const invalidEdges = visibleEdges + .map( + ({ + fromId, + toId, + }): { + fromId: IdType; + fromPosition: Point; + toId: IdType; + toPosition: Point; + } => ({ + fromId, + fromPosition: network.getPositions([fromId])[fromId], + toId, + toPosition: network.getPositions([toId])[toId], + }) + ) + .filter(({ fromPosition, toPosition }): boolean => { + return !(fromPosition.y < toPosition.y); }); - }); - } + + expect(invalidEdges).to.deep.equal([]); + expect(visibleEdges).to.have.lengthOf(expectedVisibleEdges); + }); /** - * Click through the entire network to ensure that: - * - No node is off the canvas. - * - No node is covered behind another node. - * - Each node is selected after being clicked. + * Test that all levels are evenly spaced without gaps. */ - it("Click through the network", (): void => { - cy.visStabilizeFitAndRun(({ network }): void => { - network.unselectAll(); - expect(network.getSelectedNodes()).to.deep.equal([]); + cy.visRun(({ network }): void => { + const levels = Array.from( + new Set( + Object.values(network.getPositions()).map(({ y }): number => y) + ) + ).sort((a, b): number => a - b); - const visibleNodeIds = new Set( - Object.keys(network.getPositions()).sort() - ); - for (const id of visibleNodeIds) { - cy.visClickNode(id); - } - }); + const gaps = new Array(levels.length - 1) + .fill(null) + .map((_, i): number => { + return levels[i] - levels[i + 1]; + }); + + expect( + gaps.every((gap, _i, arr): boolean => { + return gap === arr[0]; + }), + "All levels should be evenly spaced without gaps." + ).to.be.true; }); + } + + /** + * Click through the entire network to ensure that: + * - No node is off the canvas. + * - No node is covered behind another node. + * - Each node is selected after being clicked. + */ + cy.visStabilizeFitAndRun(({ network }): void => { + network.unselectAll(); + expect(network.getSelectedNodes()).to.deep.equal([]); + + const visibleNodeIds = new Set( + Object.keys(network.getPositions()).sort() + ); + for (const id of visibleNodeIds) { + cy.visClickNode(id); + } }); }); }); diff --git a/cypress/integration/functional/drags.spec.ts b/cypress/e2e/functional/drags.spec.ts similarity index 100% rename from cypress/integration/functional/drags.spec.ts rename to cypress/e2e/functional/drags.spec.ts diff --git a/cypress/integration/functional/manipulation.spec.ts b/cypress/e2e/functional/manipulation.spec.ts similarity index 100% rename from cypress/integration/functional/manipulation.spec.ts rename to cypress/e2e/functional/manipulation.spec.ts diff --git a/cypress/integration/functional/pollution.spec.ts b/cypress/e2e/functional/pollution.spec.ts similarity index 94% rename from cypress/integration/functional/pollution.spec.ts rename to cypress/e2e/functional/pollution.spec.ts index a28f3f3029..4f82b7e2f8 100644 --- a/cypress/integration/functional/pollution.spec.ts +++ b/cypress/e2e/functional/pollution.spec.ts @@ -1,4 +1,4 @@ -context("Pollution", (): void => { +context("Pollution", { testIsolation: false }, (): void => { const resultContainerIds = [ "results-before-loading", "results-after-loading", diff --git a/cypress/integration/functional/simple.spec.ts b/cypress/e2e/functional/simple.spec.ts similarity index 100% rename from cypress/integration/functional/simple.spec.ts rename to cypress/e2e/functional/simple.spec.ts diff --git a/cypress/integration/helpers/common.ts b/cypress/e2e/helpers/common.ts similarity index 100% rename from cypress/integration/helpers/common.ts rename to cypress/e2e/helpers/common.ts diff --git a/cypress/integration/helpers/index.ts b/cypress/e2e/helpers/index.ts similarity index 100% rename from cypress/integration/helpers/index.ts rename to cypress/e2e/helpers/index.ts diff --git a/cypress/integration/helpers/trees.ts b/cypress/e2e/helpers/trees.ts similarity index 100% rename from cypress/integration/helpers/trees.ts rename to cypress/e2e/helpers/trees.ts diff --git a/cypress/integration/visual/cluster-and-open.spec.ts b/cypress/e2e/visual/cluster-and-open.spec.ts similarity index 100% rename from cypress/integration/visual/cluster-and-open.spec.ts rename to cypress/e2e/visual/cluster-and-open.spec.ts diff --git a/cypress/integration/visual/fit.spec.ts b/cypress/e2e/visual/fit.spec.ts similarity index 100% rename from cypress/integration/visual/fit.spec.ts rename to cypress/e2e/visual/fit.spec.ts diff --git a/cypress/integration/visual/initial-positioning.no-fixed-no-positions.json b/cypress/e2e/visual/initial-positioning.no-fixed-no-positions.json similarity index 100% rename from cypress/integration/visual/initial-positioning.no-fixed-no-positions.json rename to cypress/e2e/visual/initial-positioning.no-fixed-no-positions.json diff --git a/cypress/integration/visual/initial-positioning.no-fixed-some-positions.json b/cypress/e2e/visual/initial-positioning.no-fixed-some-positions.json similarity index 100% rename from cypress/integration/visual/initial-positioning.no-fixed-some-positions.json rename to cypress/e2e/visual/initial-positioning.no-fixed-some-positions.json diff --git a/cypress/integration/visual/initial-positioning.some-fixed-some-positions.json b/cypress/e2e/visual/initial-positioning.some-fixed-some-positions.json similarity index 100% rename from cypress/integration/visual/initial-positioning.some-fixed-some-positions.json rename to cypress/e2e/visual/initial-positioning.some-fixed-some-positions.json diff --git a/cypress/integration/visual/initial-positioning.spec.ts b/cypress/e2e/visual/initial-positioning.spec.ts similarity index 100% rename from cypress/integration/visual/initial-positioning.spec.ts rename to cypress/e2e/visual/initial-positioning.spec.ts diff --git a/cypress/integration/visual/label-rendering.spec.ts b/cypress/e2e/visual/label-rendering.spec.ts similarity index 100% rename from cypress/integration/visual/label-rendering.spec.ts rename to cypress/e2e/visual/label-rendering.spec.ts diff --git a/cypress/integration/visual/layout-hierarchical-directed-levels.spec.ts b/cypress/e2e/visual/layout-hierarchical-directed-levels.spec.ts similarity index 100% rename from cypress/integration/visual/layout-hierarchical-directed-levels.spec.ts rename to cypress/e2e/visual/layout-hierarchical-directed-levels.spec.ts diff --git a/cypress/integration/visual/node-shapes.spec.ts b/cypress/e2e/visual/node-shapes.spec.ts similarity index 100% rename from cypress/integration/visual/node-shapes.spec.ts rename to cypress/e2e/visual/node-shapes.spec.ts diff --git a/cypress/integration/visual/selection.spec.ts b/cypress/e2e/visual/selection.spec.ts similarity index 100% rename from cypress/integration/visual/selection.spec.ts rename to cypress/e2e/visual/selection.spec.ts diff --git a/cypress/integration/visual/z-index.spec.ts b/cypress/e2e/visual/z-index.spec.ts similarity index 100% rename from cypress/integration/visual/z-index.spec.ts rename to cypress/e2e/visual/z-index.spec.ts diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js index a836da9318..5a49166e33 100644 --- a/cypress/plugins/index.js +++ b/cypress/plugins/index.js @@ -16,13 +16,13 @@ module.exports = (on, config) => { // `on` is used to hook into various events Cypress emits // `config` is the resolved Cypress config - config.testFiles = []; + config.specPattern = []; const all = !config.env.VISUAL && !config.env.FUNCTIONAL; if (all || config.env.VISUAL) { // Visual regression screenshot tests. - config.testFiles.push("visual/**/*.spec.js"); + config.specPattern.push("cypress/e2e/visual/**/*.spec.js"); config.env.failSilently = false; config.trashAssetsBeforeRuns = true; @@ -39,7 +39,7 @@ module.exports = (on, config) => { if (all || config.env.FUNCTIONAL) { // Functional tests. - config.testFiles.push("functional/**/*.spec.js"); + config.specPattern.push("cypress/e2e/functional/**/*.spec.js"); } return config; diff --git a/cypress/support/index.ts b/cypress/support/e2e.ts similarity index 100% rename from cypress/support/index.ts rename to cypress/support/e2e.ts diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json index 53569674f8..83a9a619af 100644 --- a/cypress/tsconfig.json +++ b/cypress/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "baseUrl": ".", "lib": ["esnext", "dom"], - "module": "es2015", + "module": "es2020", "outDir": ".", "target": "es2015", "types": ["cypress"] diff --git a/package-lock.json b/package-lock.json index dfbbb17826..717de1cf39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,8 +23,8 @@ "compare-versions": "5.0.3", "component-emitter": "1.3.0", "cross-env": "7.0.3", - "cypress": "9.7.0", - "cypress-visual-regression": "2.1.1", + "cypress": "13.3.0", + "cypress-visual-regression": "3.0.0", "eslint": "8.51.0", "gh-pages": "6.0.0", "husky": "8.0.3", @@ -1943,9 +1943,9 @@ } }, "node_modules/@cypress/request": { - "version": "2.88.11", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.11.tgz", - "integrity": "sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", "dev": true, "dependencies": { "aws-sign2": "~0.7.0", @@ -1961,9 +1961,9 @@ "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "~6.10.3", + "qs": "6.10.4", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", + "tough-cookie": "^4.1.3", "tunnel-agent": "^0.6.0", "uuid": "^8.3.2" }, @@ -3803,9 +3803,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "14.18.37", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.37.tgz", - "integrity": "sha512-7GgtHCs/QZrBrDzgIJnQtuSvhFSwhyYSI2uafSwZoNt1iOGhEN5fwNrQMjtONyHm9+/LoA4453jH0CMYcr06Pg==", + "version": "18.18.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.3.tgz", + "integrity": "sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA==", "dev": true }, "node_modules/@types/normalize-package-data": { @@ -5761,9 +5761,9 @@ } }, "node_modules/commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true, "engines": { "node": ">= 6" @@ -6459,15 +6459,15 @@ } }, "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": "13.3.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.3.0.tgz", + "integrity": "sha512-mpI8qcTwLGiA4zEQvTC/U1xGUezVV4V8HQCOYjlEOrVmU1etVvxOjkCXHGwrlYdZU/EPmUiWfsO3yt1o+Q2bgw==", "dev": true, "hasInstallScript": true, "dependencies": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", + "@types/node": "^18.17.5", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", @@ -6479,12 +6479,12 @@ "check-more-types": "^2.24.0", "cli-cursor": "^3.1.0", "cli-table3": "~0.6.1", - "commander": "^5.1.0", + "commander": "^6.2.1", "common-tags": "^1.8.0", "dayjs": "^1.10.4", - "debug": "^4.3.2", + "debug": "^4.3.4", "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", @@ -6497,12 +6497,13 @@ "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", - "minimist": "^1.2.6", + "minimist": "^1.2.8", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", + "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", + "semver": "^7.5.3", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", @@ -6512,13 +6513,13 @@ "cypress": "bin/cypress" }, "engines": { - "node": ">=12.0.0" + "node": "^16.0.0 || ^18.0.0 || >=20.0.0" } }, "node_modules/cypress-visual-regression": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cypress-visual-regression/-/cypress-visual-regression-2.1.1.tgz", - "integrity": "sha512-oVDBL3hEMd6luj7eYLXzaNbqKPT8e1ZDGg/mptCRlIgw/uo09zv5TRHe6eqptPuZH8qFpfG3Eijk656zP2PcZg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cypress-visual-regression/-/cypress-visual-regression-3.0.0.tgz", + "integrity": "sha512-Rn+SDZjdAL29Mmg+TORe9ez+ragBP6Ew31nWx1x3YbL9LkObpLCO08XcdAkY73/w4eKlBarmJcs6de5LrIa50A==", "dev": true, "dependencies": { "pixelmatch": "^5.2.1", @@ -6680,9 +6681,9 @@ } }, "node_modules/cypress/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -7854,9 +7855,9 @@ } }, "node_modules/eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "node_modules/eventemitter3": { @@ -8400,13 +8401,14 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" }, "funding": { @@ -8873,6 +8875,18 @@ "node": ">=6" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -9898,39 +9912,6 @@ "node": ">= 6" } }, - "node_modules/jsdom/node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsdom/node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "dev": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsdom/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -16950,7 +16931,6 @@ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", "dev": true, - "peer": true, "engines": { "node": ">= 0.6.0" } @@ -20134,16 +20114,18 @@ } }, "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { - "node": ">=0.8" + "node": ">=6" } }, "node_modules/tough-cookie/node_modules/punycode": { @@ -20155,6 +20137,15 @@ "node": ">=6" } }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/tr46": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", diff --git a/package.json b/package.json index c0511776db..a8364a4df5 100644 --- a/package.json +++ b/package.json @@ -43,11 +43,11 @@ "url": "https://opencollective.com/visjs" }, "scripts": { - "serve": "serve -l tcp://localhost:58253", + "serve": "serve -l tcp://127.0.0.1:58253", "test": "npm run test:unit && npm run test:e2e:functional && npm run test:e2e:visual", "test:e2e:functional": "cross-env CYPRESS_FUNCTIONAL=true npm run test:e2e:headless", - "test:e2e:gui": "start-server-and-test test:e2e:transpile-watch-and-serve :58253 \"cypress open\"", - "test:e2e:headless": "start-server-and-test test:e2e:transpile-and-serve :58253 \"cypress run\"", + "test:e2e:gui": "start-server-and-test test:e2e:transpile-watch-and-serve \"http://127.0.0.1:58253\" \"cypress open\"", + "test:e2e:headless": "start-server-and-test test:e2e:transpile-and-serve \"http://127.0.0.1:58253\" \"cypress run\"", "test:e2e:transpile": "tsc --project cypress", "test:e2e:transpile-and-serve": "npm run test:e2e:transpile && npm run serve", "test:e2e:transpile-and-watch": "npm run test:e2e:transpile -- --watch", @@ -116,8 +116,8 @@ "compare-versions": "5.0.3", "component-emitter": "1.3.0", "cross-env": "7.0.3", - "cypress": "9.7.0", - "cypress-visual-regression": "2.1.1", + "cypress": "13.3.0", + "cypress-visual-regression": "3.0.0", "eslint": "8.51.0", "gh-pages": "6.0.0", "husky": "8.0.3",