UNPKG

@dhlab/e2e-autogen

Version:

Google 스프레드시트 기반 시나리오를 Playwright 테스트 스텁 코드로 자동 생성하고, 테스트 실행 결과를 다시 시트에 업데이트하는 CLI 도구

29 lines (24 loc) 803 B
import { test as base } from "@playwright/test"; type TFixtures = { manual: (title: string, reason?: string) => Promise<void>; }; /** * 시트에 manual_only 결과를 지원하기 위한 fixture입니다. */ const manualTest = base.extend<TFixtures>({ manual: async ({}, use) => { await use(async (title: string, reason?: string) => { // (1) TC ID 추출 – "[TC-x.x]" 형태를 파싱한다. const match = title.match(/\[(TC-[\d.]+)]/); const testId = match ? match[1] : ""; // (2) Playwright step 등록 + 커스텀 annotation 기록 await base.step(title, async () => { base.info().annotations.push({ type: "manual_only", description: `${testId}|${reason ?? ""}`, }); }); }); }, }); export { manualTest };