mirror of
https://github.com/zulip/zulip.git
synced 2025-10-27 10:03:56 +00:00
e2e-tests: Replace deprecated page.waitForTimeout.
https://pptr.dev/api/puppeteer.page.waitfortimeout https://nodejs.org/api/timers.html#timerspromisessettimeoutdelay-value-options Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Anders Kaseorg
parent
303b7d6d9f
commit
77a669c15c
@@ -1,6 +1,7 @@
|
||||
import {strict as assert} from "assert";
|
||||
import "css.escape";
|
||||
import path from "path";
|
||||
import timersPromises from "timers/promises";
|
||||
|
||||
import ErrorStackParser from "error-stack-parser";
|
||||
import type {Browser, ConsoleMessage, ConsoleMessageLocation, ElementHandle, Page} from "puppeteer";
|
||||
@@ -317,7 +318,7 @@ export async function assert_compose_box_content(
|
||||
export async function wait_for_fully_processed_message(page: Page, content: string): Promise<void> {
|
||||
// Wait in parallel for the message list scroll animation, which
|
||||
// interferes with Puppeteer accurately clicking on messages.
|
||||
const scroll_delay = page.waitForTimeout(400);
|
||||
const scroll_delay = timersPromises.setTimeout(400);
|
||||
|
||||
await page.waitForFunction(
|
||||
(content: string) => {
|
||||
|
||||
Reference in New Issue
Block a user