Files
Gnuboard7/plugins/_bundled/sirsoft-tosspayments/tests/scenarios/example_pg_payment.yaml.example
T
HeuJung 26a349590e feat(plugins): 토스페이먼츠 번들 플러그인 복원
7.0.0 정식 출시 커밋에서 PG 3종이 함께 제거되었으나, 그중 토스페이먼츠만
번들로 되돌린다. 삭제 직전 트리를 기준으로 플러그인 40개 파일과 일본어
언어팩 6개 파일을 복원하고, 삭제에 연동되어 변경되었던 README 목록·언어팩
빌드 스크립트 엔트리·이커머스 편집기 샘플의 PG provider 를 함께 되살렸다.

복원된 코드는 삭제 시점에 멈춰 있어 현행 코드베이스와 어긋나는 지점이 있어
함께 정합화했다.

- PluginTestCase 가 활성 디렉토리 경로를 참조해 _bundled 단독 실행 시
 라우트가 등록되지 않던 문제를 자기 기준 경로로 교체
- SettingsServiceProvider 의 site_url override 로 app.url 이 오염되어
 assertRedirect 가 간헐 실패하던 문제를 APP_URL 명시 리셋으로 차단
- 환경설정 레이아웃의 시맨틱 클래스가 한 칸씩 밀려 순환 배치되어 2열 폼이
 무너지고 섹션 제목이 에러 색으로 표시되던 결함을 정정 (회귀 테스트 신설)
- 편집기 저장 시 silent drop 되던 미표준 root 키 제거, Icon 을 size prop 으로 전환
2026-08-06 11:29:47 +09:00

71 lines
2.6 KiB
Plaintext

# 시나리오 매니페스트 예시 (실제 적용 아님 — .yaml.example 확장자)
# 실제 매니페스트로 채택할 때 .yaml 로 이름 변경 + test_files 의 실재 경로 매핑
#
# 참조: docs/testing-guide.md "기능 단위 시나리오 매트릭스"
feature: order_payment_pg_toss
description: 토스 PG 를 통한 주문 결제 흐름 (회원/비회원, 마일리지, 환율, 도서산간 등 모든 도메인 변수 cross product)
# 매니페스트를 검증하는 테스트 파일 (실제 작성 시 경로 갱신)
test_files:
- plugins/_bundled/sirsoft-tosspayments/tests/Feature/Payment/TossPgPaymentTest.php
- plugins/_bundled/sirsoft-tosspayments/tests/Feature/Payment/WebhookTest.php
# 축이 많아 full cross product 가 폭발하므로 pairwise 전략
coverage_strategy: pairwise
# 입력 axis — 결제 흐름에 영향을 주는 도메인 변수 전수
axes:
user_type: [member, guest]
mileage_enabled: [true, false]
product_options: [single, multi_option, bundle]
shipping_region: [domestic, jeju, remote_island]
shipping_policy: [free, fixed, range_based, conditional_free]
coupon_applied: [none, product, category, all]
currency: [krw, usd_with_fx]
rounding_unit: [1, 10, 100]
# 의미 없는 조합 컷 — 사유 명시 필수
exclusions:
- { user_type: guest, mileage_enabled: true, reason: "비회원은 마일리지 사용 불가" }
- { currency: usd_with_fx, rounding_unit: 1, reason: "환율 적용 시 1원 단위 절사 무의미" }
# 후속 효과 체인 — 결제 후 모든 부수효과
effects:
- webhook_received
- payment_approved
- mileage_deducted
- notification_sent_to_user
- notification_amount_matches_total
- vat_calculated
- tax_free_amount_split
- coupon_marked_used
- inventory_decremented
- order_status_transitioned_to_paid
# 보조 흐름 — 취소/환불 등
sub_flows:
- id: partial_cancel
description: 부분 취소 시 할인/배송 정책 재계산
effects:
- shipping_policy_recalculated
- discount_recalculated
- mileage_partial_refunded
- vat_recalculated
- id: full_cancel
description: 전체 취소 시 모든 부수효과 역방향
effects:
- payment_voided
- mileage_fully_refunded
- coupon_unused
- inventory_restored
- order_status_transitioned_to_cancelled
notes: |
이 매니페스트는 예시이며 실제 채택 시 다음을 갱신하세요:
1. test_files 경로
2. axes 값 목록 (실제 도메인 enum/policy 와 일치하도록)
3. effects 명명 (테스트 docblock @effects 와 1:1 매칭)
pairwise 전략 케이스 수: 약 16~20 (full 일 경우 2*2*3*3*4*4*2*3 = 3456)