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_test: Add wait call for linkifier table to get updated.

Riken Shahe4bbfe5eb7fc
diff --git a/frontend_tests/puppeteer_tests/realm-linkifier.ts b/frontend_tests/puppeteer_tests/realm-linkifier.ts
index 227d0134e39..0602ce3eb44 100644
--- a/frontend_tests/puppeteer_tests/realm-linkifier.ts
+++ b/frontend_tests/puppeteer_tests/realm-linkifier.ts
@@ -64,11 +64,9 @@ async function test_edit_linkifier(page: Page): Promise<void> {
await page.click(".submit-linkifier-info-change");
await page.waitForSelector("#linkifier-edit-form-modal", {hidden: true});
- await page.waitForFunction(() => $(".edit-linkifier-status").text().trim() === "Saved");
await page.waitForSelector(".linkifier_row", {visible: true});
- assert.strictEqual(
- await common.get_text_from_selector(page, ".linkifier_row span.linkifier_pattern"),
- "(?P<num>[0-9a-f]{40})",
+ await page.waitForFunction(
+ () => document.querySelector(".linkifier_pattern")?.textContent === "(?P<num>[0-9a-f]{40})",
);
assert.strictEqual(
await common.get_text_from_selector(