Browse Source

Merge branch 'develop' into feat/kanban-view

pull/3563/head
Raju Udava 2 years ago
parent
commit
5ed1d93252
  1. 3
      scripts/cypress/integration/common/1a_table_operations.js
  2. 23
      scripts/cypress/support/commands.js

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

@ -84,6 +84,9 @@ export const genTest = (apiType, dbType) => {
// 2. Table tab name has changed // 2. Table tab name has changed
cy.get(`.ant-tabs-tab:contains('CityX'):visible`).should("exist"); cy.get(`.ant-tabs-tab:contains('CityX'):visible`).should("exist");
// Wait for Grid to render
cy.gridWait(25);
// 3. contents of the table are valid // 3. contents of the table are valid
mainPage mainPage
.getCell(`City`, 1) .getCell(`City`, 1)

23
scripts/cypress/support/commands.js

@ -163,19 +163,8 @@ Cypress.Commands.add("refreshTableTab", () => {
cy.toastWait("Tables refreshed"); cy.toastWait("Tables refreshed");
}); });
// tn: table name // Wait for grid view render
// rc: row count. validate row count if rc!=0 Cypress.Commands.add("gridWait", (rc) => {
Cypress.Commands.add("openTableTab", (tn, rc) => {
cy.task("log", `[openTableTab] ${tn} ${rc}`);
cy.get(`.nc-project-tree-tbl-${tn}`).should("exist").first().click();
// kludge to make new tab active
// cy.get('.ant-tabs-tab-btn')
// .contains(tn)
// .should('exist')
// .click();
// for some tables, linked records are not available immediately // for some tables, linked records are not available immediately
cy.wait(1000); cy.wait(1000);
@ -185,6 +174,14 @@ Cypress.Commands.add("openTableTab", (tn, rc) => {
if (rc != 0) { if (rc != 0) {
cy.get(".nc-grid-row").should("have.length", rc); cy.get(".nc-grid-row").should("have.length", rc);
} }
})
// tn: table name
// rc: row count. validate row count if rc!=0
Cypress.Commands.add("openTableTab", (tn, rc) => {
cy.task("log", `[openTableTab] ${tn} ${rc}`);
cy.get(`.nc-project-tree-tbl-${tn}`).should("exist").first().click();
cy.gridWait(rc);
}); });
Cypress.Commands.add("closeTableTab", (tn) => { Cypress.Commands.add("closeTableTab", (tn) => {

Loading…
Cancel
Save