Remove waitForTimeout usage from the clearInput helper function
We should wait until the input field's value is actually empty instead of waiting for a fixed time (which could lead to intermittent failures).
This commit is contained in:
parent
4866686749
commit
3f51da147c
@ -115,8 +115,9 @@ async function clearInput(page, selector) {
|
|||||||
await page.click(selector);
|
await page.click(selector);
|
||||||
await kbSelectAll(page);
|
await kbSelectAll(page);
|
||||||
await page.keyboard.press("Backspace");
|
await page.keyboard.press("Backspace");
|
||||||
// eslint-disable-next-line no-restricted-syntax
|
await page.waitForFunction(
|
||||||
await waitForTimeout(10);
|
`document.querySelector('${selector}').value === ""`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSelector(id) {
|
function getSelector(id) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user