Test sticky header, navigation dropdowns (Skills/Contact/Education), click-outside-close behavior, and en/zh language toggle.
Components Under Test
components/Header.tsx — Nav, dropdowns, language toggle, terminal toggle, mobile menu
lib/LanguageContext.tsx — Language state, translations
Test Cases
Header (header.spec.ts)
Header renders with avatar image + title + subtitle
Header is sticky (stays visible on scroll)
Home button scrolls to top
"Ask Poimen" button toggles terminal state
Dropdowns
Skills dropdown opens on click
Skills dropdown shows skill categories + tags
Click outside Skills dropdown closes it
Contact dropdown opens on click
Contact section shows email + copy button
Copy button copies to clipboard (verify via navigator.clipboard)
Education dropdown opens on click
Click outside any dropdown closes it
Only one dropdown open at a time (open Skills, click Contact → Skills closes)
Language Toggle
Language toggle button visible (shows "中" or "EN")
Click toggle switches from EN to ZH
Hero title changes to Chinese text
Projects section updates to Chinese
Header nav labels update
Click toggle again returns to EN
All sections revert to English text
Mobile Menu (< 768px)
Hamburger menu icon visible on mobile
Click hamburger opens mobile menu
All nav items present in mobile menu
Language toggle works in mobile menu
Close mobile menu
Selectors Strategy
// Header
page.locator('header')page.locator('img[alt="Profile"]')// Dropdowns
page.locator('button:has-text("Skills")')page.locator('button:has-text("Contact")')page.locator('button:has-text("Education")')// Language
page.locator('button:has-text("中")')// or 'EN'
// Mobile
page.locator('button:has(svg.lucide-menu)')// hamburger icon
Acceptance
All dropdowns open/close correctly
Click-outside-close works for all 3 dropdowns
Language toggle round-trip (EN → ZH → EN) verified
Mobile menu functional at 375px viewport
## Parent
Ref: #5
Depends on: #6
## Objective
Test sticky header, navigation dropdowns (Skills/Contact/Education), click-outside-close behavior, and en/zh language toggle.
## Components Under Test
- `components/Header.tsx` — Nav, dropdowns, language toggle, terminal toggle, mobile menu
- `lib/LanguageContext.tsx` — Language state, translations
## Test Cases
### Header (`header.spec.ts`)
- [ ] Header renders with avatar image + title + subtitle
- [ ] Header is sticky (stays visible on scroll)
- [ ] Home button scrolls to top
- [ ] "Ask Poimen" button toggles terminal state
### Dropdowns
- [ ] Skills dropdown opens on click
- [ ] Skills dropdown shows skill categories + tags
- [ ] Click outside Skills dropdown closes it
- [ ] Contact dropdown opens on click
- [ ] Contact section shows email + copy button
- [ ] Copy button copies to clipboard (verify via `navigator.clipboard`)
- [ ] Education dropdown opens on click
- [ ] Click outside any dropdown closes it
- [ ] Only one dropdown open at a time (open Skills, click Contact → Skills closes)
### Language Toggle
- [ ] Language toggle button visible (shows "中" or "EN")
- [ ] Click toggle switches from EN to ZH
- [ ] Hero title changes to Chinese text
- [ ] Projects section updates to Chinese
- [ ] Header nav labels update
- [ ] Click toggle again returns to EN
- [ ] All sections revert to English text
### Mobile Menu (< 768px)
- [ ] Hamburger menu icon visible on mobile
- [ ] Click hamburger opens mobile menu
- [ ] All nav items present in mobile menu
- [ ] Language toggle works in mobile menu
- [ ] Close mobile menu
## Selectors Strategy
```ts
// Header
page.locator('header')
page.locator('img[alt="Profile"]')
// Dropdowns
page.locator('button:has-text("Skills")')
page.locator('button:has-text("Contact")')
page.locator('button:has-text("Education")')
// Language
page.locator('button:has-text("中")') // or 'EN'
// Mobile
page.locator('button:has(svg.lucide-menu)') // hamburger icon
```
## Acceptance
- All dropdowns open/close correctly
- Click-outside-close works for all 3 dropdowns
- Language toggle round-trip (EN → ZH → EN) verified
- Mobile menu functional at 375px viewport
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Parent
Ref: #5
Depends on: #6
Objective
Test sticky header, navigation dropdowns (Skills/Contact/Education), click-outside-close behavior, and en/zh language toggle.
Components Under Test
components/Header.tsx— Nav, dropdowns, language toggle, terminal toggle, mobile menulib/LanguageContext.tsx— Language state, translationsTest Cases
Header (
header.spec.ts)Dropdowns
navigator.clipboard)Language Toggle
Mobile Menu (< 768px)
Selectors Strategy
Acceptance