Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

puppeteer_lib: Fix get_element_text typing.

Anders Kaseorg7e6e98aefb00
diff --git a/frontend_tests/puppeteer_lib/common.ts b/frontend_tests/puppeteer_lib/common.ts
index e4a1e5f31d5..b30c830b9de 100644
--- a/frontend_tests/puppeteer_lib/common.ts
+++ b/frontend_tests/puppeteer_lib/common.ts
@@ -192,7 +192,9 @@ class CommonUtils {
}
async get_element_text(element: ElementHandle<Element>): Promise<string> {
- return (await element.getProperty("innerText"))!.jsonValue();
+ const text = await (await element.getProperty("innerText"))!.jsonValue();
+ assert.ok(typeof text === "string");
+ return text;
}
async get_text_from_selector(page: Page, selector: string): Promise<string> {