Compare commits

...

1 Commits

Author SHA1 Message Date
peptiderepo
a381fe7b4d test(smoke): make PR Core admin-menu check label-agnostic
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
2026-06-09 15:24:41 +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();
// "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 }) => {