test(web): implement E2E testing infrastructure with Playwright and a custom mock API server#44
Merged
Conversation
… custom mock API server
…h, and dashboard e2e suites and update mock server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
apps/web에 Playwright 기반의 통합 E2E 테스트 인프라와 가상 HTTP 스텁(Mock API) 서버를 구축하여 크로스 브라우저 환경 검증을 자동화합니다.apps/extension에 Vitest + React Testing Library(RTL) 기반 단위 테스트 환경을 구축하고, 주요 도메인 로직 및 유틸리티의 단위 테스트를 완벽히 통과시켰습니다.web과extension패키지의 빌드 및 테스트 파이프라인을 독립 CI 워크플로로 이원화하고 최적화했습니다.작업 내용
1. Web E2E 테스트 인프라 구축 및 시나리오 검증
proxy.ts) 계열 서버사이드 fetch 동작과 브라우저의 클라이언트사이드(Axios) fetch를 모두 일관되게 모킹하기 위해 독립 HTTP 스텁 서버를 포트:3101로 기동.2. Extension Vitest + React Testing Library 단위 테스트 인프라 구축
wxt/browserAPI 모킹 및tsconfig.json,vitest.config.ts설정 조정.3. 익스텐션 도메인 및 유틸리티 단위 테스트
4. 북마크 동기화(sync) 도메인 단위 테스트
vi.useFakeTimers()를 통한 TTL(5초/10초) 경계 및 청소 조건 검증.5. CI/CD 워크플로 추가 및 최적화
apps/extension/**,packages/**변경 시 작동. WXT prepare, compile(타입 체크), 빌드 및 단위 테스트 단계 검증.apps/web/**,packages/**변경 시 작동. Next.js 빌드, 단위 테스트 검증 외에 크로스 브라우저 Playwright E2E 잡(Job) 통합 및 실패/종료 시 리포트/트레이스 아티팩트 업로드 자동화 추가.paths필터를 세부적으로 지정하여 무관한 코드가 수정되었을 때 불필요한 빌드와 테스트가 격리/개별 수행되도록 가상 오버헤드 차단.검증 결과
npx tsc --noEmit수행 결과 오류 0개 (통과).biome check수행 결과 전체 린트/포맷 룰 통과.