From 75cd140319765f68fee8ff068e29ce917ff1b4ca Mon Sep 17 00:00:00 2001 From: Raju Udava Date: Fri, 10 Dec 2021 14:08:06 +0530 Subject: [PATCH] test(cypress/stability): force click table/view names Signed-off-by: Raju Udava --- scripts/cypress/support/commands.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/cypress/support/commands.js b/scripts/cypress/support/commands.js index 3f2a607871..09934487d8 100644 --- a/scripts/cypress/support/commands.js +++ b/scripts/cypress/support/commands.js @@ -116,7 +116,7 @@ Cypress.Commands.add("openTableTab", (tn, rc) => { .find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) .should("exist") .first() - .click(); + .click({ force: true }); cy.get(".nc-project-tree") .contains(tn, { timeout: 6000 }) @@ -128,7 +128,7 @@ Cypress.Commands.add("openTableTab", (tn, rc) => { cy.get(".nc-project-tree") .find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) .first() - .click(); + .click({ force: true }); // wait for page rendering to complete if (rc != 0) { @@ -138,6 +138,7 @@ Cypress.Commands.add("openTableTab", (tn, rc) => { Cypress.Commands.add("closeTableTab", (tn) => { cy.task("log", `[closeTableTab] ${tn}`); + cy.get(`.project-tab`).contains(tn, { timeout: 10000 }).should("exist"); cy.get(`[href="#table||db||${tn}"]`).find("button.mdi-close").click(); }); @@ -303,7 +304,7 @@ Cypress.Commands.add("openViewsTab", (vn, rc) => { .find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) .should("exist") .first() - .click(); + .click({ force: true }); cy.get(".nc-project-tree") .contains(vn, { timeout: 6000 }) @@ -315,7 +316,7 @@ Cypress.Commands.add("openViewsTab", (vn, rc) => { cy.get(".nc-project-tree") .find(".v-list-item__title:contains(Tables)", { timeout: 10000 }) .first() - .click(); + .click({ force: true }); // wait for page rendering to complete if (rc != 0) { @@ -325,6 +326,7 @@ Cypress.Commands.add("openViewsTab", (vn, rc) => { Cypress.Commands.add("closeViewsTab", (vn) => { cy.task("log", `[closeViewsTab] ${vn}`); + cy.get(`.project-tab`).contains(vn, { timeout: 10000 }).should("exist"); cy.get(`[href="#view||db||${vn}"]`) .find("button.mdi-close") .click({ force: true });