Files
novalon-website/e2e/nav-dropdown.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

26 lines
1.2 KiB
TypeScript

import { test, expect } from '@playwright/test';
test('主导航产品下拉菜单可在 hover 时展开', async ({ page }) => {
await page.goto('/', { waitUntil: 'domcontentloaded' });
const productsButton = page.locator('nav[aria-label="主导航"] button:has-text("产品")');
await expect(productsButton).toHaveAttribute('aria-expanded', 'false');
await productsButton.hover();
await expect(productsButton).toHaveAttribute('aria-expanded', 'true');
await expect(page.locator('text=企业套装').first()).toBeVisible();
await expect(page.locator('text=ERP 管理系统').first()).toBeVisible();
});
test('主导航解决方案下拉菜单可在 hover 时展开', async ({ page }) => {
await page.goto('/', { waitUntil: 'domcontentloaded' });
const solutionsButton = page.locator('nav[aria-label="主导航"] button:has-text("解决方案")');
await expect(solutionsButton).toHaveAttribute('aria-expanded', 'false');
await solutionsButton.hover();
await expect(solutionsButton).toHaveAttribute('aria-expanded', 'true');
await expect(page.locator('text=行业解决方案').first()).toBeVisible();
await expect(page.locator('text=制造业').first()).toBeVisible();
});