This commit is contained in:
Ibrahim committed 2024-10-04 12:16:01 -04:00
1 parent 0a9cbb7589
commit 478def8447
2 files changed
+208 -31

No files matched your search

-31
View File
@@ -459,14 +459,6 @@ window.config = {
element: '[data-cy="MPR"]',
on: 'left-start',
},
buttons: [
{
text: 'Got it!',
action() {
this.complete();
},
},
],
advanceOn: {
selector: '[data-cy="MPR"]',
event: 'click',
@@ -485,32 +477,9 @@ window.config = {
},
secondary: true,
},
{
text: 'Next',
action() {
this.next();
},
},
],
},
},
},
],
};
function waitForElement(selector, maxAttempts = 20, interval = 25) {
return new Promise(resolve => {
let attempts = 0;
const checkForElement = setInterval(() => {
const element = document.querySelector(selector);
if (element || attempts >= maxAttempts) {
clearInterval(checkForElement);
resolve();
}
attempts++;
}, interval);
});
}