test(e2e): align web specs with current app routes

This commit is contained in:
Ho Ngoc Hai
2026-05-04 20:11:09 +07:00
parent f112045826
commit 39156fc107
21 changed files with 334 additions and 458 deletions

View File

@@ -16,9 +16,10 @@ import { test, expect } from '@playwright/test';
test('@smoke homepage loads', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(/.+/);
// Search bar or hero section must be visible
const searchInput = page.getByRole('searchbox').or(page.getByPlaceholder(/tìm kiếm|search/i));
await expect(searchInput.first()).toBeVisible({ timeout: 10_000 });
await expect(page.locator('main')).toBeVisible({ timeout: 10_000 });
await expect(page.getByText(/GGI HCM|Top biến động giá|Khu vực xu hướng/i).first()).toBeVisible({
timeout: 10_000,
});
});
// ── Auth pages ────────────────────────────────────────────────────────────────