Browse Source

refactor: test/cypress variable clean-up

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/1165/head
Raju Udava 3 years ago
parent
commit
916dcf46fa
  1. 14
      scripts/cypress/integration/common/00_pre_configurations.js
  2. 6
      scripts/cypress/integration/common/1a_table_operations.js
  3. 6
      scripts/cypress/integration/common/1b_table_column_operations.js
  4. 6
      scripts/cypress/integration/common/1c_sql_view.js
  5. 6
      scripts/cypress/integration/common/1d_table_view_drag_drop_reorder.js
  6. 6
      scripts/cypress/integration/common/1e_meta_sync.js
  7. 6
      scripts/cypress/integration/common/2a_table_with_belongs_to_colulmn.js
  8. 6
      scripts/cypress/integration/common/2b_table_with_m2m_column.js
  9. 6
      scripts/cypress/integration/common/3a_filter_sort_fields_operations.js
  10. 6
      scripts/cypress/integration/common/3b_formula_column.js
  11. 6
      scripts/cypress/integration/common/3c_lookup_column.js
  12. 6
      scripts/cypress/integration/common/3d_rollup_column.js
  13. 6
      scripts/cypress/integration/common/4a_table_view_grid_gallery_form.js
  14. 6
      scripts/cypress/integration/common/4b_table_view_share.js
  15. 6
      scripts/cypress/integration/common/4c_form_view_detailed.js
  16. 6
      scripts/cypress/integration/common/4d_table_view_grid_locked.js
  17. 6
      scripts/cypress/integration/common/4e_form_view_share.js
  18. 8
      scripts/cypress/integration/common/4f_grid_view_share.js
  19. 10
      scripts/cypress/integration/common/5a_user_role.js
  20. 6
      scripts/cypress/integration/common/6b_downloadCsv.js
  21. 12
      scripts/cypress/integration/common/6c_swagger_api.js
  22. 4
      scripts/cypress/integration/common/6d_language_validation.js
  23. 14
      scripts/cypress/integration/common/6e_project_operations.js
  24. 10
      scripts/cypress/integration/common/6f_attachments.js
  25. 10
      scripts/cypress/integration/common/6g_base_share.js
  26. 8
      scripts/cypress/integration/common/7a_create_project_from_excel.js
  27. 8
      scripts/cypress/integration/test/explicitLogin.js
  28. 20
      scripts/cypress/integration/test/gqlMisc.js
  29. 12
      scripts/cypress/integration/test/gqlRoles.js
  30. 30
      scripts/cypress/integration/test/gqlTableOps.js
  31. 20
      scripts/cypress/integration/test/gqlViews.js
  32. 48
      scripts/cypress/integration/test/masterSuiteGql.js
  33. 48
      scripts/cypress/integration/test/masterSuiteRest.js
  34. 22
      scripts/cypress/integration/test/restMisc.js
  35. 12
      scripts/cypress/integration/test/restRoles.js
  36. 30
      scripts/cypress/integration/test/restTableOps.js
  37. 20
      scripts/cypress/integration/test/restViews.js
  38. 20
      scripts/cypress/integration/test/xcdb-gqlMisc.js
  39. 12
      scripts/cypress/integration/test/xcdb-gqlRoles.js
  40. 30
      scripts/cypress/integration/test/xcdb-gqlTableOps.js
  41. 20
      scripts/cypress/integration/test/xcdb-gqlViews.js
  42. 22
      scripts/cypress/integration/test/xcdb-restMisc.js
  43. 12
      scripts/cypress/integration/test/xcdb-restRoles.js
  44. 30
      scripts/cypress/integration/test/xcdb-restTableOps.js
  45. 20
      scripts/cypress/integration/test/xcdb-restViews.js

14
scripts/cypress/integration/common/00_pre_configurations.js

