test(e2e): add smoke specs for Peptide News + PR Vision admin (#20)
* feat(e2e): add Peptide News admin smoke spec (07)
Covers dashboard (HTTP 200, no fatal, heading + summary cards + date filter),
settings (form present), articles, and LLM costs sub-pages.
Skip-if-absent guard on all tests: when plugin is not installed on the
environment, tests skip loudly instead of hard-failing.
Selectors sourced from:
admin/class-pn-admin-menu.php (slugs)
admin/partials/dashboard.php (.pn-summary-cards, .pn-date-filter, h1)
Agent-Session: claude/e2e-news-vision-admin-20260617
* feat(e2e): add PR Vision admin smoke spec (08)
Covers:
- Dashboard: HTTP 200, no fatal, h1 "PR Vision" heading visible
- Settings: page loads + API-key-manager card (#prv-key-card) present +
status indicator (#prv-key-source-badge) visible
- Write-only invariant: #prv_api_key input has value="" (stored key never
output); full page HTML asserted to not contain "sk-or-" prefix
- Costs (pr-vision-costs): loads without fatal
- Call Log (pr-vision-calls): loads without fatal
Skip-if-absent on every test: plugin absent or Settings page (v0.2.0
admin) not yet deployed => loud annotation + test.skip().
Selectors sourced from:
includes/core/class-prv-admin-page.php (h1 heading)
includes/core/class-prv-key-manager-renderer.php (#prv-key-card,
#prv-key-source-badge, #prv_api_key)
includes/core/class-prv-settings-page.php (MENU_SLUG)
includes/core/class-prv-costs-page.php (MENU_SLUG)
includes/core/class-prv-call-log-page.php (MENU_SLUG)
Agent-Session: claude/e2e-news-vision-admin-20260617
* chore(e2e): CHANGELOG 1.7.0 — Peptide News + PR Vision admin smoke specs
Agent-Session: claude/e2e-news-vision-admin-20260617
* chore(e2e): bump version to 1.7.0
Agent-Session: claude/e2e-news-vision-admin-20260617
* fix(e2e): guard-first ordering in specs 07+08 — skip before Invalid-plugin-page assert
In 07-peptide-news-admin (Articles + LLM Costs) and 08-pr-vision-admin
(Costs + Call Log), the hard expect(body).not.toContain('Invalid plugin page')
assertion fired BEFORE the isPluginAbsent() skip guard. If either plugin is
absent from staging, those tests would hard-fail — gating prod for all apps.
Fix: move isPluginAbsent() + test.skip() above the Invalid-plugin-page assert
in all four affected tests, mirroring the Dashboard/Settings guard-first pattern
already used in the same files.
- 07 Articles: skip guard now before Invalid plugin page check
- 07 LLM Costs: skip guard now before Invalid plugin page check
- 08 Costs: skip guard now before Invalid plugin page check
- 08 Call Log: skip guard now before Invalid plugin page check
Validated: npx playwright test --list lists all 38 tests cleanly.
Agent-Session: engineer-infra-e2e-guardfix-20260617
---------
Co-authored-by: peptiderepo <bot@peptiderepo.com>
This commit was merged in pull request #20.
This commit is contained in:
21
CHANGELOG.md
21
CHANGELOG.md
@@ -1,5 +1,26 @@
|
||||
# Changelog
|
||||
|
||||
## [1.7.0] - 2026-06-17
|
||||
|
||||
### Added
|
||||
- **Peptide News admin smoke (07)** (`07-peptide-news-admin.spec.ts`).
|
||||
Covers the Peptide News Plugin admin surfaces: dashboard (HTTP 200, no fatal,
|
||||
h1 "Peptide News Analytics" heading, `.pn-summary-cards`, `.pn-date-filter`),
|
||||
settings (form present), articles, and LLM costs sub-pages. Skip-if-absent guard
|
||||
on all tests using the standard 05/06 merge-early binding pattern. Slugs sourced
|
||||
from `admin/class-pn-admin-menu.php`.
|
||||
|
||||
- **PR Vision admin smoke (08)** (`08-pr-vision-admin.spec.ts`).
|
||||
Covers the PR Vision plugin admin surfaces: dashboard (HTTP 200, no fatal,
|
||||
h1 "PR Vision" visible), Settings page (API-key-manager card `#prv-key-card`
|
||||
present, status badge `#prv-key-source-badge` visible), write-only security
|
||||
invariant (`#prv_api_key` value="" + full HTML must not contain "sk-or-"),
|
||||
Costs sub-page (`pr-vision-costs`), and Call Log sub-page (`pr-vision-calls`).
|
||||
Skip-if-absent at two levels: plugin absent (loud annotation + skip), and
|
||||
`#prv-key-card` absent (Settings v0.2.0 not yet deployed on environment).
|
||||
Selectors sourced from `class-prv-admin-page.php`, `class-prv-key-manager-renderer.php`.
|
||||
|
||||
|
||||
All notable changes to the peptide-e2e smoke suite will be documented here.
|
||||
|
||||
## [1.6.0] - 2026-06-16
|
||||
|
||||
Reference in New Issue
Block a user