Browse Source

chore: change cypress-v2 to cypress

pull/3497/head
Wing-Kam Wong 2 years ago
parent
commit
7f73b99470
  1. 14
      scripts/cypress/cypress.json
  2. 4
      scripts/cypress/integration/common/6g_base_share.js
  3. 4
      scripts/cypress/integration/common/7a_create_project_from_excel.js
  4. 6
      scripts/cypress/plugins/index.js

14
scripts/cypress/cypress.json

@ -41,12 +41,12 @@
"sharedBase": "https://airtable.com/shr4z0qmh6dg5s3eB"
}
},
"fixturesFolder": "scripts/cypress-v2/fixtures",
"integrationFolder": "scripts/cypress-v2/integration",
"pluginsFile": "scripts/cypress-v2/plugins/index.js",
"screenshotsFolder": "scripts/cypress-v2/screenshots",
"videosFolder": "scripts/cypress-v2/videos",
"downloadsFolder": "scripts/cypress-v2/downloads",
"supportFile": "scripts/cypress-v2/support/index.js",
"fixturesFolder": "scripts/cypress/fixtures",
"integrationFolder": "scripts/cypress/integration",
"pluginsFile": "scripts/cypress/plugins/index.js",
"screenshotsFolder": "scripts/cypress/screenshots",
"videosFolder": "scripts/cypress/videos",
"downloadsFolder": "scripts/cypress/downloads",
"supportFile": "scripts/cypress/support/index.js",
"chromeWebSecurity": false
}

4
scripts/cypress/integration/common/6g_base_share.js

@ -113,7 +113,7 @@ style="background: transparent; "></iframe>
</html>
`;
cy.writeFile(
"scripts/cypress-v2/fixtures/sampleFiles/iFrame.html",
"scripts/cypress/fixtures/sampleFiles/iFrame.html",
htmlFile
);
});
@ -156,7 +156,7 @@ style="background: transparent; "></iframe>
// https://docs.cypress.io/api/commands/visit#Prefixes
it("Generate & verify embed HTML IFrame", {baseUrl: null}, () => {
let filePath = "scripts/cypress-v2/fixtures/sampleFiles/iFrame.html";
let filePath = "scripts/cypress/fixtures/sampleFiles/iFrame.html";
cy.log(filePath);
cy.visit(filePath, {baseUrl: null});

4
scripts/cypress/integration/common/7a_create_project_from_excel.js

@ -75,14 +75,14 @@ export const genTest = (apiType, dbType) => {
cy.wait(1000);
cy.task("readSheetList", {
file: `./scripts/cypress-v2/fixtures/${filepath}`,
file: `./scripts/cypress/fixtures/${filepath}`,
}).then((rows) => {
cy.log(rows);
sheetList = rows;
});
cy.task("readXlsx", {
file: `./scripts/cypress-v2/fixtures/${filepath}`,
file: `./scripts/cypress/fixtures/${filepath}`,
sheet: "Sheet2",
}).then((rows) => {
cy.log(rows);

6
scripts/cypress/plugins/index.js

@ -29,7 +29,7 @@ module.exports = (on, config) => {
copyFile() {
console.log("copyFile", __dirname)
return new Promise((resolve, reject) => {
copyFile("./scripts/cypress-v2/fixtures/quickTest/noco_0_91_7.db", "./packages/nocodb/noco.db", (err) => {
copyFile("./scripts/cypress/fixtures/quickTest/noco_0_91_7.db", "./packages/nocodb/noco.db", (err) => {
if(err) {
console.log(err)
return reject(err)
@ -129,7 +129,7 @@ function _sqliteExecReturnValue(query) {
// open the database
console.log("Current directory: " + process.cwd());
let db = new sqlite3.Database(
"./scripts/cypress-v2/fixtures/sqlite-sakila/sakila.db",
"./scripts/cypress/fixtures/sqlite-sakila/sakila.db",
sqlite3.OPEN_READWRITE,
(err) => {
if (err) {
@ -157,7 +157,7 @@ function _sqliteExec(query) {
// open the database
console.log("Current directory: " + process.cwd());
let db = new sqlite3.Database(
"./scripts/cypress-v2/fixtures/sqlite-sakila/sakila.db",
"./scripts/cypress/fixtures/sqlite-sakila/sakila.db",
sqlite3.OPEN_READWRITE,
(err) => {
if (err) {

Loading…
Cancel
Save