From a381fe7b4d043a675ec2e8b8b706d41dc3a78401 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Tue, 9 Jun 2026 15:24:41 +0000 Subject: [PATCH] test(smoke): make PR Core admin-menu check label-agnostic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/03-admin-plugins.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/03-admin-plugins.spec.ts b/tests/03-admin-plugins.spec.ts index a0c97bf..774c246 100755 --- a/tests/03-admin-plugins.spec.ts +++ b/tests/03-admin-plugins.spec.ts @@ -100,8 +100,8 @@ test.describe('WP Admin — Peptide Repo Core admin', () => { // PR Core registers the peptide CPT which creates a "Peptides" menu item const nav = page.locator('#adminmenu'); await expect(nav).toBeVisible(); - // "Peptides" top-level menu item is registered by the peptide CPT - await expect(nav.locator('text=Peptides')).toBeVisible({ timeout: 10_000 }); + // PR Core registers the peptide CPT, which adds a post_type=peptide admin menu/submenu (label-agnostic). + await expect(nav.locator('a[href*="post_type=peptide"]').first()).toBeAttached({ timeout: 10_000 }); }); test('PR Core Settings page loads', async ({ page }) => { -- 2.49.1