Skip to content

Commit 748b6c3

Browse files
committed
test(macronizer): popup regression test — dedup, honest wordlist label, tag note
Opens the currito popup and asserts three fixes landed together: Morpheus rows deduplicate to one, "Wordlist: Not found — via Morpheus" replaces the false "Found", and the RFTagger POS-vs-reading disagreement note appears.
1 parent fe9081b commit 748b6c3

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { test, expect } from "@playwright/test";
2+
3+
const PAGE = "/wiktionary_pron/macronizer.html";
4+
5+
test("popup shows RFTagger disagreement + Morpheus dedup for currito", async ({ page }) => {
6+
test.setTimeout(300_000);
7+
await page.goto(PAGE);
8+
await expect(page.locator("#macronize_btn")).toBeEnabled({ timeout: 240_000 });
9+
10+
await page.fill("#text_to_macronize", "currito");
11+
await page.click("#macronize_btn");
12+
await expect(page.locator("#resultText .ipa").first()).toBeVisible({ timeout: 120_000 });
13+
14+
await page.locator("#resultText .ipa").first().click();
15+
16+
// 1. RFTagger disagreement note
17+
const note = page.locator(".word-popup .popup-note", { hasText: /RFTagger classifies/ });
18+
await expect(note).toBeVisible({ timeout: 5000 });
19+
await expect(note).toContainText("adverb");
20+
await expect(note).toContainText("verb");
21+
22+
// 2. Morpheus rows deduped to ONE identical row
23+
const morpheusSection = page.locator(".popup-section", { hasText: "Morpheus analyses" });
24+
const rows = morpheusSection.locator("tr");
25+
await expect(rows).toHaveCount(1, { timeout: 5000 });
26+
27+
// 3. Wordlist label honest
28+
const wlLabel = page.locator(".word-popup tr", { hasText: "Wordlist:" });
29+
await expect(wlLabel).toContainText("Not found");
30+
});

0 commit comments

Comments
 (0)