Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
puppeteer_test: Improve how we select the typeahead element.
Riken Shah49193231aa18
diff --git a/frontend_tests/puppeteer_lib/common.ts b/frontend_tests/puppeteer_lib/common.tsindex 6f256aa0dfb..7a54406ba7d 100644--- a/frontend_tests/puppeteer_lib/common.ts+++ b/frontend_tests/puppeteer_lib/common.ts@@ -482,8 +482,11 @@ class CommonUtils {await this.clear_and_type(page, field_selector, str);const entry = await page.waitForXPath(`//*[@class="typeahead dropdown-menu" and contains(@style, "display: block")]//li[contains(normalize-space(), "${item}")]//a`,+ {visible: true},);- await entry!.click();+ await page.evaluate((entry) => {+ entry.click();+ }, entry);}async wait_for_modal_to_close(page: Page): Promise<void> {