mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
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
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue