Browse Source

test: check if column edit modal is rendered properly

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3801/head
Raju Udava 2 years ago committed by braks
parent
commit
34b23db5ba
  1. 14
      scripts/cypress/support/page_objects/mainPage.js

14
scripts/cypress/support/page_objects/mainPage.js

@ -204,11 +204,9 @@ export class _mainPage {
}; };
addColumn = (colName, tableName) => { addColumn = (colName, tableName) => {
cy.get(".nc-column-add").click({ cy.get(".nc-column-add").click();
force: true,
});
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") .find("input.nc-column-name-input")
.should("exist") .should("exist")
.clear() .clear()
@ -223,18 +221,15 @@ export class _mainPage {
}; };
addColumnWithType = (colName, colType, tableName) => { addColumnWithType = (colName, colType, tableName) => {
cy.get(".nc-column-add").click({ cy.get(".nc-column-add").click();
force: true,
});
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") .find("input.nc-column-name-input")
.should("exist") .should("exist")
.clear() .clear()
.type(colName); .type(colName);
// change column type and verify // change column type and verify
// cy.get(".nc-column-type-input").last().click();
cy.getActiveMenu(".nc-dropdown-grid-add-column") cy.getActiveMenu(".nc-dropdown-grid-add-column")
.find(".nc-column-type-input") .find(".nc-column-type-input")
.last() .last()
@ -243,7 +238,6 @@ export class _mainPage {
.find(".ant-select-item-option") .find(".ant-select-item-option")
.contains(colType) .contains(colType)
.click(); .click();
// cy.get(".ant-btn-primary:visible").contains("Save").click();
cy.getActiveMenu(".nc-dropdown-grid-add-column") cy.getActiveMenu(".nc-dropdown-grid-add-column")
.find(".ant-btn-primary:visible") .find(".ant-btn-primary:visible")
.contains("Save") .contains("Save")

Loading…
Cancel
Save