puppeteer_tests: Convert now-deprecated waitForXPath, $x methods.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-09-09 20:37:50 -07:00
committed by Anders Kaseorg
parent c8f346b5e5
commit 5ea44bc4ee
8 changed files with 25 additions and 30 deletions

View File

@@ -42,12 +42,12 @@ async function test_change_new_stream_notifications_setting(page: Page): Promise
).val() === "rome",
);
const rome_in_dropdown = await page.waitForXPath(
'//*[@id="realm_notifications_stream_id_widget"]//*[@class="dropdown-list-body"]/li[1]',
const rome_in_dropdown = await page.waitForSelector(
'xpath///*[@id="realm_notifications_stream_id_widget"]//*[@class="dropdown-list-body"]/li[1]',
{visible: true},
);
assert.ok(rome_in_dropdown);
await (rome_in_dropdown as ElementHandle<Element>).click();
await rome_in_dropdown.click();
await submit_notifications_stream_settings(page);