@ -157,8 +157,8 @@ function prepareSqliteQuery(projId) {
return sqliteQuery; return sqliteQuery;
} }
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`Project pre-configurations`, () => { describe(`Project pre-configurations`, () => {
it("Admin SignUp", () => { it("Admin SignUp", () => {
cy.task("log", "This will be output to the terminal"); cy.task("log", "This will be output to the terminal");
@ -182,7 +182,7 @@ export const genTest = (type, xcdb) => {
projectsPage.createProject(proj.basic, proj.config); projectsPage.createProject(proj.basic, proj.config);
} }
if (xcdb) { if (dbType) {
// store base URL- to re-visit and delete form view later // store base URL- to re-visit and delete form view later
let projId; let projId;
cy.url() cy.url()
@ -223,14 +223,14 @@ export const genTest = (type, xcdb) => {
// if (isTestSuiteActive('rest', false)) createProject(staticProjects.externalREST) // if (isTestSuiteActive('rest', false)) createProject(staticProjects.externalREST)
// if (isTestSuiteActive('graphql', false)) createProject(staticProjects.externalGQL) // if (isTestSuiteActive('graphql', false)) createProject(staticProjects.externalGQL)
if ("rest" == type) { if ("rest" == apiType) {
if (true == xcdb) { if (true == dbType) {
createProject(staticProjects.sampleREST); createProject(staticProjects.sampleREST);
} else { } else {
createProject(staticProjects.externalREST); createProject(staticProjects.externalREST);
} }
} else if ("graphql" == type) { } else if ("graphql" == apiType) {
if (true == xcdb) { if (true == dbType) {
createProject(staticProjects.sampleGQL); createProject(staticProjects.sampleGQL);
} else { } else {
createProject(staticProjects.externalGQL); createProject(staticProjects.externalGQL);

6
scripts/cypress/integration/common/1a_table_operations.js

@ -1,10 +1,10 @@
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
import { mainPage } from "../../support/page_objects/mainPage"; import { mainPage } from "../../support/page_objects/mainPage";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${xcdb ? "Meta - " : ""}${type.toUpperCase()} api - Table`, () => { describe(`${dbType ? "Meta - " : ""}${apiType.toUpperCase()} api - Table`, () => {
before(() => { before(() => {
cy.get(".mdi-close").click({ multiple: true }); cy.get(".mdi-close").click({ multiple: true });
}); });

6
scripts/cypress/integration/common/1b_table_column_operations.js

@ -4,8 +4,8 @@ import {
isXcdb, isXcdb,
} from "../../support/page_objects/projectConstants"; } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
function addNewRow(index, cellValue) { function addNewRow(index, cellValue) {
cy.get(".nc-add-new-row-btn:visible").should("exist"); cy.get(".nc-add-new-row-btn:visible").should("exist");
@ -20,7 +20,7 @@ export const genTest = (type, xcdb) => {
mainPage.getCell("Title", index).contains(cellValue).should("exist"); mainPage.getCell("Title", index).contains(cellValue).should("exist");
} }
describe(`${type.toUpperCase()} api - Table Column`, () => { describe(`${apiType.toUpperCase()} api - Table Column`, () => {
const name = "tablex"; const name = "tablex";
const colName = "column_name_a"; const colName = "column_name_a";
const updatedColName = "updated_column_name"; const updatedColName = "updated_column_name";

6
scripts/cypress/integration/common/1c_sql_view.js

@ -4,10 +4,10 @@ import {
} from "../../support/page_objects/projectConstants"; } from "../../support/page_objects/projectConstants";
import { mainPage } from "../../support/page_objects/mainPage"; import { mainPage } from "../../support/page_objects/mainPage";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} SQL Views`, () => { describe(`${apiType.toUpperCase()} SQL Views`, () => {
// Run once before test- create project (rest/graphql) // Run once before test- create project (rest/graphql)
// //
before(() => { before(() => {

6
scripts/cypress/integration/common/1d_table_view_drag_drop_reorder.js

@ -4,10 +4,10 @@ import {
getProjectString, getProjectString,
} from "../../support/page_objects/projectConstants"; } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} Table/view drag-drop reorder`, () => { describe(`${apiType.toUpperCase()} Table/view drag-drop reorder`, () => {
function validateTreeField(index, tblName) { function validateTreeField(index, tblName) {
cy.get(`:nth-child(${index}) > .v-list-item__title > .caption`) cy.get(`:nth-child(${index}) > .v-list-item__title > .caption`)
.contains(tblName) .contains(tblName)

6
scripts/cypress/integration/common/1e_meta_sync.js

@ -7,14 +7,14 @@ import {
isXcdb, isXcdb,
} from "../../support/page_objects/projectConstants"; } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
let projPrefix = `sakila.`; let projPrefix = `sakila.`;
let dbCmd = `queryDb`; let dbCmd = `queryDb`;
let tblDisplayPrefix = ``; let tblDisplayPrefix = ``;
describe(`${type.toUpperCase()} api - Meta Sync`, () => { describe(`${apiType.toUpperCase()} api - Meta Sync`, () => {
// Run once before test- create project (rest/graphql) // Run once before test- create project (rest/graphql)
// //
before(() => { before(() => {

6
scripts/cypress/integration/common/2a_table_with_belongs_to_colulmn.js

@ -1,9 +1,9 @@
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - Table: belongs to, link record`, () => { describe(`${apiType.toUpperCase()} api - Table: belongs to, link record`, () => {
before(() => { before(() => {
cy.openTableTab("Country", 25); cy.openTableTab("Country", 25);
}); });

6
scripts/cypress/integration/common/2b_table_with_m2m_column.js

@ -1,9 +1,9 @@
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - M2M Column validation`, () => { describe(`${apiType.toUpperCase()} api - M2M Column validation`, () => {
before(() => { before(() => {
cy.openTableTab("Actor", 25); cy.openTableTab("Actor", 25);
}); });

6
scripts/cypress/integration/common/3a_filter_sort_fields_operations.js

@ -1,10 +1,10 @@
import { mainPage } from "../../support/page_objects/mainPage"; import { mainPage } from "../../support/page_objects/mainPage";
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - Filter, Fields, Sort`, () => { describe(`${apiType.toUpperCase()} api - Filter, Fields, Sort`, () => {
before(() => { before(() => {
// open country table // open country table
cy.openTableTab("Country", 25); cy.openTableTab("Country", 25);

6
scripts/cypress/integration/common/3b_formula_column.js

@ -3,10 +3,10 @@ import {
isXcdb, isXcdb,
} from "../../support/page_objects/projectConstants"; } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - FORMULA`, () => { describe(`${apiType.toUpperCase()} api - FORMULA`, () => {
// Run once before test- create project (rest/graphql) // Run once before test- create project (rest/graphql)
// //
before(() => { before(() => {

6
scripts/cypress/integration/common/3c_lookup_column.js

@ -1,9 +1,9 @@
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - LookUp column`, () => { describe(`${apiType.toUpperCase()} api - LookUp column`, () => {
// to retrieve few v-input nodes from their label // to retrieve few v-input nodes from their label
// //
const fetchParentFromLabel = (label) => { const fetchParentFromLabel = (label) => {

6
scripts/cypress/integration/common/3d_rollup_column.js

@ -1,9 +1,9 @@
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - RollUp column`, () => { describe(`${apiType.toUpperCase()} api - RollUp column`, () => {
// to retrieve few v-input nodes from their label // to retrieve few v-input nodes from their label
// //
const fetchParentFromLabel = (label) => { const fetchParentFromLabel = (label) => {

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

@ -1,9 +1,9 @@
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - Table views: Create/Edit/Delete`, () => { describe(`${apiType.toUpperCase()} api - Table views: Create/Edit/Delete`, () => {
const name = "Test" + Date.now(); const name = "Test" + Date.now();
// Run once before test- create project (rest/graphql) // Run once before test- create project (rest/graphql)

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

@ -29,10 +29,10 @@ const generateLinkWithPwd = () => {
}); });
}; };
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - Shared VIEWs (GRID)`, () => { describe(`${apiType.toUpperCase()} api - Shared VIEWs (GRID)`, () => {
// Run once before test- create project (rest/graphql) // Run once before test- create project (rest/graphql)
// //
before(() => { before(() => {

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

@ -3,10 +3,10 @@ import { mainPage } from "../../support/page_objects/mainPage";
let formViewURL; let formViewURL;
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - FORM view`, () => { describe(`${apiType.toUpperCase()} api - FORM view`, () => {
const name = "Test" + Date.now(); const name = "Test" + Date.now();
// Run once before test- create project (rest/graphql) // Run once before test- create project (rest/graphql)

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

@ -1,10 +1,10 @@
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
import { mainPage } from "../../support/page_objects/mainPage"; import { mainPage } from "../../support/page_objects/mainPage";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - Lock view`, () => { describe(`${apiType.toUpperCase()} api - Lock view`, () => {
// Run once before test- create project (rest/graphql) // Run once before test- create project (rest/graphql)
// //
before(() => { before(() => {

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

@ -3,10 +3,10 @@ import { mainPage } from "../../support/page_objects/mainPage";
let storedURL = ""; let storedURL = "";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - FORM view (Share)`, () => { describe(`${apiType.toUpperCase()} api - FORM view (Share)`, () => {
const name = "Test" + Date.now(); const name = "Test" + Date.now();
// Run once before test- create project (rest/graphql) // Run once before test- create project (rest/graphql)

8
scripts/cypress/integration/common/4f_grid_view_share.js

@ -11,8 +11,8 @@ let storedURL = "";
// 5: default (country table): for update row/column validation // 5: default (country table): for update row/column validation
let viewURL = {}; let viewURL = {};
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
const generateViewLink = (viewName) => { const generateViewLink = (viewName) => {
// click on share view // click on share view
@ -39,7 +39,7 @@ export const genTest = (type, xcdb) => {
}); });
}; };
describe(`${type.toUpperCase()} api - GRID view (Share)`, () => { describe(`${apiType.toUpperCase()} api - GRID view (Share)`, () => {
// Run once before test- create project (rest/graphql) // Run once before test- create project (rest/graphql)
// //
before(() => { before(() => {
@ -344,7 +344,7 @@ export const genTest = (type, xcdb) => {
viewTest("grid"); viewTest("grid");
}); });
describe(`${type.toUpperCase()} api - Grid view/ row-column update verification`, () => { describe(`${apiType.toUpperCase()} api - Grid view/ row-column update verification`, () => {
before(() => { before(() => {
// Address table has belongs to, has many & many-to-many // Address table has belongs to, has many & many-to-many
cy.openTableTab("Country", 25); cy.openTableTab("Country", 25);

10
scripts/cypress/integration/common/5a_user_role.js

@ -16,8 +16,8 @@ import {
_accessControl, _accessControl,
} from "../spec/roleValidation.spec"; } from "../spec/roleValidation.spec";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe("Static user creations (different roles)", () => { describe("Static user creations (different roles)", () => {
// beforeEach(() => { // beforeEach(() => {
@ -98,12 +98,12 @@ export const genTest = (type, xcdb) => {
cy.url({ timeout: 6000 }).should("contain", "#/project"); cy.url({ timeout: 6000 }).should("contain", "#/project");
if (xcdb) { if (dbType) {
if ("rest" == type) if ("rest" == apiType)
projectsPage.openProject(staticProjects.sampleREST.basic.name); projectsPage.openProject(staticProjects.sampleREST.basic.name);
else projectsPage.openProject(staticProjects.sampleGQL.basic.name); else projectsPage.openProject(staticProjects.sampleGQL.basic.name);
} else { } else {
if ("rest" == type) if ("rest" == apiType)
projectsPage.openProject(staticProjects.externalREST.basic.name); projectsPage.openProject(staticProjects.externalREST.basic.name);
else else
projectsPage.openProject(staticProjects.externalGQL.basic.name); projectsPage.openProject(staticProjects.externalGQL.basic.name);

6
scripts/cypress/integration/common/6b_downloadCsv.js

@ -2,10 +2,10 @@ import { mainPage } from "../../support/page_objects/mainPage";
import { loginPage } from "../../support/page_objects/navigation"; import { loginPage } from "../../support/page_objects/navigation";
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} Upload/ Download CSV`, () => { describe(`${apiType.toUpperCase()} Upload/ Download CSV`, () => {
before(() => { before(() => {
// loginPage.loginAndOpenProject(type) // loginPage.loginAndOpenProject(type)
cy.openTableTab("Country", 25); cy.openTableTab("Country", 25);

12
scripts/cypress/integration/common/6c_swagger_api.js

@ -3,12 +3,12 @@ import { mainPage } from "../../support/page_objects/mainPage";
import { roles } from "../../support/page_objects/projectConstants"; import { roles } from "../../support/page_objects/projectConstants";
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} : API List - Test preparation`, () => { describe(`${apiType.toUpperCase()} : API List - Test preparation`, () => {
before(() => { before(() => {
loginPage.loginAndOpenProject(type, xcdb); loginPage.loginAndOpenProject(apiType, dbType);
}); });
it("Open project & record swagger URL, AuthToken", () => { it("Open project & record swagger URL, AuthToken", () => {
@ -20,7 +20,7 @@ export const genTest = (type, xcdb) => {
// [GQL] http://localhost:8080/nc/externalgql_dgwx/v1/graphql // [GQL] http://localhost:8080/nc/externalgql_dgwx/v1/graphql
const projectName = url.split("/")[5].split("?")[0]; const projectName = url.split("/")[5].split("?")[0];
let swaggerURL = ``; let swaggerURL = ``;
if ("rest" == type) { if ("rest" == apiType) {
swaggerURL = `http://localhost:8080/nc/${projectName}/db/swagger`; swaggerURL = `http://localhost:8080/nc/${projectName}/db/swagger`;
} else { } else {
swaggerURL = `http://localhost:8080/nc/${projectName}/v1/graphql`; swaggerURL = `http://localhost:8080/nc/${projectName}/v1/graphql`;
@ -37,7 +37,7 @@ export const genTest = (type, xcdb) => {
}); });
}); });
if ("rest" == type) { if ("rest" == apiType) {
describe(`Swagger page, base verification`, () => { describe(`Swagger page, base verification`, () => {
// returns swagger button intended for // returns swagger button intended for
// //

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

@ -3,8 +3,8 @@ const { loginPage } = require("../../support/page_objects/navigation");
const { roles } = require("../../support/page_objects/projectConstants"); const { roles } = require("../../support/page_objects/projectConstants");
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`Language support`, () => { describe(`Language support`, () => {
before(() => { before(() => {
//loginPage.signIn(roles.owner.credentials) //loginPage.signIn(roles.owner.credentials)

14
scripts/cypress/integration/common/6e_project_operations.js

@ -2,9 +2,9 @@ import { loginPage } from "../../support/page_objects/navigation";
import { isXcdb, roles } from "../../support/page_objects/projectConstants"; import { isXcdb, roles } from "../../support/page_objects/projectConstants";
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
describe(`${type.toUpperCase()} Project operations`, () => { describe(`${apiType.toUpperCase()} Project operations`, () => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
before(() => { before(() => {
loginPage.signIn(roles.owner.credentials); loginPage.signIn(roles.owner.credentials);
@ -12,7 +12,7 @@ export const genTest = (type, xcdb) => {
it("Stop Project", () => { it("Stop Project", () => {
//cy.visit('./#/projects') //cy.visit('./#/projects')
cy.get(`.nc-${type}-project-row .mdi-stop-circle-outline`, { cy.get(`.nc-${apiType}-project-row .mdi-stop-circle-outline`, {
timeout: 10000, timeout: 10000,
}) })
.should("exist") .should("exist")
@ -26,7 +26,7 @@ export const genTest = (type, xcdb) => {
it("Start Project", () => { it("Start Project", () => {
//cy.visit('./#/projects') //cy.visit('./#/projects')
cy.get(`.nc-${type}-project-row .mdi-play-circle-outline`, { cy.get(`.nc-${apiType}-project-row .mdi-play-circle-outline`, {
timeout: 10000, timeout: 10000,
}) })
.should("exist") .should("exist")
@ -41,7 +41,7 @@ export const genTest = (type, xcdb) => {
it("Restart Project", () => { it("Restart Project", () => {
if (!isXcdb()) { if (!isXcdb()) {
//cy.visit('./#/projects') //cy.visit('./#/projects')
cy.get(`.nc-${type}-project-row .mdi-restart`, { timeout: 10000 }) cy.get(`.nc-${apiType}-project-row .mdi-restart`, { timeout: 10000 })
.should("exist") .should("exist")
.last() .last()
.invoke("show") .invoke("show")
@ -54,7 +54,7 @@ export const genTest = (type, xcdb) => {
it("Delete Project", () => { it("Delete Project", () => {
//cy.visit('./#/projects') //cy.visit('./#/projects')
cy.get(`.nc-${type}-project-row .mdi-delete-circle-outline`, { cy.get(`.nc-${apiType}-project-row .mdi-delete-circle-outline`, {
timeout: 10000, timeout: 10000,
}) })
.should("exist") .should("exist")

10
scripts/cypress/integration/common/6f_attachments.js

@ -2,12 +2,12 @@ import { mainPage } from "../../support/page_objects/mainPage";
import { loginPage } from "../../support/page_objects/navigation"; import { loginPage } from "../../support/page_objects/navigation";
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} Columns of type attachment`, () => { describe(`${apiType.toUpperCase()} Columns of type attachment`, () => {
before(() => { before(() => {
loginPage.loginAndOpenProject(type, xcdb); loginPage.loginAndOpenProject(apiType, dbType);
cy.openTableTab("Country", 25); cy.openTableTab("Country", 25);
}); });
@ -91,7 +91,7 @@ export const genTest = (type, xcdb) => {
it(`Filter column which contain only attachments, download CSV`, () => { it(`Filter column which contain only attachments, download CSV`, () => {
// come back to main window // come back to main window
loginPage.loginAndOpenProject(type, xcdb); loginPage.loginAndOpenProject(apiType, dbType);
cy.openTableTab("Country", 25); cy.openTableTab("Country", 25);
mainPage.filterField("testAttach", "is not null", null); mainPage.filterField("testAttach", "is not null", null);

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

@ -13,8 +13,8 @@ import {
let linkText = ""; let linkText = "";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
const permissionValidation = (roleType) => { const permissionValidation = (roleType) => {
it(`${roleType}: Visit base shared URL`, () => { it(`${roleType}: Visit base shared URL`, () => {
@ -50,7 +50,7 @@ export const genTest = (type, xcdb) => {
}); });
}; };
describe(`${type.toUpperCase()} Base VIEW share`, () => { describe(`${apiType.toUpperCase()} Base VIEW share`, () => {
it(`Generate base share URL`, () => { it(`Generate base share URL`, () => {
// click SHARE // click SHARE
cy.get(".nc-topright-menu").find(".nc-menu-share").click(); cy.get(".nc-topright-menu").find(".nc-menu-share").click();
@ -97,7 +97,7 @@ style="background: transparent; "></iframe>
permissionValidation("viewer"); permissionValidation("viewer");
it("Update to EDITOR base share link", () => { it("Update to EDITOR base share link", () => {
loginPage.loginAndOpenProject(type, xcdb); loginPage.loginAndOpenProject(apiType, dbType);
// click SHARE // click SHARE
cy.get(".nc-topright-menu").find(".nc-menu-share").click(); cy.get(".nc-topright-menu").find(".nc-menu-share").click();
@ -117,7 +117,7 @@ style="background: transparent; "></iframe>
cy.frameLoaded(".nc-embed"); cy.frameLoaded(".nc-embed");
// for GQL- additionally close GQL Client window // for GQL- additionally close GQL Client window
if (type === "graphql") { if (apiType === "graphql") {
cy.iframe().find(`[title="Graphql Client"] > button.mdi-close`).click(); cy.iframe().find(`[title="Graphql Client"] > button.mdi-close`).click();
} }

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

@ -63,8 +63,8 @@ let UrlFileExpectedData = {
// 12: ['dateTime', 'DateTime'] // 12: ['dateTime', 'DateTime']
// } // }
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`Import from excel`, () => { describe(`Import from excel`, () => {
before(() => { before(() => {
@ -198,7 +198,7 @@ export const genTest = (type, xcdb) => {
// delete project once all operations are completed // delete project once all operations are completed
mainPage.toolBarTopLeft(mainPage.HOME).click(); mainPage.toolBarTopLeft(mainPage.HOME).click();
cy.get(`.nc-${type}-project-row .mdi-delete-circle-outline`, { cy.get(`.nc-${apiType}-project-row .mdi-delete-circle-outline`, {
timeout: 10000, timeout: 10000,
}) })
.should("exist") .should("exist")
@ -307,7 +307,7 @@ export const genTest = (type, xcdb) => {
after(() => { after(() => {
// delete project once all operations are completed // delete project once all operations are completed
mainPage.toolBarTopLeft(mainPage.HOME).click(); mainPage.toolBarTopLeft(mainPage.HOME).click();
cy.get(`.nc-${type}-project-row .mdi-delete-circle-outline`, { cy.get(`.nc-${apiType}-project-row .mdi-delete-circle-outline`, {
timeout: 10000, timeout: 10000,
}) })
.should("exist") .should("exist")

8
scripts/cypress/integration/test/explicitLogin.js

@ -1,14 +1,14 @@
import { loginPage } from "../../support/page_objects/navigation"; import { loginPage } from "../../support/page_objects/navigation";
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; import { isTestSuiteActive } from "../../support/page_objects/projectConstants";
export const genTest = (type, xcdb) => { export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(type, xcdb)) return; if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${type.toUpperCase()} api - Login & Open project`, () => { describe(`${apiType.toUpperCase()} api - Login & Open project`, () => {
// Run once before test- create project (rest/graphql) // Run once before test- create project (rest/graphql)
// //
before(() => { before(() => {
loginPage.loginAndOpenProject(type, xcdb); loginPage.loginAndOpenProject(apiType, dbType);
// open a table to work on views // open a table to work on views
// //

20
scripts/cypress/integration/test/gqlMisc.js

@ -14,21 +14,21 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t6b.genTest(type, xcdb); t6b.genTest(apiType, dbType);
t6c.genTest(type, xcdb); t6c.genTest(apiType, dbType);
t6d.genTest(type, xcdb); t6d.genTest(apiType, dbType);
t6f.genTest(type, xcdb); t6f.genTest(apiType, dbType);
t6g.genTest(type, xcdb); t6g.genTest(apiType, dbType);
// **deletes created project, hence place it @ end // **deletes created project, hence place it @ end
t6e.genTest(type, xcdb); t6e.genTest(apiType, dbType);
}; };
nocoTestSuite("graphql", false); nocoTestSuite("graphql", false);

12
scripts/cypress/integration/test/gqlRoles.js

@ -10,16 +10,16 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t5a.genTest(type, xcdb); t5a.genTest(apiType, dbType);
t5b.genTest(type, xcdb); t5b.genTest(apiType, dbType);
}; };
nocoTestSuite("graphql", false); nocoTestSuite("graphql", false);

30
scripts/cypress/integration/test/gqlTableOps.js

@ -19,25 +19,25 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
if (0 == executionMode) { if (0 == executionMode) {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t1a.genTest(type, xcdb); t1a.genTest(apiType, dbType);
t1b.genTest(type, xcdb); t1b.genTest(apiType, dbType);
t1c.genTest(type, xcdb); t1c.genTest(apiType, dbType);
t1d.genTest(type, xcdb); t1d.genTest(apiType, dbType);
t1e.genTest(type, xcdb); t1e.genTest(apiType, dbType);
t2a.genTest(type, xcdb); t2a.genTest(apiType, dbType);
t2b.genTest(type, xcdb); t2b.genTest(apiType, dbType);
t3a.genTest(type, xcdb); t3a.genTest(apiType, dbType);
t3b.genTest(type, xcdb); t3b.genTest(apiType, dbType);
t3c.genTest(type, xcdb); t3c.genTest(apiType, dbType);
t3d.genTest(type, xcdb); t3d.genTest(apiType, dbType);
}; };
nocoTestSuite("graphql", false); nocoTestSuite("graphql", false);

20
scripts/cypress/integration/test/gqlViews.js

@ -14,20 +14,20 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t4a.genTest(type, xcdb); t4a.genTest(apiType, dbType);
t4b.genTest(type, xcdb); t4b.genTest(apiType, dbType);
t4c.genTest(type, xcdb); t4c.genTest(apiType, dbType);
t4d.genTest(type, xcdb); t4d.genTest(apiType, dbType);
t4e.genTest(type, xcdb); t4e.genTest(apiType, dbType);
t4f.genTest(type, xcdb); t4f.genTest(apiType, dbType);
}; };
nocoTestSuite("graphql", false); nocoTestSuite("graphql", false);

48
scripts/cypress/integration/test/masterSuiteGql.js

@ -26,35 +26,35 @@ let t6e = require("../common/6e_project_operations");
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t00.genTest(type, xcdb); t00.genTest(apiType, dbType);
} }
t1a.genTest(type, xcdb); t1a.genTest(apiType, dbType);
t1b.genTest(type, xcdb); t1b.genTest(apiType, dbType);
// merged with t1b: t1c.genTest(type, xcdb) // merged with t1b: t1c.genTest(apiType, dbType)
t2a.genTest(type, xcdb); t2a.genTest(apiType, dbType);
t2b.genTest(type, xcdb); t2b.genTest(apiType, dbType);
t3a.genTest(type, xcdb); t3a.genTest(apiType, dbType);
t3b.genTest(type, xcdb); t3b.genTest(apiType, dbType);
t3c.genTest(type, xcdb); t3c.genTest(apiType, dbType);
t3d.genTest(type, xcdb); t3d.genTest(apiType, dbType);
t4a.genTest(type, xcdb); t4a.genTest(apiType, dbType);
t4b.genTest(type, xcdb); t4b.genTest(apiType, dbType);
t4c.genTest(type, xcdb); t4c.genTest(apiType, dbType);
t4d.genTest(type, xcdb); t4d.genTest(apiType, dbType);
t4e.genTest(type, xcdb); t4e.genTest(apiType, dbType);
t4f.genTest(type, xcdb); t4f.genTest(apiType, dbType);
t5a.genTest(type, xcdb); t5a.genTest(apiType, dbType);
t5b.genTest(type, xcdb); t5b.genTest(apiType, dbType);
// merged with t1a: t6a.genTest(type, xcdb) // merged with t1a: t6a.genTest(apiType, dbType)
t6c.genTest(type, xcdb); t6c.genTest(apiType, dbType);
t6d.genTest(type, xcdb); t6d.genTest(apiType, dbType);
// **deletes created project, hence place it @ end // **deletes created project, hence place it @ end
t6e.genTest(type, xcdb); t6e.genTest(apiType, dbType);
}; };
// nocoTestSuite('rest', false) // nocoTestSuite('rest', false)

48
scripts/cypress/integration/test/masterSuiteRest.js

@ -26,35 +26,35 @@ let t6e = require("../common/6e_project_operations");
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t00.genTest(type, xcdb); t00.genTest(apiType, dbType);
} }
t1a.genTest(type, xcdb); t1a.genTest(apiType, dbType);
t1b.genTest(type, xcdb); t1b.genTest(apiType, dbType);
// merged with t1b: t1c.genTest(type, xcdb) // merged with t1b: t1c.genTest(apiType, dbType)
t2a.genTest(type, xcdb); t2a.genTest(apiType, dbType);
t2b.genTest(type, xcdb); t2b.genTest(apiType, dbType);
t3a.genTest(type, xcdb); t3a.genTest(apiType, dbType);
t3b.genTest(type, xcdb); t3b.genTest(apiType, dbType);
t3c.genTest(type, xcdb); t3c.genTest(apiType, dbType);
t3d.genTest(type, xcdb); t3d.genTest(apiType, dbType);
t4a.genTest(type, xcdb); t4a.genTest(apiType, dbType);
t4b.genTest(type, xcdb); t4b.genTest(apiType, dbType);
t4c.genTest(type, xcdb); t4c.genTest(apiType, dbType);
t4d.genTest(type, xcdb); t4d.genTest(apiType, dbType);
t4e.genTest(type, xcdb); t4e.genTest(apiType, dbType);
t4f.genTest(type, xcdb); t4f.genTest(apiType, dbType);
t5a.genTest(type, xcdb); t5a.genTest(apiType, dbType);
t5b.genTest(type, xcdb); t5b.genTest(apiType, dbType);
// merged with t1a: t6a.genTest(type, xcdb) // merged with t1a: t6a.genTest(apiType, dbType)
t6c.genTest(type, xcdb); t6c.genTest(apiType, dbType);
t6d.genTest(type, xcdb); t6d.genTest(apiType, dbType);
// **deletes created project, hence place it @ end // **deletes created project, hence place it @ end
t6e.genTest(type, xcdb); t6e.genTest(apiType, dbType);
}; };
nocoTestSuite("rest", false); nocoTestSuite("rest", false);

22
scripts/cypress/integration/test/restMisc.js

@ -15,25 +15,25 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t6b.genTest(type, xcdb); t6b.genTest(apiType, dbType);
t6d.genTest(type, xcdb); t6d.genTest(apiType, dbType);
t6c.genTest(type, xcdb); t6c.genTest(apiType, dbType);
t6f.genTest(type, xcdb); t6f.genTest(apiType, dbType);
t6g.genTest(type, xcdb); t6g.genTest(apiType, dbType);
// **deletes created project, hence place it @ end // **deletes created project, hence place it @ end
t6e.genTest(type, xcdb); t6e.genTest(apiType, dbType);
// intended to keep this after earlier project deletion // intended to keep this after earlier project deletion
// creates project using excel & deletes it // creates project using excel & deletes it
t7a.genTest(type, xcdb); t7a.genTest(apiType, dbType);
}; };
nocoTestSuite("rest", false); nocoTestSuite("rest", false);

12
scripts/cypress/integration/test/restRoles.js

@ -10,16 +10,16 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t5a.genTest(type, xcdb); t5a.genTest(apiType, dbType);
t5b.genTest(type, xcdb); t5b.genTest(apiType, dbType);
}; };
nocoTestSuite("rest", false); nocoTestSuite("rest", false);

30
scripts/cypress/integration/test/restTableOps.js

@ -19,25 +19,25 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t1a.genTest(type, xcdb); t1a.genTest(apiType, dbType);
t1b.genTest(type, xcdb); t1b.genTest(apiType, dbType);
t1c.genTest(type, xcdb); t1c.genTest(apiType, dbType);
t1d.genTest(type, xcdb); t1d.genTest(apiType, dbType);
t1e.genTest(type, xcdb); t1e.genTest(apiType, dbType);
t2a.genTest(type, xcdb); t2a.genTest(apiType, dbType);
t2b.genTest(type, xcdb); t2b.genTest(apiType, dbType);
t3a.genTest(type, xcdb); t3a.genTest(apiType, dbType);
t3b.genTest(type, xcdb); t3b.genTest(apiType, dbType);
t3c.genTest(type, xcdb); t3c.genTest(apiType, dbType);
t3d.genTest(type, xcdb); t3d.genTest(apiType, dbType);
}; };
nocoTestSuite("rest", false); nocoTestSuite("rest", false);

20
scripts/cypress/integration/test/restViews.js

@ -14,20 +14,20 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t4a.genTest(type, xcdb); t4a.genTest(apiType, dbType);
t4b.genTest(type, xcdb); t4b.genTest(apiType, dbType);
t4c.genTest(type, xcdb); t4c.genTest(apiType, dbType);
t4d.genTest(type, xcdb); t4d.genTest(apiType, dbType);
t4e.genTest(type, xcdb); t4e.genTest(apiType, dbType);
t4f.genTest(type, xcdb); t4f.genTest(apiType, dbType);
}; };
nocoTestSuite("rest", false); nocoTestSuite("rest", false);

20
scripts/cypress/integration/test/xcdb-gqlMisc.js

@ -14,21 +14,21 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t6b.genTest(type, xcdb); t6b.genTest(apiType, dbType);
t6c.genTest(type, xcdb); t6c.genTest(apiType, dbType);
t6d.genTest(type, xcdb); t6d.genTest(apiType, dbType);
t6f.genTest(type, xcdb); t6f.genTest(apiType, dbType);
t6g.genTest(type, xcdb); t6g.genTest(apiType, dbType);
// **deletes created project, hence place it @ end // **deletes created project, hence place it @ end
t6e.genTest(type, xcdb); t6e.genTest(apiType, dbType);
}; };
nocoTestSuite("graphql", true); nocoTestSuite("graphql", true);

12
scripts/cypress/integration/test/xcdb-gqlRoles.js

@ -10,16 +10,16 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t5a.genTest(type, xcdb); t5a.genTest(apiType, dbType);
t5b.genTest(type, xcdb); t5b.genTest(apiType, dbType);
}; };
nocoTestSuite("graphql", true); nocoTestSuite("graphql", true);

30
scripts/cypress/integration/test/xcdb-gqlTableOps.js

@ -19,25 +19,25 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t1a.genTest(type, xcdb); t1a.genTest(apiType, dbType);
t1b.genTest(type, xcdb); t1b.genTest(apiType, dbType);
t1c.genTest(type, xcdb); t1c.genTest(apiType, dbType);
t1d.genTest(type, xcdb); t1d.genTest(apiType, dbType);
t1e.genTest(type, xcdb); t1e.genTest(apiType, dbType);
t2a.genTest(type, xcdb); t2a.genTest(apiType, dbType);
t2b.genTest(type, xcdb); t2b.genTest(apiType, dbType);
t3a.genTest(type, xcdb); t3a.genTest(apiType, dbType);
t3b.genTest(type, xcdb); t3b.genTest(apiType, dbType);
t3c.genTest(type, xcdb); t3c.genTest(apiType, dbType);
t3d.genTest(type, xcdb); t3d.genTest(apiType, dbType);
}; };
nocoTestSuite("graphql", true); nocoTestSuite("graphql", true);

20
scripts/cypress/integration/test/xcdb-gqlViews.js

@ -14,20 +14,20 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t4a.genTest(type, xcdb); t4a.genTest(apiType, dbType);
t4b.genTest(type, xcdb); t4b.genTest(apiType, dbType);
t4c.genTest(type, xcdb); t4c.genTest(apiType, dbType);
t4d.genTest(type, xcdb); t4d.genTest(apiType, dbType);
t4e.genTest(type, xcdb); t4e.genTest(apiType, dbType);
t4f.genTest(type, xcdb); t4f.genTest(apiType, dbType);
}; };
nocoTestSuite("graphql", true); nocoTestSuite("graphql", true);

22
scripts/cypress/integration/test/xcdb-restMisc.js

@ -15,25 +15,25 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t6b.genTest(type, xcdb); t6b.genTest(apiType, dbType);
t6d.genTest(type, xcdb); t6d.genTest(apiType, dbType);
t6c.genTest(type, xcdb); t6c.genTest(apiType, dbType);
t6f.genTest(type, xcdb); t6f.genTest(apiType, dbType);
t6g.genTest(type, xcdb); t6g.genTest(apiType, dbType);
// **deletes created project, hence place it @ end // **deletes created project, hence place it @ end
t6e.genTest(type, xcdb); t6e.genTest(apiType, dbType);
// intended to keep this after earlier project deletion // intended to keep this after earlier project deletion
// creates project using excel & deletes it // creates project using excel & deletes it
t7a.genTest(type, xcdb); t7a.genTest(apiType, dbType);
}; };
nocoTestSuite("rest", true); nocoTestSuite("rest", true);

12
scripts/cypress/integration/test/xcdb-restRoles.js

@ -10,16 +10,16 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t5a.genTest(type, xcdb); t5a.genTest(apiType, dbType);
t5b.genTest(type, xcdb); t5b.genTest(apiType, dbType);
}; };
nocoTestSuite("rest", true); nocoTestSuite("rest", true);

30
scripts/cypress/integration/test/xcdb-restTableOps.js

@ -19,25 +19,25 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t1a.genTest(type, xcdb); t1a.genTest(apiType, dbType);
t1b.genTest(type, xcdb); t1b.genTest(apiType, dbType);
t1c.genTest(type, xcdb); t1c.genTest(apiType, dbType);
t1d.genTest(type, xcdb); t1d.genTest(apiType, dbType);
t1e.genTest(type, xcdb); t1e.genTest(apiType, dbType);
t2a.genTest(type, xcdb); t2a.genTest(apiType, dbType);
t2b.genTest(type, xcdb); t2b.genTest(apiType, dbType);
t3a.genTest(type, xcdb); t3a.genTest(apiType, dbType);
t3b.genTest(type, xcdb); t3b.genTest(apiType, dbType);
t3c.genTest(type, xcdb); t3c.genTest(apiType, dbType);
t3d.genTest(type, xcdb); t3d.genTest(apiType, dbType);
}; };
nocoTestSuite("rest", true); nocoTestSuite("rest", true);

20
scripts/cypress/integration/test/xcdb-restViews.js

@ -14,20 +14,20 @@ const {
// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) // use 1 mode if noco.db doesnt contain user credentials (full run over GIT)
const executionMode = 1; const executionMode = 1;
const nocoTestSuite = (type, xcdb) => { const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(type, xcdb); setCurrentMode(apiType, dbType);
if (0 == executionMode) { if (0 == executionMode) {
t0.genTest(type, xcdb); t0.genTest(apiType, dbType);
} else { } else {
t01.genTest(type, xcdb); t01.genTest(apiType, dbType);
} }
t4a.genTest(type, xcdb); t4a.genTest(apiType, dbType);
t4b.genTest(type, xcdb); t4b.genTest(apiType, dbType);
t4c.genTest(type, xcdb); t4c.genTest(apiType, dbType);
t4d.genTest(type, xcdb); t4d.genTest(apiType, dbType);
t4e.genTest(type, xcdb); t4e.genTest(apiType, dbType);
t4f.genTest(type, xcdb); t4f.genTest(apiType, dbType);
}; };
nocoTestSuite("rest", true); nocoTestSuite("rest", true);

Loading…
Cancel
Save