mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +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 kbSelectAll(page);
|
||||
await page.keyboard.press("Backspace");
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
await waitForTimeout(10);
|
||||
await page.waitForFunction(
|
||||
`document.querySelector('${selector}').value === ""`
|
||||
);
|
||||
}
|
||||
|
||||
function getSelector(id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue