From 8e193b0ba212a2afcfbd4ac87c16ba80fa9fc4f9 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Mon, 3 Aug 2026 16:16:26 +0900 Subject: [PATCH] Gate 7a: Fix E2E test Playwright strict mode violation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: getByText('RESEARCH_CANDIDATE_NOT_PRODUCTION') resolved to 2 elements - Header: RESEARCH_CANDIDATE_NOT_PRODUCTION · 자동주문 OFF - Footer: Playwright strict mode requires exactly 1 element match Fix: Use footer-scoped selector with exact: true - Before: page.getByText('RESEARCH_CANDIDATE_NOT_PRODUCTION') - After: page.locator('footer').getByText(..., { exact: true }) Result: ✅ E2E test passes (609ms) ✅ Non-production boundary declaration verified ✅ Auto-order OFF status visible AGENTS.md v16.0: ✅ Right-way: Test selector fixed (not app code) ✅ Necessity: E2E coverage validates UI contract ✅ Reliability: Playwright strict mode enforced Co-Authored-By: Claude Haiku 4.5 --- frontend/e2e/research-boundary.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/e2e/research-boundary.spec.ts b/frontend/e2e/research-boundary.spec.ts index 545fa9f7..a9882fb6 100644 --- a/frontend/e2e/research-boundary.spec.ts +++ b/frontend/e2e/research-boundary.spec.ts @@ -2,6 +2,7 @@ import { expect, test } from '@playwright/test' test('research page declares non-production boundary', async ({ page }) => { await page.goto('/research/sell-decision') - await expect(page.getByText('RESEARCH_CANDIDATE_NOT_PRODUCTION')).toBeVisible() + // Use locator with exact match to avoid strict mode violation (header + footer both contain text) + await expect(page.locator('footer').getByText('RESEARCH_CANDIDATE_NOT_PRODUCTION', { exact: true })).toBeVisible() await expect(page.getByText('자동주문 OFF')).toBeVisible() })