docs(sw): Popup guidance, example comments, package README and link check

This commit is contained in:
shkim4 committed 2026-10-20 21:49:47 +09:00
1 parent 2ce24b8b43
commit e32a138f28
7 files changed
+92 -91

No files matched your search

+11 -3
View File
@@ -20,11 +20,19 @@ npm run check:ai-docs
### 브라우저 테스트 (`packages/sw/tests/*.browser.mjs`)
Playwright는 저장소 의존성이 아닙니다. 기존 PC는 저장소 밖 런타임(`C:/Users/user/.cache/codex-runtimes/.../node_modules`)을 기본값으로 씁니다. 새 PC에서는 환경 변수로 지정합니다.
Playwright는 저장소 의존성이 아닙니다. 모든 브라우저 테스트는 공통 모듈 `packages/sw/tests/playwright-runtime.mjs`로 Playwright(및 `pngjs`·`pixelmatch`)를 찾습니다(2026-10-20, PC별 절대경로 기본값 제거). 찾는 순서:
1. `SW_PLAYWRIGHT_PATH` — playwright 패키지 폴더(또는 진입 파일)
2. `SW_RUNTIME_MODULES` — `playwright`가 설치된 `node_modules` 경로 (예: 별도 폴더에서 `npm i playwright` 후 그 `node_modules`)
3. `HM_PLAYWRIGHT_DIR` — `node_modules/playwright`를 가진 프로젝트 폴더(`scripts/verify-quality-runtime.mjs`와 같은 변수)
4. 저장소의 `node_modules/playwright`
5. 사용자 홈의 Codex 런타임 `~/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/node_modules`(사용자 이름과 무관)
6. 전역 npm(`npm root -g`)
환경 변수로 지정한 경로에 Playwright가 없으면 다른 위치로 넘어가지 않고 시도한 위치를 보여 주며 실패합니다.
- `SW_RUNTIME_MODULES` — `playwright`가 설치된 `node_modules` 경로 (예: 별도 폴더에서 `npm i playwright` 후 그 `node_modules`)
- `SW_CHROME_PATH` — Chrome 실행 파일(기본 `C:/Program Files/Google/Chrome/Application/chrome.exe`)
- Firefox 테스트는 설치된 Firefox를 WebDriver BiDi로 사용
- Firefox 테스트는 설치된 Firefox(`SW_FIREFOX_PATH`)를 WebDriver BiDi로 사용하며 전역 `WebSocket`이 필요합니다: Node 22 이상, 또는 Node 20에서는 `node --experimental-websocket <test>`
- 실행 전 `npm run build-storybook`(일부 테스트는 `npm run storybook`의 6024 포트) 필요
## 2. 현재 상태와 남은 문제