mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
puppeteer_test: Add wait call for linkifier table to get updated.
This commit solves a rare flake, where the `realm _linkifier.ts` test was failing because there was no appropriate wait call for the table (`#admin_linkifiers_table`) to get updated after editing the pattern.
This commit is contained in:
parent
2015d55a17
commit
e4bbfe5eb7
@ -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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user