mirror of https://github.com/zulip/zulip.git
puppeteer_test: Add missing `waitFor` to avoid occasional flakes.
This commit is contained in:
parent
6421c1d8d9
commit
812d563bd4
|
@ -59,9 +59,9 @@ async function test_keyboard_shortcuts(page: Page): Promise<void> {
|
|||
}
|
||||
|
||||
async function test_reply_by_click_prepopulates_stream_topic_names(page: Page): Promise<void> {
|
||||
const stream_message = get_last_element(
|
||||
await page.$x(get_message_xpath("Compose stream reply test")),
|
||||
);
|
||||
const stream_message_xpath = get_message_xpath("Compose stream reply test");
|
||||
await page.waitForXPath(stream_message_xpath, {visible: true});
|
||||
const stream_message = get_last_element(await page.$x(stream_message_xpath));
|
||||
// we chose only the last element make sure we don't click on any duplicates.
|
||||
await stream_message.click();
|
||||
await common.check_form_contents(page, "#send_message_form", {
|
||||
|
|
|
@ -34,6 +34,8 @@ async function navigate_to_settings(page: Page): Promise<void> {
|
|||
await page.waitForSelector("#settings_page", {visible: true});
|
||||
|
||||
await page.click("#settings_page .content-wrapper .exit");
|
||||
// Wait until the overlay is completely closed.
|
||||
await page.waitForSelector("#settings_overlay_container", {hidden: true});
|
||||
}
|
||||
|
||||
async function navigate_to_subscriptions(page: Page): Promise<void> {
|
||||
|
@ -49,6 +51,8 @@ async function navigate_to_subscriptions(page: Page): Promise<void> {
|
|||
await page.waitForSelector("#subscriptions_table", {visible: true});
|
||||
|
||||
await page.click("#subscription_overlay .exit");
|
||||
// Wait until the overlay is completely closed.
|
||||
await page.waitForSelector("#settings_overlay_container", {hidden: true});
|
||||
}
|
||||
|
||||
async function test_reload_hash(page: Page): Promise<void> {
|
||||
|
|
Loading…
Reference in New Issue