Browse Source

test(misc): re-alignment & optimizations

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3773/head
Raju Udava 2 years ago
parent
commit
58ce61a4db
  1. 1072
      .github/workflows/ci-cd.yml
  2. 24
      scripts/cypress/integration/common/6d_language_validation.js
  3. 10
      scripts/cypress/integration/common/6f_attachments.js
  4. 14
      scripts/cypress/integration/common/6g_base_share.js
  5. 3
      scripts/cypress/integration/common/8a_webhook.js
  6. 25
      scripts/cypress/integration/test/pg-restMisc.js
  7. 22
      scripts/cypress/integration/test/restMisc.js
  8. 26
      scripts/cypress/integration/test/xcdb-restMisc.js

1072
.github/workflows/ci-cd.yml

File diff suppressed because it is too large Load Diff

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

@ -1,3 +1,5 @@
import { projectsPage } from "../../support/page_objects/navigation";
const { mainPage } = require("../../support/page_objects/mainPage");
const { loginPage } = require("../../support/page_objects/navigation");
const { roles } = require("../../support/page_objects/projectConstants");
@ -22,15 +24,21 @@ export const genTest = (apiType, dbType) => {
});
after(() => {
cy.restoreLocalStorage();
cy.get(".nc-menu-accounts").should("exist").click();
cy.getActiveMenu(".nc-dropdown-user-accounts-menu")
.find(".ant-dropdown-menu-item")
.eq(1)
.click();
// // sign out
// //
// cy.restoreLocalStorage();
// cy.get(".nc-menu-accounts").should("exist").click();
// cy.getActiveMenu(".nc-dropdown-user-accounts-menu")
// .find(".ant-dropdown-menu-item")
// .eq(1)
// .click();
//
// cy.wait(5000);
// cy.get('button:contains("SIGN")').should("exist");
// cy.saveLocalStorage();
cy.wait(5000);
cy.get('button:contains("SIGN")').should("exist");
cy.restoreLocalStorage();
projectsPage.openConfiguredProject(apiType, dbType);
cy.saveLocalStorage();
});

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

@ -6,11 +6,9 @@ export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(apiType, dbType)) return;
describe(`${apiType.toUpperCase()} Columns of type attachment`, () => {
before(() => {
loginPage.loginAndOpenProject(apiType, dbType);
cy.openTableTab("Country", 25);
cy.saveLocalStorage();
});
// before(() => {
// // loginPage.loginAndOpenProject(apiType, dbType);
// });
beforeEach(() => {
cy.restoreLocalStorage();
@ -49,6 +47,8 @@ export const genTest = (apiType, dbType) => {
});
it(`Add column of type attachments`, () => {
cy.openTableTab("Country", 25);
mainPage.addColumnWithType("testAttach", "Attachment", "Country");
for (let i = 4; i <= 6; i++) {

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

@ -56,12 +56,12 @@ export const genTest = (apiType, dbType) => {
};
describe(`${apiType.toUpperCase()} Base VIEW share`, () => {
before(() => {
// loginPage.loginAndOpenProject(apiType, dbType);
cy.restoreLocalStorage();
cy.openTableTab("Country", 25);
cy.saveLocalStorage();
});
// before(() => {
// // loginPage.loginAndOpenProject(apiType, dbType);
// cy.restoreLocalStorage();
// cy.openTableTab("Country", 25);
// cy.saveLocalStorage();
// });
beforeEach(() => {
cy.restoreLocalStorage();
@ -72,6 +72,8 @@ export const genTest = (apiType, dbType) => {
});
it(`Generate base share URL`, () => {
cy.openTableTab("Country", 25);
// click SHARE
cy.get(".nc-share-base:visible").should("exist").click();

3
scripts/cypress/integration/common/8a_webhook.js

@ -246,7 +246,8 @@ export const genTest = (apiType, dbType) => {
if (!isTestSuiteActive(apiType, dbType)) return;
describe(`Webhook`, () => {
before(() => {
loginPage.loginAndOpenProject(apiType, dbType);
// loginPage.loginAndOpenProject(apiType, dbType);
cy.restoreLocalStorage();
cy.createTable("Temp");
cy.saveLocalStorage();
});

25
scripts/cypress/integration/test/pg-restMisc.js

@ -14,22 +14,35 @@ const t8a = require("../common/8a_webhook");
const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(apiType, dbType);
// Sakila Ext DB project creation
t01.genTest(apiType, dbType);
// Download CSV
t6b.genTest(apiType, dbType);
t6d.genTest(apiType, dbType);
// i18n: language validation suffice to be done in REST MySQL suite
// t6d.genTest(apiType, dbType);
// Swagger API
// exclude@ncv2 t6c.genTest(apiType, dbType);
// Attachment cell
t6f.genTest(apiType, dbType);
t6g.genTest(apiType, dbType);
// webhook tests
// ERD:
// t9b.genTest(apiType, dbType);
// Webhook tests
t8a.genTest(apiType, dbType);
// **deletes created project, hence place it @ end
// Base share (viewer, editor), iFrame tests
t6g.genTest(apiType, dbType);
// Project operations: Delete
t6e.genTest(apiType, dbType);
// intended to keep this after earlier project deletion
// creates project using excel & deletes it
// Create project from Excel
t7a.genTest(apiType, dbType);
};

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

@ -15,25 +15,35 @@ const {
const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(apiType, dbType);
// Sakila Ext DB project creation
t01.genTest(apiType, dbType);
// Download CSV
t6b.genTest(apiType, dbType);
// i18n
t6d.genTest(apiType, dbType);
// Swagger API
// exclude@ncv2 t6c.genTest(apiType, dbType);
// Attachment cell
t6f.genTest(apiType, dbType);
// ERD
t9b.genTest(apiType, dbType);
t6g.genTest(apiType, dbType);
// webhook tests
// Webhook tests
t8a.genTest(apiType, dbType);
// **deletes created project, hence place it @ end
// Base share (viewer, editor), iFrame tests
t6g.genTest(apiType, dbType);
// Project operations: Delete
t6e.genTest(apiType, dbType);
// intended to keep this after earlier project deletion
// creates project using excel & deletes it
// Create project from Excel
t7a.genTest(apiType, dbType);
};

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

@ -12,25 +12,39 @@ let t8a = require("../common/8a_webhook");
const {
setCurrentMode,
} = require("../../support/page_objects/projectConstants");
const t9b = require("../common/9b_ERD");
const nocoTestSuite = (apiType, dbType) => {
setCurrentMode(apiType, dbType);
// Sakila Ext DB project creation
t01.genTest(apiType, dbType);
// Download CSV
t6b.genTest(apiType, dbType);
t6d.genTest(apiType, dbType);
// i18n: language validation suffice to be done in REST MySQL suite
// t6d.genTest(apiType, dbType);
// Swagger API
// exclude@ncv2 t6c.genTest(apiType, dbType);
// Attachment cell
t6f.genTest(apiType, dbType);
t6g.genTest(apiType, dbType);
// webhook tests
// ERD:
// t9b.genTest(apiType, dbType);
// Webhook tests
t8a.genTest(apiType, dbType);
// **deletes created project, hence place it @ end
// Base share (viewer, editor), iFrame tests
t6g.genTest(apiType, dbType);
// Project operations: Delete
t6e.genTest(apiType, dbType);
// intended to keep this after earlier project deletion
// creates project using excel & deletes it
// Create project from Excel
t7a.genTest(apiType, dbType);
};

Loading…
Cancel
Save