Compare commits

..

5 Commits

Author SHA1 Message Date
peptiderepo
8596b5dfa1 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
2026-06-16 18:40:01 +00:00
peptiderepo
7794ecb11e chore(e2e): bump version to 1.7.0
Agent-Session: claude/e2e-news-vision-admin-20260617
2026-06-17 01:30:55 +07:00
peptiderepo
756fc79cfe chore(e2e): CHANGELOG 1.7.0 — Peptide News + PR Vision admin smoke specs
Agent-Session: claude/e2e-news-vision-admin-20260617
2026-06-17 01:30:42 +07:00
peptiderepo
9dd96c815a 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
2026-06-17 01:30:21 +07:00
peptiderepo
aa9f9887f1 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
2026-06-17 01:29:21 +07:00
5 changed files with 8 additions and 24 deletions

View File

@@ -5,7 +5,7 @@
# #
# jobs: # jobs:
# ci: # ci:
# uses: peptide-repo/peptide-e2e/.github/workflows/ci.yml@main # uses: peptiderepo/peptide-e2e/.github/workflows/ci.yml@main
# with: # with:
# tests: stubs # or wp-framework | brain-monkey | none # tests: stubs # or wp-framework | brain-monkey | none
# has_js: false # has_js: false

View File

@@ -35,7 +35,7 @@ permissions:
jobs: jobs:
deploy-staging: deploy-staging:
name: Deploy to Staging name: Deploy to Staging
runs-on: [self-hosted, peptide-vps] runs-on: ubuntu-latest
environment: staging environment: staging
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -72,7 +72,7 @@ jobs:
name: Smoke tests (staging) name: Smoke tests (staging)
needs: deploy-staging needs: deploy-staging
if: ${{ inputs.run_smoke }} if: ${{ inputs.run_smoke }}
uses: peptide-repo/peptide-e2e/.github/workflows/smoke.yml@main uses: peptiderepo/peptide-e2e/.github/workflows/smoke.yml@main
secrets: secrets:
STAGING_WP_ADMIN_USER: ${{ secrets.STAGING_WP_ADMIN_USER }} STAGING_WP_ADMIN_USER: ${{ secrets.STAGING_WP_ADMIN_USER }}
STAGING_WP_ADMIN_PASSWORD: ${{ secrets.STAGING_WP_ADMIN_PASSWORD }} STAGING_WP_ADMIN_PASSWORD: ${{ secrets.STAGING_WP_ADMIN_PASSWORD }}
@@ -83,7 +83,7 @@ jobs:
# skipped smoke (run_smoke: false) still allows prod via the if-condition. # skipped smoke (run_smoke: false) still allows prod via the if-condition.
needs: [deploy-staging, smoke] needs: [deploy-staging, smoke]
if: ${{ !cancelled() && needs.deploy-staging.result == 'success' && needs.smoke.result != 'failure' }} if: ${{ !cancelled() && needs.deploy-staging.result == 'success' && needs.smoke.result != 'failure' }}
runs-on: [self-hosted, peptide-vps] runs-on: ubuntu-latest
environment: production environment: production
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@@ -32,14 +32,14 @@ on:
jobs: jobs:
smoke: smoke:
name: Playwright smoke suite name: Playwright smoke suite
runs-on: [self-hosted, peptide-vps] runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
- name: Checkout peptide-e2e (explicit — workflow_call defaults to caller repo) - name: Checkout peptide-e2e (explicit — workflow_call defaults to caller repo)
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: peptide-repo/peptide-e2e repository: peptiderepo/peptide-e2e
ref: main ref: main
- name: Set up Node.js - name: Set up Node.js
@@ -53,7 +53,7 @@ jobs:
run: npm ci run: npm ci
- name: Install Playwright browsers - name: Install Playwright browsers
run: npx playwright install chromium run: npx playwright install chromium --with-deps
- name: Run smoke tests - name: Run smoke tests
env: env:

View File

@@ -1,21 +1,5 @@
# Changelog # Changelog
## [1.7.2] - 2026-06-17
### Fixed
- **CI**: Drop `--with-deps` from `npx playwright install chromium` in `smoke.yml`.
The `peptide-vps` self-hosted runner has OS-level Playwright deps pre-installed by
root; `--with-deps` invokes `apt-get` which requires `sudo`, blocked by the runner's
`NoNewPrivileges=true` systemd hardening. Binary-only install works without
elevated privileges.## [1.7.1] - 2026-06-17
### Changed
- **CI/CD**: Switch `deploy-staging`, `deploy-production`, and `smoke` jobs from
`ubuntu-latest` (GitHub-hosted) to `[self-hosted, peptide-vps]` (org runner on
KVM8 VPS). This routes all Hostinger SSH/rsync traffic through our stable VPS IP,
fixing the Azure-region throttle that caused intermittent deploy failures.
Callers' CI/validate jobs are unaffected (remain on `ubuntu-latest`).
## [1.7.0] - 2026-06-17 ## [1.7.0] - 2026-06-17
### Added ### Added

View File

@@ -1,6 +1,6 @@
{ {
"name": "peptide-e2e", "name": "peptide-e2e",
"version": "1.7.2", "version": "1.7.0",
"description": "Playwright smoke tests for peptiderepo.com (staging + production)", "description": "Playwright smoke tests for peptiderepo.com (staging + production)",
"private": true, "private": true,
"scripts": { "scripts": {