Browse Source

test(cypress/stability): force click table/view names

Signed-off-by: Raju Udava <sivadstala@gmail.com>
pull/852/head
Raju Udava 3 years ago
parent
commit
75cd140319
  1. 10
      scripts/cypress/support/commands.js

10
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 });

Loading…
Cancel
Save