From 34b23db5ba9acbbe328dfd4b5fae8e569fba5290 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Tue, 27 Sep 2022 10:23:03 +0530 Subject: [PATCH] test: check if column edit modal is rendered properly Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- scripts/cypress/support/page_objects/mainPage.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/cypress/support/page_objects/mainPage.js b/scripts/cypress/support/page_objects/mainPage.js index 73063862b6..6c51ae162a 100644 --- a/scripts/cypress/support/page_objects/mainPage.js +++ b/scripts/cypress/support/page_objects/mainPage.js @@ -204,11 +204,9 @@ export class _mainPage { }; addColumn = (colName, tableName) => { - cy.get(".nc-column-add").click({ - force: true, - }); + cy.get(".nc-column-add").click(); - cy.getActiveMenu(".nc-dropdown-grid-add-column") + cy.getActiveMenu(".nc-dropdown-grid-add-column:has(.nc-column-name-input)") .find("input.nc-column-name-input") .should("exist") .clear() @@ -223,18 +221,15 @@ export class _mainPage { }; addColumnWithType = (colName, colType, tableName) => { - cy.get(".nc-column-add").click({ - force: true, - }); + cy.get(".nc-column-add").click(); - cy.getActiveMenu(".nc-dropdown-grid-add-column") + cy.getActiveMenu(".nc-dropdown-grid-add-column:has(.nc-column-name-input)") .find("input.nc-column-name-input") .should("exist") .clear() .type(colName); // change column type and verify - // cy.get(".nc-column-type-input").last().click(); cy.getActiveMenu(".nc-dropdown-grid-add-column") .find(".nc-column-type-input") .last() @@ -243,7 +238,6 @@ export class _mainPage { .find(".ant-select-item-option") .contains(colType) .click(); - // cy.get(".ant-btn-primary:visible").contains("Save").click(); cy.getActiveMenu(".nc-dropdown-grid-add-column") .find(".ant-btn-primary:visible") .contains("Save")