Compare commits

..

1 Commits

Author SHA1 Message Date
peptiderepo
71d467479a test(smoke): fix the 6 remaining failures (auth now works)
- 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
2026-06-09 15:20:35 +00:00

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();
// PR Core registers the peptide CPT, which adds a post_type=peptide admin menu/submenu (label-agnostic). // "Peptides" top-level menu item is registered by the peptide CPT
await expect(nav.locator('a[href*="post_type=peptide"]').first()).toBeAttached({ timeout: 10_000 }); await expect(nav.locator('text=Peptides')).toBeVisible({ timeout: 10_000 });
}); });
test('PR Core Settings page loads', async ({ page }) => { test('PR Core Settings page loads', async ({ page }) => {