Skip to content

test(e2e): add smoke tests, workflow tests, and Docker integration fixes#811

Draft
thostetler wants to merge 1 commit intoadsabs:masterfrom
thostetler:test/e2e-smoke-and-workflows
Draft

test(e2e): add smoke tests, workflow tests, and Docker integration fixes#811
thostetler wants to merge 1 commit intoadsabs:masterfrom
thostetler:test/e2e-smoke-and-workflows

Conversation

@thostetler
Copy link
Member

Adds comprehensive e2e test coverage (45 tests) using the Page Object
Model pattern with Playwright running in Docker.

Changes:

  • POM base class with session cookie, scenario header, and navigation helpers
  • 16 page objects covering all major pages
  • Public page smoke tests (home, search, forms, journals DB, auth pages, feedback)
  • Protected page smoke tests (libraries, notifications, settings)
  • Abstract subpage smoke tests (citations, references, coreads, similar, export)
  • Workflow tests: anonymous search, abstract tab navigation, auth-gated nav
  • Middleware tests: session bootstrap, auth routing, verify routes
  • Stub backend extended with CORS, search/abstract routes, configurable scenarios
  • Next.js afterFiles rewrites to proxy client-side API calls in Docker
  • Shepherd.js tour suppression via localStorage in test fixture
  • ServiceUnavailable component for 5xx errors in abstract pages
  • Fix for empty-query facet requests on search page

Depends on PR #807 (POM foundation) — overlapping changes will resolve
once #807 is merged first.

@thostetler thostetler force-pushed the test/e2e-smoke-and-workflows branch 7 times, most recently from 459a7c7 to 9ec0f6b Compare February 24, 2026 21:38
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 94.44444% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.0%. Comparing base (98583b3) to head (e04cd6d).
⚠️ Report is 27 commits behind head on master.

Files with missing lines Patch % Lines
src/lib/serverside/absCanonicalization.ts 25.0% 3 Missing ⚠️
...mponents/ServiceUnavailable/ServiceUnavailable.tsx 98.6% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #811     +/-   ##
========================================
+ Coverage    61.7%   62.0%   +0.3%     
========================================
  Files         313     317      +4     
  Lines       36092   36536    +444     
  Branches     1600    1642     +42     
========================================
+ Hits        22237   22618    +381     
- Misses      13818   13881     +63     
  Partials       37      37             
Files with missing lines Coverage Δ
src/components/SearchFacet/useGetFacetData.ts 77.9% <100.0%> (ø)
...mponents/ServiceUnavailable/ServiceUnavailable.tsx 98.6% <98.6%> (ø)
src/lib/serverside/absCanonicalization.ts 63.6% <25.0%> (+0.5%) ⬆️

... and 18 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thostetler thostetler force-pushed the test/e2e-smoke-and-workflows branch 3 times, most recently from adfc9b0 to 5e67123 Compare February 25, 2026 01:01
Add comprehensive e2e test coverage using the Page Object Model pattern
with Playwright running in Docker (stub + nectar + tests containers).

- Implement POM base class with session cookie, scenario header, and
  navigation helpers shared across all page objects
- Add page objects for all major pages: home, search, abstract, login,
  register, forgot-password, settings, libraries, notifications,
  classic-form, paper-form, journals-db, and feedback
- Add public page smoke tests (home, search, classic form, paper form,
  journals DB, login, register, forgot password, feedback variants)
- Add protected page smoke tests (libraries, notifications, settings)
- Add abstract subpage smoke tests (citations, references, coreads,
  similar, export citation)
- Add workflow tests: anonymous search, abstract tab navigation,
  auth-gated navigation with login redirect
- Add middleware tests: session bootstrap, auth routing, verify routes
- Extend stub backend with CORS headers, search/abstract API routes,
  and configurable bootstrap scenarios
- Add Next.js afterFiles rewrites to proxy client-side API calls in
  Docker, avoiding cross-origin failures from unresolvable hostnames
- Suppress Shepherd.js tour dialogs in tests via localStorage fixture
- Add ServiceUnavailable component for 5xx errors in abstract pages
- Fix empty-query facet requests firing on search page
@thostetler thostetler force-pushed the test/e2e-smoke-and-workflows branch from 5e67123 to e04cd6d Compare February 25, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant