Commit Graph

5 Commits

Author SHA1 Message Date
peptiderepo
da79ee234f fix(ci): explicitly checkout peptide-e2e in workflow_call context
When smoke.yml runs via workflow_call from another repo (peptide-repo-core,
peptide-starter-theme, etc.), GitHub Actions checks out the CALLER's repo
by default. The caller has no package-lock.json, so setup-node's npm cache
lookup fails with 'Some specified paths were not resolved'.

Fix: add repository/ref to the checkout step so we always fetch peptide-e2e
regardless of who calls the workflow. This ensures npm ci and Playwright
have the correct test code and dependency lockfile.
2026-04-27 15:37:34 +00:00
peptiderepo
ef7b705111 fix: complete truncated test files in 03 and 04 specs
03-admin-plugins.spec.ts and 04-rest-api.spec.ts were cut off mid-test,
causing Playwright TypeScript parse failures and the smoke gate to show
0 jobs. Added the missing test bodies, assertions, and closing braces.

New tests added:
- PR Core Settings page loads (03)
- Peptide CPT verified via /wp-json/wp/v2/types/peptide (04)

Fixes smoke gate for all future deploys.
2026-04-27 05:39:26 +00:00
peptiderepo
3b8a7d3065 fix(ci): use inputs.base_url directly (default already declared); drop double-quote expression 2026-04-27 12:32:40 +07:00
peptiderepo
d781207252 fix(ci): correct working-directory — package-lock.json is at repo root, not e2e/ 2026-04-27 12:27:49 +07:00
peptiderepo
d46a1e4680 feat: initial Playwright smoke suite
20 tests across 5 files covering all plugin surfaces on staging:
- Homepage load and PHP fatal detection
- Reconstitution Calculator shortcode + math
- Peptide Search AI widget + AJAX response
- Admin: all plugins active, PSA + PRAutoBlogger settings pages
- REST API: prc/v1/presets, peptides/v1/search, compounds, CPT types

Staging shortcode pages:
  /reconstitution-calculator/ - [prc_calculator]
  /search-peptides/           - [peptide_search]
  /peptide-directory/         - [peptide_directory]

GHA workflow: smoke.yml supports manual dispatch + workflow_call
for use as a deploy gate from plugin repos.
2026-04-26 04:39:13 +00:00