From c0ff53d0a6b163b3067b5e7b8bf4e4d3173ca8f2 Mon Sep 17 00:00:00 2001 From: mehulmathur16 Date: Thu, 2 May 2024 02:04:54 +0530 Subject: [PATCH 01/10] test(e2e): cypress init --- cypress.config.js | 7 + cypress/support/commands.js | 37 ++ cypress/support/e2e.js | 20 + package-lock.json | 790 +++++++++++++++++++++++++++++++++++- package.json | 1 + 5 files changed, 840 insertions(+), 15 deletions(-) create mode 100644 cypress.config.js create mode 100644 cypress/support/commands.js create mode 100644 cypress/support/e2e.js diff --git a/cypress.config.js b/cypress.config.js new file mode 100644 index 0000000000..570681517a --- /dev/null +++ b/cypress.config.js @@ -0,0 +1,7 @@ +const { defineConfig } = require('cypress') + +module.exports = defineConfig({ + e2e: { + baseUrl: 'http://localhost:4040', + }, +}) \ No newline at end of file diff --git a/cypress/support/commands.js b/cypress/support/commands.js new file mode 100644 index 0000000000..698b01a42c --- /dev/null +++ b/cypress/support/commands.js @@ -0,0 +1,37 @@ +/// +// *********************************************** +// This example commands.ts shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add('login', (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) +// +// declare global { +// namespace Cypress { +// interface Chainable { +// login(email: string, password: string): Chainable +// drag(subject: string, options?: Partial): Chainable +// dismiss(subject: string, options?: Partial): Chainable +// visit(originalFn: CommandOriginalFn, url: string, options: Partial): Chainable +// } +// } +// } \ No newline at end of file diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js new file mode 100644 index 0000000000..f80f74f8e1 --- /dev/null +++ b/cypress/support/e2e.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/e2e.ts is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands') \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b4cf475362..7c70f639b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,6 +69,7 @@ "all-node-versions": "11.0.1", "babel-loader": "9.1.2", "css-loader": "6.7.3", + "cypress": "^13.8.1", "eslint": "8.24.0", "eslint-plugin-jest": "27.0.4", "eslint-plugin-react": "7.31.8", @@ -3834,6 +3835,141 @@ "w3c-keyname": "^2.2.4" } }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@cypress/request": { + "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", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "6.10.4", + "safe-buffer": "^5.1.2", + "tough-cookie": "^4.1.3", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@cypress/request/node_modules/http-signature": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/@cypress/request/node_modules/jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "node_modules/@cypress/request/node_modules/qs": { + "version": "6.10.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", + "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/@cypress/request/node_modules/tough-cookie": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "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/@cypress/request/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/@cypress/request/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@cypress/xvfb": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", + "dev": true, + "dependencies": { + "debug": "^3.1.0", + "lodash.once": "^4.1.1" + } + }, + "node_modules/@cypress/xvfb/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -6029,6 +6165,18 @@ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, + "node_modules/@types/sinonjs__fake-timers": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true + }, + "node_modules/@types/sizzle": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz", + "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==", + "dev": true + }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -6786,6 +6934,15 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -6856,6 +7013,26 @@ "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=", "dev": true }, + "node_modules/arch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -7145,6 +7322,15 @@ "integrity": "sha512-Rnnx/4Dus6fn7fTqdeLEAn5vUll5w7/vts0RN608yFa6si/rDOUonlIIiwugHBFWjylHjxm9owoSZn71KwG4gw==", "dev": true }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/async": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", @@ -7491,6 +7677,12 @@ "node": ">= 6" } }, + "node_modules/blob-util": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", + "dev": true + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -7879,6 +8071,15 @@ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, + "node_modules/check-more-types": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -7971,19 +8172,34 @@ } }, "node_modules/cli-table3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.0.tgz", - "integrity": "sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.4.tgz", + "integrity": "sha512-Lm3L0p+/npIQWNIiyF/nAn7T5dnOwR3xNTHXYEBFBFVPXzCVNZ5lqEC/1eo/EVfpDsQ1I+TX4ORPQgp+UI0CRw==", "dev": true, "dependencies": { - "object-assign": "^4.1.0", "string-width": "^4.2.0" }, "engines": { "node": "10.* || >= 12.*" }, "optionalDependencies": { - "colors": "^1.1.2" + "@colors/colors": "1.5.0" + } + }, + "node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-width": { @@ -8280,6 +8496,15 @@ "node": "^12.20.0 || >=14" } }, + "node_modules/common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -8749,7 +8974,190 @@ "toidentifier": "1.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">= 0.6" + } + }, + "node_modules/cypress": { + "version": "13.8.1", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.8.1.tgz", + "integrity": "sha512-Uk6ovhRbTg6FmXjeZW/TkbRM07KPtvM5gah1BIMp4Y2s+i/NMxgaLw0+PbYTOdw1+egE0FP3mWRiGcRkjjmhzA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@cypress/request": "^3.0.0", + "@cypress/xvfb": "^1.2.4", + "@types/sinonjs__fake-timers": "8.1.1", + "@types/sizzle": "^2.3.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", + "bluebird": "^3.7.2", + "buffer": "^5.7.1", + "cachedir": "^2.3.0", + "chalk": "^4.1.0", + "check-more-types": "^2.24.0", + "cli-cursor": "^3.1.0", + "cli-table3": "~0.6.1", + "commander": "^6.2.1", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.4", + "enquirer": "^2.3.6", + "eventemitter2": "6.4.7", + "execa": "4.1.0", + "executable": "^4.1.1", + "extract-zip": "2.0.1", + "figures": "^3.2.0", + "fs-extra": "^9.1.0", + "getos": "^3.2.1", + "is-ci": "^3.0.1", + "is-installed-globally": "~0.4.0", + "lazy-ass": "^1.6.0", + "listr2": "^3.8.3", + "lodash": "^4.17.21", + "log-symbols": "^4.0.0", + "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.5.3", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + }, + "bin": { + "cypress": "bin/cypress" + }, + "engines": { + "node": "^16.0.0 || ^18.0.0 || >=20.0.0" + } + }, + "node_modules/cypress/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cypress/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cypress/node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cypress/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/cypress/node_modules/commander": { + "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" + } + }, + "node_modules/cypress/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/cypress/node_modules/proxy-from-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", + "dev": true + }, + "node_modules/cypress/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cypress/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/cypress/node_modules/tmp": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "dev": true, + "engines": { + "node": ">=14.14" } }, "node_modules/dashdash": { @@ -8821,6 +9229,12 @@ "node": "*" } }, + "node_modules/dayjs": { + "version": "1.11.11", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", + "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==", + "dev": true + }, "node_modules/debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -9590,6 +10004,19 @@ "node": ">=10.13.0" } }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -10497,6 +10924,12 @@ "node": ">= 0.6" } }, + "node_modules/eventemitter2": { + "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": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -10535,6 +10968,18 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/executable": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, + "dependencies": { + "pify": "^2.2.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -11559,6 +12004,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/getos": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", + "dev": true, + "dependencies": { + "async": "^3.2.0" + } + }, + "node_modules/getos/node_modules/async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "dev": true + }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -11688,6 +12148,30 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, + "node_modules/global-dirs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dev": true, + "dependencies": { + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/global-dirs/node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -12590,6 +13074,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "dependencies": { + "ci-info": "^3.2.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, "node_modules/is-core-module": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz", @@ -12655,6 +13151,22 @@ "node": ">=0.10.0" } }, + "node_modules/is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "dependencies": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -15524,6 +16036,15 @@ "node": ">= 8" } }, + "node_modules/lazy-ass": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", + "dev": true, + "engines": { + "node": "> 0.8" + } + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -15560,6 +16081,48 @@ "uc.micro": "^1.0.1" } }, + "node_modules/listr2": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", + "dev": true, + "dependencies": { + "cli-truncate": "^2.1.0", + "colorette": "^2.0.16", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rfdc": "^1.3.0", + "rxjs": "^7.5.1", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "enquirer": ">= 2.3.0 < 3" + }, + "peerDependenciesMeta": { + "enquirer": { + "optional": true + } + } + }, + "node_modules/listr2/node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -15699,6 +16262,12 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "dev": true + }, "node_modules/lodash.uniqby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz", @@ -15760,6 +16329,82 @@ "node": ">=7.0.0" } }, + "node_modules/log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-update/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -16208,9 +16853,12 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minimist-options": { "version": "4.1.0", @@ -17645,6 +18293,12 @@ "node": ">=10" } }, + "node_modules/npm/node_modules/http-cache-semantics": { + "version": "4.1.0", + "dev": true, + "inBundle": true, + "license": "BSD-2-Clause" + }, "node_modules/npm/node_modules/http-proxy-agent": { "version": "4.0.1", "dev": true, @@ -18151,9 +18805,7 @@ } }, "node_modules/npm/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.0.4", "dev": true, "inBundle": true, "license": "ISC", @@ -18763,9 +19415,7 @@ } }, "node_modules/npm/node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "version": "6.5.2", "dev": true, "inBundle": true, "license": "BSD-3-Clause", @@ -20353,6 +21003,12 @@ "node": ">=0.10.0" } }, + "node_modules/ospath": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", + "dev": true + }, "node_modules/otpauth": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/otpauth/-/otpauth-8.0.3.tgz", @@ -20770,6 +21426,15 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/pirates": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", @@ -21144,6 +21809,18 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/pretty-format": { "version": "28.1.3", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", @@ -21200,6 +21877,15 @@ "node": ">=6" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -22327,6 +23013,15 @@ "node": ">= 6" } }, + "node_modules/request-progress": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", + "dev": true, + "dependencies": { + "throttleit": "^1.0.0" + } + }, "node_modules/request-promise": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.5.tgz", @@ -22511,6 +23206,12 @@ "node": ">=0.10.0" } }, + "node_modules/rfdc": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", + "dev": true + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -23244,6 +23945,47 @@ "node": ">=8" } }, + "node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -24224,6 +24966,15 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/throttleit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.1.tgz", + "integrity": "sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -24631,6 +25382,15 @@ "node": ">= 0.8" } }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/update-browserslist-db": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", diff --git a/package.json b/package.json index 8968ab65d3..390f03aea1 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "all-node-versions": "11.0.1", "babel-loader": "9.1.2", "css-loader": "6.7.3", + "cypress": "^13.8.1", "eslint": "8.24.0", "eslint-plugin-jest": "27.0.4", "eslint-plugin-react": "7.31.8", From d3c2faf08eaaf3aef1d0076c1eef3232e7548964 Mon Sep 17 00:00:00 2001 From: mehulmathur16 Date: Fri, 3 May 2024 00:44:11 +0530 Subject: [PATCH 02/10] chore: added sample e2e tests --- .gitignore | 4 + CONTRIBUTING.md | 7 +- cypress.config.js | 1 + cypress/e2e/apps-index.cy.js | 145 ++++++++++++++++++++++++ cypress/e2e/dashboard.cy.js | 30 +++++ cypress/fixtures/example.json | 5 + cypress/utils/getDashboardConfig.js | 14 +++ package.json | 4 +- src/dashboard/Apps/AppsIndex.react.js | 5 +- src/dashboard/Dashboard.js | 2 +- src/lib/tests/e2e/dashboard.e2e.test.js | 106 ----------------- 11 files changed, 212 insertions(+), 111 deletions(-) create mode 100644 cypress/e2e/apps-index.cy.js create mode 100644 cypress/e2e/dashboard.cy.js create mode 100644 cypress/fixtures/example.json create mode 100644 cypress/utils/getDashboardConfig.js delete mode 100644 src/lib/tests/e2e/dashboard.e2e.test.js diff --git a/.gitignore b/.gitignore index cb08935ec4..fc4034a7b5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,7 @@ test_logs # visual studio code .vscode + +#cypress +cypress/screenshots +cypress/videos \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 24b41c99f4..a7d7afb13f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,8 +9,13 @@ When working on the dashboard, use `npm run dashboard` and visit `localhost:4040 When working on React components, use `npm run pig` and visit `localhost:4041` to view our component library and documentation (you can have both Dashboard and PIG running at once). The demos for each component are the primary way we test components, although there are also a small number of automated tests you can run with `npm test`. If you would like to create a new component that does not exist in the component library, use `npm run generate yourComponentName` to generate boilerplate code and quickly get started. +## Running the e2e tests +We actively welcome your pull requests, please make sure your change is tested and does not break existing tests. + +1. Start the dashboard with `npm run dashboard`. Make sure that dashboard server is running on port 4040. +2. Start Cypress Test Runner with `npm run cypress:open` or run tests once with `npm run cypress:run`. + ## Pull Requests -We actively welcome your pull requests. 1. Fork the repo and create your branch from the `alpha` branch. 2. If you've added code that should be tested, add tests. diff --git a/cypress.config.js b/cypress.config.js index 570681517a..c190c1d510 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -3,5 +3,6 @@ const { defineConfig } = require('cypress') module.exports = defineConfig({ e2e: { baseUrl: 'http://localhost:4040', + video: true, }, }) \ No newline at end of file diff --git a/cypress/e2e/apps-index.cy.js b/cypress/e2e/apps-index.cy.js new file mode 100644 index 0000000000..d7cfca941d --- /dev/null +++ b/cypress/e2e/apps-index.cy.js @@ -0,0 +1,145 @@ +import { getDashboardConfig } from '../utils/getDashboardConfig'; + +describe('Apps index', () => { + it('Redirects to app lists from root path if there are 2 or more apps', () => { + cy.intercept( + { + method: 'GET', + url: '/parse-dashboard-config.json', + }, + getDashboardConfig([ + { + appName: 'test1', + }, + { + appName: 'test2', + }, + ]), + ); + + cy.visit('/') + cy.wait(3000) + + cy + .url() + .should('match', /\/apps$/); + }); + + it('Can filter apps with search input', () => { + cy.intercept( + { + method: 'GET', + url: '/parse-dashboard-config.json', + }, + getDashboardConfig([ + { + appName: 'test1', + }, + { + appName: 'test2', + }, + ]), + ); + + cy.visit('/apps') + cy.wait(3000) + + cy + .get('[data-cy="apps-index-app"]') + .should('have.length', 2) + + cy + .get('[data-cy="apps-index-search-input"]') + .type('test1') + + cy + .get('[data-cy="apps-index-app"]') + .should('have.length', 1) + + cy + .get('[data-cy="apps-index-search-input"]') + .type('qwerty') + + cy + .get('[data-cy="apps-index-app"]') + .should('have.length', 0) + }) + + it('Can show error states in the list', () => { + cy.intercept( + { + method: 'GET', + url: '/parse-dashboard-config.json', + }, + getDashboardConfig([ + { + appName: 'test1', + }, + { + appName: 'test2', + masterKey: 'cos', + }, + { + appName: 'test3', + appId: 'cos', + }, + { + appName: 'test4', + masterKey: 'cos', + appId: 'cos', + }, + { + appName: 'test5', + serverURL: 'http://unavailablehost:1234' + }, + { + appName: 'test6', + serverURL: 'http://localhost:1337/parse2' + }, + ]), + ); + + cy.visit('/apps') + cy.wait(3000) + + cy + .get('[data-cy="apps-index-app"]') + .should('have.length', 6) + + cy + .get('[data-cy="apps-index-app"]') + .eq(0) + .find('[data-cy="apps-index-app-details"]') + .contains('Server URL: http://localhost:1337/parse') + + cy + .get('[data-cy="apps-index-app"]') + .eq(1) + .find('[data-cy="apps-index-app-details"]') + .contains('Server not reachable: unauthorized') + + cy + .get('[data-cy="apps-index-app"]') + .eq(2) + .find('[data-cy="apps-index-app-details"]') + .contains('Server not reachable: unauthorized') + + cy + .get('[data-cy="apps-index-app"]') + .eq(3) + .find('[data-cy="apps-index-app-details"]') + .contains('Server not reachable: unauthorized') + + cy + .get('[data-cy="apps-index-app"]') + .eq(4) + .find('[data-cy="apps-index-app-details"]') + .contains('Server not reachable: unable to connect to server') + + cy + .get('[data-cy="apps-index-app"]') + .eq(5) + .find('[data-cy="apps-index-app-details"]') + .contains('Server not reachable: unable to connect to server') + }); +}) \ No newline at end of file diff --git a/cypress/e2e/dashboard.cy.js b/cypress/e2e/dashboard.cy.js new file mode 100644 index 0000000000..7939261918 --- /dev/null +++ b/cypress/e2e/dashboard.cy.js @@ -0,0 +1,30 @@ + +import { getDashboardConfig } from '../utils/getDashboardConfig'; + +describe('Dashboard', () => { + it('Shows loader during loading', () => { + cy.intercept( + { + method: 'GET', + url: '/parse-dashboard-config.json', + }, + (req) => { + req.reply({ + statusCode: 200, + delay: 250, + body: getDashboardConfig([ + { + appName: 'test', + } + ]), + }) + } + ) + + cy.visit('/') + + cy.get('[data-cy="dashboard-loader"]', { + timeout: 250 + }); + }) +}) \ No newline at end of file diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json new file mode 100644 index 0000000000..02e4254378 --- /dev/null +++ b/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} diff --git a/cypress/utils/getDashboardConfig.js b/cypress/utils/getDashboardConfig.js new file mode 100644 index 0000000000..eff5530f0e --- /dev/null +++ b/cypress/utils/getDashboardConfig.js @@ -0,0 +1,14 @@ +export function getDashboardConfig(apps) { + return { + newFeaturesInLatestVersion: [], + apps: apps.map(app => ({ + serverURL: app.serverURL || "http://localhost:1337/parse", + appId: app.appId || "hello", + masterKey: app.masterKey || "world", + appName: app.appName, + iconName: app.iconName || "", + primaryBackgroundColor: app.primaryBackgroundColor || "", + secondaryBackgroundColor: app.secondaryBackgroundColor || "", + })), + }; + } \ No newline at end of file diff --git a/package.json b/package.json index 390f03aea1..d612e2ac3c 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,9 @@ "prepare": "webpack --config webpack/publish.config.js --progress", "start": "node ./Parse-Dashboard/index.js", "madge:circular": "node_modules/.bin/madge ./src --circular", - "semantic-release": "semantic-release" + "semantic-release": "semantic-release", + "cypress:open": "cypress open", + "cypress:run": "cypress run --e2e --config defaultCommandTimeout=10000" }, "bin": { "parse-dashboard": "./bin/parse-dashboard" diff --git a/src/dashboard/Apps/AppsIndex.react.js b/src/dashboard/Apps/AppsIndex.react.js index 51321ca135..10076c81ab 100644 --- a/src/dashboard/Apps/AppsIndex.react.js +++ b/src/dashboard/Apps/AppsIndex.react.js @@ -81,7 +81,7 @@ const AppCard = ({ app, icon }) => { ); return ( -
  • +
  • {icon ? ( @@ -89,7 +89,7 @@ const AppCard = ({ app, icon }) => { )} -
    +
    {app.name} {versionMessage}
    @@ -170,6 +170,7 @@ class AppsIndex extends React.Component {
    - +
    ); } diff --git a/src/lib/tests/e2e/dashboard.e2e.test.js b/src/lib/tests/e2e/dashboard.e2e.test.js deleted file mode 100644 index 0ef577323c..0000000000 --- a/src/lib/tests/e2e/dashboard.e2e.test.js +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2016-present, Parse, LLC - * All rights reserved. - * - * This source code is licensed under the license found in the LICENSE file in - * the root directory of this source tree. - */ - -jest.disableAutomock(); - -const express = require('express'); -const path = require('path'); -const spawn = require('child_process').spawn; -const ParseDashboard = require('../../../../Parse-Dashboard/app'); -const puppeteer = require('puppeteer'); - -const dashboardSettings = { - apps: [ - { - serverURL: 'http://localhost:5051/parse', - appId: 'appId', - masterKey: 'masterKey', - appName: 'MyApp', - }, - ], -}; - -// TODO: Mount parse-server -describe('dashboard e2e', () => { - it('can keep mount path on redirect', async () => { - let server; - const mount = '/dashboard'; - const launchApp = new Promise(resolve => { - const app = express(); - app.use(mount, ParseDashboard(dashboardSettings)); - server = app.listen(5051, resolve); - }); - await launchApp; - - // // Should redirect to /dashboard/apps since there are no credentials - const browser = await puppeteer.launch({ args: ['--no-sandbox'] }); - const page = await browser.newPage(); - - await page.goto(`http://localhost:5051${mount}`); - await page.waitForSelector('#browser_mount'); - expect(page.url().indexOf(`http://localhost:5051${mount}/apps`)).toBe(0); - - await page.close(); - await browser.close(); - server.close(); - }); -}); - -describe('Config options', () => { - it('should start with port option', async () => { - const result = await startParseDashboardAndGetOutput(['--port', '4041']); - expect(result).toContain('The dashboard is now available at http://0.0.0.0:4041/'); - }); - - it('should reject to start if config and other options are combined', async () => { - const args = ['--appId', '--serverURL', '--masterKey', '--appName', '--graphQLServerURL']; - - for (const arg of args) { - const result = await startParseDashboardAndGetOutput([ - '--config', - 'helloworld', - arg, - 'helloworld', - ]); - expect(result).toContain( - 'You must provide either a config file or other CLI options (appName, appId, masterKey, serverURL, and graphQLServerURL); not both.' - ); - } - }); -}); - -function startParseDashboardAndGetOutput(args) { - const timeoutInMs = 1000; - return new Promise(resolve => { - const indexFilePath = path.resolve('./Parse-Dashboard/index.js'); - const child = spawn('node', [indexFilePath, ...args], { - cwd: '.', - timeout: timeoutInMs, - }); - - let output = ''; - child.on('error', () => { - resolve(output); - }); - child.on('close', () => { - resolve(output); - }); - - if (child.stdout) { - child.stdout.on('data', data => { - output += `STDOUT: ${data}\n`; - }); - } - - if (child.stderr) { - child.stderr.on('data', data => { - output += `STDERROR: ${data}\n`; - }); - } - }); -} From 63046432c8e701151031070f3fd35d02a8f2e683 Mon Sep 17 00:00:00 2001 From: Mehul Mathur Date: Fri, 3 May 2024 12:13:50 +0000 Subject: [PATCH 03/10] fix: lint --- cypress.config.js | 2 +- cypress/.eslintrc.json | 8 ++++++ cypress/e2e/apps-index.cy.js | 2 +- cypress/e2e/dashboard.cy.js | 2 +- cypress/support/commands.js | 2 +- cypress/support/e2e.js | 2 +- cypress/utils/getDashboardConfig.js | 26 +++++++++---------- package-lock.json | 40 +++++++++++++++++++++++++++++ package.json | 1 + 9 files changed, 67 insertions(+), 18 deletions(-) create mode 100644 cypress/.eslintrc.json diff --git a/cypress.config.js b/cypress.config.js index c190c1d510..f889137818 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -5,4 +5,4 @@ module.exports = defineConfig({ baseUrl: 'http://localhost:4040', video: true, }, -}) \ No newline at end of file +}) diff --git a/cypress/.eslintrc.json b/cypress/.eslintrc.json new file mode 100644 index 0000000000..dd882e7758 --- /dev/null +++ b/cypress/.eslintrc.json @@ -0,0 +1,8 @@ +{ + "plugins": [ + "cypress" + ], + "env": { + "cypress/globals": true + } + } \ No newline at end of file diff --git a/cypress/e2e/apps-index.cy.js b/cypress/e2e/apps-index.cy.js index d7cfca941d..9a6166fa69 100644 --- a/cypress/e2e/apps-index.cy.js +++ b/cypress/e2e/apps-index.cy.js @@ -142,4 +142,4 @@ describe('Apps index', () => { .find('[data-cy="apps-index-app-details"]') .contains('Server not reachable: unable to connect to server') }); -}) \ No newline at end of file +}) diff --git a/cypress/e2e/dashboard.cy.js b/cypress/e2e/dashboard.cy.js index 7939261918..3d6773645f 100644 --- a/cypress/e2e/dashboard.cy.js +++ b/cypress/e2e/dashboard.cy.js @@ -27,4 +27,4 @@ describe('Dashboard', () => { timeout: 250 }); }) -}) \ No newline at end of file +}) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 698b01a42c..95857aea4c 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -34,4 +34,4 @@ // visit(originalFn: CommandOriginalFn, url: string, options: Partial): Chainable // } // } -// } \ No newline at end of file +// } diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index f80f74f8e1..ed5730de11 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -17,4 +17,4 @@ import './commands' // Alternatively you can use CommonJS syntax: -// require('./commands') \ No newline at end of file +// require('./commands') diff --git a/cypress/utils/getDashboardConfig.js b/cypress/utils/getDashboardConfig.js index eff5530f0e..4d936e7c19 100644 --- a/cypress/utils/getDashboardConfig.js +++ b/cypress/utils/getDashboardConfig.js @@ -1,14 +1,14 @@ export function getDashboardConfig(apps) { - return { - newFeaturesInLatestVersion: [], - apps: apps.map(app => ({ - serverURL: app.serverURL || "http://localhost:1337/parse", - appId: app.appId || "hello", - masterKey: app.masterKey || "world", - appName: app.appName, - iconName: app.iconName || "", - primaryBackgroundColor: app.primaryBackgroundColor || "", - secondaryBackgroundColor: app.secondaryBackgroundColor || "", - })), - }; - } \ No newline at end of file + return { + newFeaturesInLatestVersion: [], + apps: apps.map(app => ({ + serverURL: app.serverURL || 'http://localhost:1337/parse', + appId: app.appId || 'hello', + masterKey: app.masterKey || 'world', + appName: app.appName, + iconName: app.iconName || '', + primaryBackgroundColor: app.primaryBackgroundColor || '', + secondaryBackgroundColor: app.secondaryBackgroundColor || '', + })), + }; +} diff --git a/package-lock.json b/package-lock.json index 7c70f639b1..b86b20e7a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,6 +71,7 @@ "css-loader": "6.7.3", "cypress": "^13.8.1", "eslint": "8.24.0", + "eslint-plugin-cypress": "^3.0.3", "eslint-plugin-jest": "27.0.4", "eslint-plugin-react": "7.31.8", "http-server": "14.0.0", @@ -10336,6 +10337,45 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-plugin-cypress": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-3.0.3.tgz", + "integrity": "sha512-yrdAyBoHRCarLrlozReLAuRn/AXQPqWf7+HoXzWLFAH7ntqn1RLpBqi2Vl7Czl2Y1pWNFVpXJlFeNj5dmUslsg==", + "dev": true, + "dependencies": { + "globals": "^13.20.0" + }, + "peerDependencies": { + "eslint": ">=7 <9" + } + }, + "node_modules/eslint-plugin-cypress/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-cypress/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint-plugin-jest": { "version": "27.0.4", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.0.4.tgz", diff --git a/package.json b/package.json index d612e2ac3c..47739864ba 100644 --- a/package.json +++ b/package.json @@ -94,6 +94,7 @@ "css-loader": "6.7.3", "cypress": "^13.8.1", "eslint": "8.24.0", + "eslint-plugin-cypress": "^3.0.3", "eslint-plugin-jest": "27.0.4", "eslint-plugin-react": "7.31.8", "http-server": "14.0.0", From 7f4065dc0f038cb4b89a53ab7c7fef05f2fa7d57 Mon Sep 17 00:00:00 2001 From: Mehul Mathur Date: Fri, 3 May 2024 12:49:41 +0000 Subject: [PATCH 04/10] ci: added cypress e2e job --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ca64fd872..972372154d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,6 +149,32 @@ jobs: run: ./scripts/before_script.sh env: CI: true + check-ui: + name: UI Check + timeout-minutes: 15 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Cache Node.js modules + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node-${{ env.NODE_VERSION }}- + - name: Install dependencies + run: npm ci --ignore-scripts + - name: Test dashboard + uses: cypress-io/github-action@v5 + timeout-minutes: 10 + with: + start: npm run start + browser: chrome + wait-on: 'http://localhost:4040' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From 3abf31ee593baf452e05c657e55fb92c3354c927 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Fri, 3 May 2024 17:19:24 +0200 Subject: [PATCH 05/10] optimize workflow Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com> --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 972372154d..be4000aeee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,13 +159,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - - name: Cache Node.js modules - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ env.NODE_VERSION }}- + cache: npm - name: Install dependencies run: npm ci --ignore-scripts - name: Test dashboard From 11df53ecec529a3c3e4714fb51588f1c9f36cb7e Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Fri, 3 May 2024 17:20:02 +0200 Subject: [PATCH 06/10] Update .gitignore Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com> --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fc4034a7b5..dda6e13753 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,6 @@ test_logs # visual studio code .vscode -#cypress +# cypress cypress/screenshots cypress/videos \ No newline at end of file From 6d1e44a975dbcb7f827f43eb7afb9b506b538979 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Fri, 3 May 2024 17:30:38 +0200 Subject: [PATCH 07/10] readme refactor Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com> --- CONTRIBUTING.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a7d7afb13f..6567d0d462 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,16 +9,17 @@ When working on the dashboard, use `npm run dashboard` and visit `localhost:4040 When working on React components, use `npm run pig` and visit `localhost:4041` to view our component library and documentation (you can have both Dashboard and PIG running at once). The demos for each component are the primary way we test components, although there are also a small number of automated tests you can run with `npm test`. If you would like to create a new component that does not exist in the component library, use `npm run generate yourComponentName` to generate boilerplate code and quickly get started. -## Running the e2e tests -We actively welcome your pull requests, please make sure your change is tested and does not break existing tests. +## Running UI Tests -1. Start the dashboard with `npm run dashboard`. Make sure that dashboard server is running on port 4040. -2. Start Cypress Test Runner with `npm run cypress:open` or run tests once with `npm run cypress:run`. +1. Start the dashboard with `npm run dashboard`. Make sure that dashboard server is running on port `4040`. +2. Start the UI tests in interactive mode for debugging with `npm run cypress:open`, or run the tests silently with `npm run cypress:run`. ## Pull Requests +We welcome and appreciate your contribution to Parse Dashboard. Please keep the following in mind: + 1. Fork the repo and create your branch from the `alpha` branch. -2. If you've added code that should be tested, add tests. +2. If you've modified code, add a test. If the modification involves UI changes, add a UI test. 3. If you've changed APIs, update the documentation. 4. If you've updated/added an UI component, please add a screenshot. 5. If you've fixed an issue or added features, add what you've changed to the CHANGELOG. From 0eefe3969c34fd58fd5fc2343e60b2063552e884 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Fri, 3 May 2024 17:31:00 +0200 Subject: [PATCH 08/10] Update CONTRIBUTING.md Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6567d0d462..385526effe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ When working on the dashboard, use `npm run dashboard` and visit `localhost:4040 When working on React components, use `npm run pig` and visit `localhost:4041` to view our component library and documentation (you can have both Dashboard and PIG running at once). The demos for each component are the primary way we test components, although there are also a small number of automated tests you can run with `npm test`. If you would like to create a new component that does not exist in the component library, use `npm run generate yourComponentName` to generate boilerplate code and quickly get started. -## Running UI Tests +## UI Tests 1. Start the dashboard with `npm run dashboard`. Make sure that dashboard server is running on port `4040`. 2. Start the UI tests in interactive mode for debugging with `npm run cypress:open`, or run the tests silently with `npm run cypress:run`. From 3e70f514d33ea29c377ee560f428f1e814469278 Mon Sep 17 00:00:00 2001 From: Mehul Mathur Date: Fri, 3 May 2024 22:16:44 +0000 Subject: [PATCH 09/10] refactor: removed cypress support files --- cypress/fixtures/example.json | 5 ----- cypress/support/commands.js | 37 ----------------------------------- cypress/support/e2e.js | 20 ------------------- package-lock.json | 4 ++-- package.json | 4 ++-- 5 files changed, 4 insertions(+), 66 deletions(-) delete mode 100644 cypress/fixtures/example.json delete mode 100644 cypress/support/commands.js delete mode 100644 cypress/support/e2e.js diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json deleted file mode 100644 index 02e4254378..0000000000 --- a/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/cypress/support/commands.js b/cypress/support/commands.js deleted file mode 100644 index 95857aea4c..0000000000 --- a/cypress/support/commands.js +++ /dev/null @@ -1,37 +0,0 @@ -/// -// *********************************************** -// This example commands.ts shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) -// -// declare global { -// namespace Cypress { -// interface Chainable { -// login(email: string, password: string): Chainable -// drag(subject: string, options?: Partial): Chainable -// dismiss(subject: string, options?: Partial): Chainable -// visit(originalFn: CommandOriginalFn, url: string, options: Partial): Chainable -// } -// } -// } diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js deleted file mode 100644 index ed5730de11..0000000000 --- a/cypress/support/e2e.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/e2e.ts is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/package-lock.json b/package-lock.json index b86b20e7a3..06aa2732c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,9 +69,9 @@ "all-node-versions": "11.0.1", "babel-loader": "9.1.2", "css-loader": "6.7.3", - "cypress": "^13.8.1", + "cypress": "13.8.1", "eslint": "8.24.0", - "eslint-plugin-cypress": "^3.0.3", + "eslint-plugin-cypress": "3.0.3", "eslint-plugin-jest": "27.0.4", "eslint-plugin-react": "7.31.8", "http-server": "14.0.0", diff --git a/package.json b/package.json index 47739864ba..69def6ef70 100644 --- a/package.json +++ b/package.json @@ -92,9 +92,9 @@ "all-node-versions": "11.0.1", "babel-loader": "9.1.2", "css-loader": "6.7.3", - "cypress": "^13.8.1", + "cypress": "13.8.1", "eslint": "8.24.0", - "eslint-plugin-cypress": "^3.0.3", + "eslint-plugin-cypress": "3.0.3", "eslint-plugin-jest": "27.0.4", "eslint-plugin-react": "7.31.8", "http-server": "14.0.0", From 583f8e3e7a633878336c4b980c6ea36b494917c3 Mon Sep 17 00:00:00 2001 From: mehulmathur16 Date: Sat, 4 May 2024 03:56:50 +0530 Subject: [PATCH 10/10] chore: added no supportFile to cy. config --- cypress.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cypress.config.js b/cypress.config.js index f889137818..a7854d4435 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -4,5 +4,6 @@ module.exports = defineConfig({ e2e: { baseUrl: 'http://localhost:4040', video: true, + supportFile: false, }, })