test(e2e): basic/threshold 케이스 보강 (샘플) - #959
Open
cjw783 wants to merge 1 commit into
Open
Conversation
### 스펙 - focus를 옵션 값 확인 나열에서 관찰 가능한 동작 5개로 재작성 - 임계값 경계가 드래그 속도에 좌우되는 점을 `limitations`에 기록 ### 테스트 - 테스트 3 → 5개 (프레임워크당) - threshold 미만 드래그 시 원래 패널로 복귀하고 애니메이션이 종료됨을 검증 - 같은 50px 드래그에서 threshold 10/40은 이동, 100은 미이동임을 한 번에 단언 - 복귀 후 재드래그가 정상 동작하는지 검증 추가 - `toBeGreaterThan(0)` 느슨한 단언을 기대 인덱스 고정으로 교체 - 인스턴스 인덱스와 드래그 거리를 명명 상수로 분리 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
4 tasks
daybrush
approved these changes
Aug 26, 2026
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.
무엇을 바꿨나
threshold.yaml,threshold.spec.ts둘뿐 — 데모(packages/docs/src/demo/)는 건드리지 않음스펙 변경
threshold미만·이상 드래그의 결과를 각각 명시limitations에 기록테스트 추가
threshold미만 드래그 시 원래 패널로 복귀하고 애니메이션이 종료됨을 검증expect(state.currentIndex).toBeGreaterThan(0)를 기대 인덱스 고정(toBe(1))으로 교체LOW/DEFAULT/HIGH)와 드래그 거리를 명명 상수로 분리test()위에 대응하는 focus를 주석으로 표기데모 변경
검증 불가 항목
SnapControl.moveToPosition은 raw 드래그 거리가 아니라 릴리스 시점의 관성이 실린 delta를threshold와 비교하므로, 경계값 단언은 드래그 속도에 따라 흔들림. 여유를 둔 거리(50px / 150px)로만 검증함Test plan
focus항목과test()블록이 1:1로 매핑되고 focus 주석이 있음npx playwright test tests/basic/threshold --repeat-each=3연속 통과 — 45 testspnpm test:e2e전체 통과 — 459 tests / 49.3s (기존 453 + 6)