Upgrade Cypres to V10.3.1 (#3651)

* Remove cypress and its dependencies from root dir

* Install cypress to cypress-tests  directory

* Move cypress specs and utils

* Remove older files

* Fix package.json
This commit is contained in:
Midhun Kumar E 2022-07-25 10:15:28 +05:30 committed by GitHub
parent a68c727eae
commit cf31de35fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 9221 additions and 1428 deletions

1
cypress-tests/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/node_modules

View file

@ -0,0 +1,21 @@
const { defineConfig } = require("cypress");
module.exports = defineConfig({
execTimeout: 1800000,
defaultCommandTimeout: 30000,
requestTimeout: 10000,
pageLoadTimeout: 20000,
responseTimeout: 10000,
viewportWidth: 1200,
viewportHeight: 960,
chromeWebSecurity: true,
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);
},
baseUrl: "http://localhost:8082",
specPattern: "cypress/e2e/**/*.cy.js",
},
});

9093
cypress-tests/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
{
"name": "cypress-tests",
"version": "1.0.0",
"private": true,
"scripts": {
"cy:run": "cypress run --browser=chrome 103, --headless",
"cy:open": "cypress open --browser=chrome 103, --e2e"
},
"devDependencies": {
"@cypress/webpack-preprocessor": "^5.12.0",
"cypress": "^10.3.1"
},
"dependencies": {
"faker": "^6.6.6",
"moment": "^2.29.4"
}
}

View file

@ -1,13 +0,0 @@
{
"baseUrl": "http://localhost:8082",
"execTimeout": 1800000,
"defaultCommandTimeout": 30000,
"requestTimeout": 10000,
"pageLoadTimeout": 20000,
"responseTimeout": 10000,
"viewportWidth": 1200,
"viewportHeight": 960,
"testFiles": "**/*.spec.js",
"chromeWebSecurity": true
}

1497
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -18,12 +18,10 @@
]
},
"devDependencies": {
"@4tw/cypress-drag-drop": "^1.8.0",
"@babel/core": "^7.4.3",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-env": "^7.4.3",
"@babel/preset-react": "^7.0.0",
"@cypress/webpack-preprocessor": "^5.11.1",
"@tooljet/cli": "^0.0.12",
"babel-loader": "^8.0.5",
"eslint": "^7.25.0",
@ -38,8 +36,6 @@
"dependencies": {
"@nestjs/cli": "^8.1.0",
"@nestjs/mapped-types": "*",
"cypress": "^8.3.1",
"moment": "^2.29.4",
"ts-node": "^10.1.0"
},
"scripts": {
@ -69,8 +65,6 @@
"db:drop": "npm --prefix server run db:drop",
"deploy": "cp -a frontend/build/. public/",
"heroku-postbuild": "./heroku-postbuild.sh",
"cy:run": "cypress run --env db.name=$TEST_PG_DB,db.user=$TEST_PG_USERNAME,db.password=$TEST_PG_PASSWORD",
"cy:open": "cypress open --env db.name=$TEST_PG_DB,db.user=$TEST_PG_USERNAME,db.password=$TEST_PG_PASSWORD",
"prepare": "husky install"
}
}