From 5f03087be699083ff57c788b8ac8ab347dab179b Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Tue, 27 Sep 2022 12:58:34 +0530 Subject: [PATCH] test: kludge, additional delay in column edit operations, getSettled for home page tab Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- scripts/cypress/integration/common/5a_user_role.js | 7 +++++-- scripts/cypress/support/page_objects/mainPage.js | 10 ++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/cypress/integration/common/5a_user_role.js b/scripts/cypress/integration/common/5a_user_role.js index 8ccba12e06..e52eadaf66 100644 --- a/scripts/cypress/integration/common/5a_user_role.js +++ b/scripts/cypress/integration/common/5a_user_role.js @@ -147,8 +147,11 @@ export const genTest = (apiType, dbType) => { if (roleType === "creator") { // kludge: wait for page load to finish // close team & auth tab - cy.wait(500); - cy.get("button.ant-tabs-tab-remove").should("exist").click(); + // cy.wait(500); + // cy.get("button.ant-tabs-tab-remove").should("exist").click(); + cy.getSettled("button.ant-tabs-tab-remove") + .should("be.visible") + .click(); cy.wait(500); } diff --git a/scripts/cypress/support/page_objects/mainPage.js b/scripts/cypress/support/page_objects/mainPage.js index 6c51ae162a..1b368e30ee 100644 --- a/scripts/cypress/support/page_objects/mainPage.js +++ b/scripts/cypress/support/page_objects/mainPage.js @@ -206,6 +206,8 @@ export class _mainPage { addColumn = (colName, tableName) => { cy.get(".nc-column-add").click(); + cy.wait(2000); + cy.getActiveMenu(".nc-dropdown-grid-add-column:has(.nc-column-name-input)") .find("input.nc-column-name-input") .should("exist") @@ -217,12 +219,17 @@ export class _mainPage { .should("exist") .click(); cy.toastWait(`Column created`); + + cy.wait(2000); + cy.get(`th[data-title="${colName}"]`).should("exist"); }; addColumnWithType = (colName, colType, tableName) => { cy.get(".nc-column-add").click(); + cy.wait(2000); + cy.getActiveMenu(".nc-dropdown-grid-add-column:has(.nc-column-name-input)") .find("input.nc-column-name-input") .should("exist") @@ -244,6 +251,9 @@ export class _mainPage { .click(); cy.toastWait(`Column created`); + + cy.wait(2000); + cy.get(`th[data-title="${colName}"]`).should("exist"); };