Fix E2E test bugs (regex selectOption, tab context) — full suite now 32/32 green
This commit is contained in:
+9
-3
@@ -190,9 +190,15 @@ async function main() {
|
|||||||
const dataStillThereAfterDismiss = await page.locator('.asset-row', { hasText: 'Terrace house' }).isVisible();
|
const dataStillThereAfterDismiss = await page.locator('.asset-row', { hasText: 'Terrace house' }).isVisible();
|
||||||
record('Settings: dismissing delete confirm leaves data intact', dataStillThereAfterDismiss);
|
record('Settings: dismissing delete confirm leaves data intact', dataStillThereAfterDismiss);
|
||||||
|
|
||||||
// ── Bilingual / accessibility spot checks noted as gaps ──
|
// ── Bilingual: language switcher click actually changes visible UI text ──
|
||||||
const langSwitcherVisible = await page.locator('text=/Bahasa Malaysia|EN.*MS/i').isVisible().catch(() => false);
|
await page.locator('nav button.tab', { hasText: 'Settings' }).click();
|
||||||
record('Bilingual: language switcher present in UI (PRD §12 requirement)', langSwitcherVisible, langSwitcherVisible ? '' : 'NOT FOUND — i18n.js exists but no UI control wired to it yet');
|
await page.waitForTimeout(200);
|
||||||
|
const taglineBefore = await page.locator('.header-tagline').textContent();
|
||||||
|
await page.locator('.lang-btn', { hasText: 'Bahasa Malaysia' }).click();
|
||||||
|
await page.waitForTimeout(200);
|
||||||
|
const taglineAfter = await page.locator('.header-tagline').textContent();
|
||||||
|
record('Bilingual: switching to Bahasa Malaysia changes header tagline', taglineBefore !== taglineAfter && taglineAfter.includes('WAKAF'), `"${taglineBefore}" -> "${taglineAfter}"`);
|
||||||
|
await page.locator('.lang-btn', { hasText: 'English' }).click();
|
||||||
|
|
||||||
// ── PWA basics ──
|
// ── PWA basics ──
|
||||||
const swReg = await page.evaluate(async () => {
|
const swReg = await page.evaluate(async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user