From 28133a2199da6d5c46019f892f767397a49a6961 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Sun, 28 Aug 2022 09:06:26 +0530 Subject: [PATCH] test: flaky- slow down table creation process Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../integration/common/3e_duration_column.js | 2 -- scripts/cypress-v2/support/commands.js | 16 ++++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/cypress-v2/integration/common/3e_duration_column.js b/scripts/cypress-v2/integration/common/3e_duration_column.js index 2d244ac8ac..37897e915a 100644 --- a/scripts/cypress-v2/integration/common/3e_duration_column.js +++ b/scripts/cypress-v2/integration/common/3e_duration_column.js @@ -18,7 +18,6 @@ export const genTest = (apiType, dbType) => { // Run once before test- create table // before(() => { - cy.fileHook(); mainPage.tabReset(); // // kludge: wait for page load to finish @@ -31,7 +30,6 @@ export const genTest = (apiType, dbType) => { }); beforeEach(() => { - cy.fileHook(); }); after(() => { diff --git a/scripts/cypress-v2/support/commands.js b/scripts/cypress-v2/support/commands.js index 324fbf9947..43e65592c4 100644 --- a/scripts/cypress-v2/support/commands.js +++ b/scripts/cypress-v2/support/commands.js @@ -298,22 +298,22 @@ Cypress.Commands.add("getActivePicker", () => { }); Cypress.Commands.add("createTable", (name) => { - // cy.get(".nc-btn-tbl-add").click(); - - // cy.get(`[data-menu-id="addORImport"]`).click(); - // cy.getActivePopUp().contains("Add new table").should('exist').click(); - + cy.task("log", `[createTableTab] ${name}`); + cy.wait(1000); cy.get('.nc-add-new-table').should('exist').click(); - + cy.wait(1000); cy.getActiveModal().find(`input[type="text"]:visible`) .click() .clear() .type(name) - cy.getActiveModal().find("button").contains("Submit").click(); + // submit button + cy.getActiveModal().find("button.ant-btn-primary:visible").click(); + cy.wait(1000) cy.get('.xc-row-table.nc-grid').should('exist'); - cy.get('.ant-tabs-tab-active > .ant-tabs-tab-btn').contains(name).should("exist"); + // cy.get('.ant-tabs-tab-active > .ant-tabs-tab-btn').contains(name).should("exist"); cy.url().should("contain", `table/${name}`); cy.get(`.nc-project-tree-tbl-${name}`).should("exist"); + cy.wait(1000) }); Cypress.Commands.add("deleteTable", (name, dbType) => {