Skip to content

Commit

Permalink
FORMS-9362 : changes due to review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AnurudraS authored and ci-build committed Sep 26, 2023
1 parent b06b6fb commit 357ff87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui.tests/test-module/libs/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ const waitForFormInit = () => {
cy.get('form').then(($form) => {
const promise = new Cypress.Promise((resolve, reject) => {
const listener1 = e => {
if(document.querySelector("[data-cmp-adaptiveform-container-loader='"+ $form[0].id + "']").classList.contains("cmp-adaptiveform-container--loading")){
const isReady = () => {
const container = document.querySelector("[data-cmp-adaptiveform-container-loader='"+ $form[0].id + "']");
if (container &&
Expand All @@ -350,6 +351,7 @@ const waitForFormInit = () => {
}
isReady();
}
}
document.addEventListener(INIT_EVENT, listener1);
})
return promise
Expand All @@ -364,6 +366,7 @@ const waitForFormInitMultipleContiners = () => {
cy.get('form').each(($form) => {
const promise = new Cypress.Promise((resolve, reject) => {
const listener1 = e => {
if(document.querySelector("[data-cmp-adaptiveform-container-loader='"+ $form[0].id + "']").classList.contains("cmp-adaptiveform-container--loading")){
const isReady = () => {
const container = document.querySelector("[data-cmp-adaptiveform-container-loader='"+ $form[0].id + "']");
if (container &&
Expand All @@ -376,6 +379,7 @@ const waitForFormInitMultipleContiners = () => {
}
isReady();
}
}
document.addEventListener(INIT_EVENT, listener1);
})

Expand Down

0 comments on commit 357ff87

Please sign in to comment.