Compare commits

..

3 Commits

Author SHA1 Message Date
peptiderepo
4a26bfaa4d ci(deploy): promote smoke to a production gate
deploy-production now needs smoke; a smoke FAILURE blocks prod while a skipped
smoke (run_smoke:false) still allows it. Automated functional gate replacing
the removed human approval gate — hands-off but safe.

Agent-Session: cto gate-smoke
2026-06-09 15:28:38 +00:00
peptiderepo
a09d210895 test(smoke): label-agnostic admin-menu check (#9)
The peptide CPT menu was restructured (no top-level 'Peptides' label), so the
text=Peptides assertion failed. Assert the CPT's admin link by href
(a[href*='post_type=peptide']) and toBeAttached — robust to label changes and
submenu (hidden-until-hover) placement.

Agent-Session: cto smoke-green

Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
2026-06-09 22:24:44 +07:00
peptiderepo
3ed4b10ecd test(smoke): fix remaining 6 failures (#8)
- 02 search: target the visible .hero-search instance; the old .first()
  selector matched the hidden header search-overlay (instance 1).
- 01 calculator: it auto-computes from the peptide preset; select the peptide
  and assert #prc-results, scoped to .prc-calculator (the old broad
  button[type=submit] selector clicked the PSA search button).
- 03 admin: 'const nav' had been swallowed into a comment (ReferenceError).
- 04 rest-api: PSA /search returns {results:[]} with no 'status' key; drop it.

Auth fixed separately via a dedicated staging CI admin (ci-smoke) + corrected
STAGING_WP_ADMIN_* secrets; the global.setup failure was cascading into these.

Agent-Session: cto smoke-green

Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
2026-06-09 22:20:39 +07:00
2 changed files with 6 additions and 3 deletions

View File

@@ -79,7 +79,10 @@ jobs:
deploy-production: deploy-production:
name: Deploy to Production name: Deploy to Production
needs: [deploy-staging] # Smoke is now a GATE: a smoke FAILURE blocks production. A deliberately
# skipped smoke (run_smoke: false) still allows prod via the if-condition.
needs: [deploy-staging, smoke]
if: ${{ !cancelled() && needs.deploy-staging.result == 'success' && needs.smoke.result != 'failure' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: production environment: production
steps: steps:

View File

@@ -100,8 +100,8 @@ test.describe('WP Admin — Peptide Repo Core admin', () => {
// PR Core registers the peptide CPT which creates a "Peptides" menu item // PR Core registers the peptide CPT which creates a "Peptides" menu item
const nav = page.locator('#adminmenu'); const nav = page.locator('#adminmenu');
await expect(nav).toBeVisible(); await expect(nav).toBeVisible();
// "Peptides" top-level menu item is registered by the peptide CPT // PR Core registers the peptide CPT, which adds a post_type=peptide admin menu/submenu (label-agnostic).
await expect(nav.locator('text=Peptides')).toBeVisible({ timeout: 10_000 }); await expect(nav.locator('a[href*="post_type=peptide"]').first()).toBeAttached({ timeout: 10_000 });
}); });
test('PR Core Settings page loads', async ({ page }) => { test('PR Core Settings page loads', async ({ page }) => {