Browse Source

test: wait for expand form to get loaded before access

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3801/head
Raju Udava 2 years ago committed by braks
parent
commit
11ab351d43
  1. 7
      scripts/cypress/integration/common/9a_QuickTest.js
  2. 8
      scripts/cypress/integration/spec/roleValidation.spec.js

7
scripts/cypress/integration/common/9a_QuickTest.js

@ -56,13 +56,18 @@ let cn = [
]; ];
function openWebhook(index) { function openWebhook(index) {
// http://localhost:8080/api/v1/db/meta/tables/md_dx81kkfdso115u/hooks
cy.intercept("GET", "/api/v1/db/meta/tables/*/hooks").as("getHooks");
cy.get(".nc-actions-menu-btn").should("exist").click(); cy.get(".nc-actions-menu-btn").should("exist").click();
cy.getActiveMenu(".nc-dropdown-actions-menu") cy.getActiveMenu(".nc-dropdown-actions-menu")
.find(".ant-dropdown-menu-title-content") .find(".ant-dropdown-menu-title-content")
.contains("Webhooks") .contains("Webhooks")
.click(); .click();
cy.get(".nc-hook").eq(index).click(); cy.wait("@getHooks");
cy.get(`.nc-hook:eq(${index})`).should("exist").click();
} }
// to be invoked after open // to be invoked after open

8
scripts/cypress/integration/spec/roleValidation.spec.js

@ -162,6 +162,10 @@ export function _editData(roleType, mode) {
.eq(0) .eq(0)
.trigger("mouseover", { force: true }); .trigger("mouseover", { force: true });
cy.get(".nc-row-expand").should("exist").eq(10).click({ force: true }); cy.get(".nc-row-expand").should("exist").eq(10).click({ force: true });
// wait for page render to complete
cy.get('button:contains("Save row"):visible').should("exist");
cy.getActiveDrawer(".nc-drawer-expanded-form") cy.getActiveDrawer(".nc-drawer-expanded-form")
.find("button") .find("button")
.contains("Save row") .contains("Save row")
@ -175,6 +179,10 @@ export function _editData(roleType, mode) {
// update cell contents option using row expander should be disabled // update cell contents option using row expander should be disabled
// //
cy.get(".nc-row-expand").should("exist").eq(10).click({ force: true }); cy.get(".nc-row-expand").should("exist").eq(10).click({ force: true });
// wait for page render to complete
cy.get('button:contains("Save row"):visible').should("exist");
cy.getActiveDrawer(".nc-drawer-expanded-form") cy.getActiveDrawer(".nc-drawer-expanded-form")
.find("button:disabled") .find("button:disabled")
.contains("Save row") .contains("Save row")

Loading…
Cancel
Save