Browse Source

test: conditional wait for expand row

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3801/head
Raju Udava 2 years ago committed by braks
parent
commit
d467fff3a5
  1. 3
      scripts/cypress/integration/common/1b_table_column_operations.js
  2. 7
      scripts/cypress/integration/common/4g_table_view_expanded_form.js
  3. 3
      scripts/cypress/integration/common/8a_webhook.js

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

@ -143,6 +143,9 @@ export const genTest = (apiType, dbType) => {
.trigger("mouseover", { force: true }); .trigger("mouseover", { force: true });
cy.get(".nc-row-expand").click({ force: true }); cy.get(".nc-row-expand").click({ force: true });
// wait for page render to complete
cy.get('button:contains("Save row"):visible').should("exist");
cy.get(".nc-expand-col-Title") cy.get(".nc-expand-col-Title")
.find(".nc-cell > input") .find(".nc-cell > input")
.should("exist") .should("exist")

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

@ -31,10 +31,10 @@ export const genTest = (apiType, dbType) => {
// open a table to work on views // open a table to work on views
// //
cy.openTableTab('Country', 25); cy.openTableTab("Country", 25);
clear = Cypress.LocalStorage.clear; clear = Cypress.LocalStorage.clear;
Cypress.LocalStorage.clear = () => {} Cypress.LocalStorage.clear = () => {};
}); });
beforeEach(() => { beforeEach(() => {
@ -91,6 +91,9 @@ export const genTest = (apiType, dbType) => {
// click on first row-expand if grid & first card if its gallery // click on first row-expand if grid & first card if its gallery
if (viewType === "grid") { if (viewType === "grid") {
cy.get(".nc-row-expand").first().click({ force: true }); cy.get(".nc-row-expand").first().click({ force: true });
// wait for page render to complete
cy.get('button:contains("Save row"):visible').should("exist");
} else if (viewType === "gallery") { } else if (viewType === "gallery") {
cy.get(".nc-gallery-container .ant-card").first().click(); cy.get(".nc-gallery-container .ant-card").first().click();
} }

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

@ -184,6 +184,9 @@ function updateRow(index, cellValue) {
.eq(index - 1) .eq(index - 1)
.click({ force: true }); .click({ force: true });
// wait for page render to complete
cy.get('button:contains("Save row"):visible').should("exist");
cy.get(".nc-expand-col-Title") cy.get(".nc-expand-col-Title")
.should("exist") .should("exist")
.find(".nc-cell > input") .find(".nc-cell > input")

Loading…
Cancel
Save