Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove waitForTimeout usage from the helper functions #17966

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions test/integration/test_utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -354,8 +355,6 @@ async function serializeBitmapDimensions(page) {
async function dragAndDropAnnotation(page, startX, startY, tX, tY) {
await page.mouse.move(startX, startY);
await page.mouse.down();
// eslint-disable-next-line no-restricted-syntax
await waitForTimeout(10);
await page.mouse.move(startX + tX, startY + tY);
await page.mouse.up();
await page.waitForSelector("#viewer:not(.noUserSelect)");
Expand Down