Summary
Add a small Playwright smoke-test suite for the Hugo site to catch browser-level regressions in core user-facing behavior.
This site is mostly static content, so it likely does not need a large end-to-end testing investment. However, a lightweight Playwright suite would be useful for catching regressions in navigation, custom JavaScript behavior, responsive layout, and key visitor flows.
Goals
- Catch high-value browser regressions before deploys
- Validate core visitor-facing flows on the built static site
- Test custom behavior such as the theme toggle
- Keep the test suite intentionally small and maintainable
Proposed scope
Focus on a targeted smoke/regression suite, not exhaustive UI coverage.
1) Homepage smoke test
Verify that the homepage:
- loads successfully
- shows the main navigation
- includes key calls to action / links such as joining and publications
2) Navigation sanity checks
Verify that major top-level pages can be reached and render expected headings/content, for example:
- Publications
- FAQ
- Contact
- Fall recruitment
- Spring recruitment
3) Theme toggle behavior
Test the custom light/dark mode behavior:
- toggle changes the active theme state
- theme preference persists across reloads
- page remains usable in both modes
Relevant files:
layouts/partials/header.html
assets/js/theme-toggle.js
assets/css/custom.css
4) Publications page sanity
Verify that the publications page:
- loads successfully
- renders at least one publication entry
- displays year groupings correctly
- does not fail when publication data changes
5) Mobile/responsive smoke test
Use at least one small viewport to confirm the header/nav and top-level layout do not catastrophically break on mobile-sized screens.
6) Basic metadata checks
Use Playwright assertions for a few important SEO/user-facing basics on major pages, such as:
- page title
- meta description
- canonical URL (if/when implemented)
Implementation approach
A good lightweight workflow would be:
- build the site with
hugo
- serve the generated
public/ directory locally in test runs
- run Playwright against the built static output
This keeps tests close to real deploy behavior while avoiding any need for a backend.
Potential files:
playwright.config.*
tests/ or e2e/
- optional helper scripts in
package.json, Makefile, or scripts/
Non-goals
To keep maintenance cost low, avoid:
- exhaustive visual testing of every page
- brittle assertions on exact copy/layout details
- testing every piece of static content
- over-engineering a large browser test matrix for a mostly static site
Acceptance criteria
Notes
This should complement, not replace, simpler checks such as:
hugo build validation
- link checking
- data validation for
data/publications.yml
A reasonable initial target is roughly 5–8 smoke tests.
Summary
Add a small Playwright smoke-test suite for the Hugo site to catch browser-level regressions in core user-facing behavior.
This site is mostly static content, so it likely does not need a large end-to-end testing investment. However, a lightweight Playwright suite would be useful for catching regressions in navigation, custom JavaScript behavior, responsive layout, and key visitor flows.
Goals
Proposed scope
Focus on a targeted smoke/regression suite, not exhaustive UI coverage.
1) Homepage smoke test
Verify that the homepage:
2) Navigation sanity checks
Verify that major top-level pages can be reached and render expected headings/content, for example:
3) Theme toggle behavior
Test the custom light/dark mode behavior:
Relevant files:
layouts/partials/header.htmlassets/js/theme-toggle.jsassets/css/custom.css4) Publications page sanity
Verify that the publications page:
5) Mobile/responsive smoke test
Use at least one small viewport to confirm the header/nav and top-level layout do not catastrophically break on mobile-sized screens.
6) Basic metadata checks
Use Playwright assertions for a few important SEO/user-facing basics on major pages, such as:
Implementation approach
A good lightweight workflow would be:
hugopublic/directory locally in test runsThis keeps tests close to real deploy behavior while avoiding any need for a backend.
Potential files:
playwright.config.*tests/ore2e/package.json,Makefile, orscripts/Non-goals
To keep maintenance cost low, avoid:
Acceptance criteria
Notes
This should complement, not replace, simpler checks such as:
hugobuild validationdata/publications.ymlA reasonable initial target is roughly 5–8 smoke tests.