Files
novalon-website/e2e/cases-filter.spec.ts
T
zhangxiang 2653a3730c fix(regression): resolve dogfood findings across marketing, auth, e2e and docs
- Fix list-to-detail navigation on product/service/solution/case pages
- Fix soft 404 on service detail by removing (marketing)/loading.tsx and using force-dynamic
- Fix contact form submission feedback and news placeholder image handling
- Unify SSR/client authentication state in auth.ts
- Add "新闻动态" to main navigation
- Fix Playwright storageState path and Firefox footer link flakiness
- Add E2E coverage for nav dropdown, cases filter and auth token parsing
- Update visual regression baselines (desktop/tablet/mobile, chromium/webkit/firefox)
- Update README, lessons-learned and add REGRESSION_REPORT_2026-07-27.md
- Ignore .lighthouseci/ and heading-hierarchy-report.json
2026-07-27 07:39:11 +08:00

23 lines
982 B
TypeScript

import { test, expect } from '@playwright/test';
test('案例页行业筛选按钮可以正确过滤列表', async ({ page }) => {
await page.goto('/cases', { waitUntil: 'domcontentloaded' });
// 默认显示全部 6 个案例
await expect(page.locator('a[href^="/cases/"]')).toHaveCount(6);
// 点击“制造业”筛选
await page.getByRole('radio', { name: '制造业' }).click();
await expect(page.locator('a[href^="/cases/"]')).toHaveCount(1);
await expect(page.locator('text=大型制造企业 ERP 升级与数字化转型')).toBeVisible();
// 点击“贸易零售”筛选
await page.getByRole('radio', { name: '贸易零售' }).click();
await expect(page.locator('a[href^="/cases/"]')).toHaveCount(1);
await expect(page.locator('text=连锁零售全渠道数字化升级')).toBeVisible();
// 切回全部
await page.getByRole('radio', { name: '全部行业' }).click();
await expect(page.locator('a[href^="/cases/"]')).toHaveCount(6);
});