claude-home/paper-dynasty/refractor-in-app-test-plan.md

5.6 KiB

title description type domain tags
Refractor In-App Test Plan Comprehensive manual test plan for the Refractor card evolution system — covers /refractor status, tier badges, post-game hooks, tier-up notifications, card art tiers, and known issues. guide paper-dynasty
paper-dynasty
testing
refractor
discord
database

Refractor In-App Test Plan

Manual test plan for the Refractor (card evolution) system. All testing targets dev environment (pddev.manticorum.com / dev Discord bot).

Prerequisites

  • Dev bot running on sba-bots
  • Dev API at pddev.manticorum.com (port 813)
  • Team with seeded refractor data (team 31 from prior session)
  • At least one game playable to trigger post-game hooks

REF-10: /refractor status — Basic Display

# Test Steps Expected
10 No filters /refractor status Ephemeral embed with team branding, tier summary line, 10 cards sorted by tier DESC, pagination buttons if >10 cards
11 Card type filter /refractor status card_type:Batter Only batter cards shown, count matches
12 Tier filter /refractor status tier:T2—Refractor Only T2 cards, embed color changes to tier color
13 Progress filter /refractor status progress:Close to next tier Only cards >=80% to next threshold, fully evolved excluded
14 Combined filters /refractor status card_type:Batter tier:T1—Base Chrome Intersection of both filters
15 Empty result /refractor status tier:T4—Superfractor (if none exist) "No cards match your filters..." message with filter details

REF-20: /refractor status — Pagination

# Test Steps Expected
20 Page buttons appear /refractor status with >10 cards Prev/Next buttons visible
21 Next page Click Next > Page 2 shown, footer updates to "Page 2/N"
22 Prev page From page 2, click < Prev Back to page 1
23 First page prev On page 1, click < Prev Nothing happens / stays on page 1
24 Last page next On last page, click Next > Nothing happens / stays on last page
25 Button timeout Wait 120s after command Buttons become unresponsive
26 Wrong user clicks Another user clicks buttons Silently ignored

REF-30: Tier Badges in Card Embeds

# Test Steps Expected
30 T0 card display View a T0 card via /myteam or /roster No badge prefix, just player name
31 T1 badge View a T1 card Title shows [BC] Player Name
32 T2 badge View a T2 card Title shows [R] Player Name
33 T3 badge View a T3 card Title shows [GR] Player Name
34 T4 badge View a T4 card (if exists) Title shows [SF] Player Name
35 Badge in pack open Open a pack with an evolved card Badge appears in pack embed
36 API down gracefully (hard to test) Card displays normally with no badge, no error

REF-50: Post-Game Hook & Tier-Up Notifications

# Test Steps Expected
50 Game completes normally Play a full game No errors in bot logs; refractor evaluate-game fires after season-stats update
51 Tier-up notification Play game where a card crosses a threshold Embed in game channel: "Refractor Tier Up!", player name, tier name, correct color
52 No tier-up Play game where no thresholds crossed No refractor embed posted, game completes normally
53 Multiple tier-ups Game where 2+ players tier up One embed per tier-up, all posted
54 Auto-init new card Play game with a card that has no RefractorCardState State created automatically, player evaluated, no error
55 Superfractor notification (may need forced data) "SUPERFRACTOR!" title, teal color

REF-60: Card Art with Tiers (API-level)

# Test Steps Expected
60 T0 card image GET /api/v2/players/{id}/card-image?card_type=batting Base card, no tier styling
61 Tier override GET ...?card_type=batting&tier=2 Refractor styling visible (border, diamond indicator)
62 Each tier visual ?tier=1 through ?tier=4 Correct border colors, diamond fill, header gradients per tier
63 Pitcher card ?card_type=pitching&tier=2 Tier styling applies correctly to pitcher layout

REF-70: Known Issues to Verify

# Issue Check Status
70 Superfractor embed says "Rating boosts coming in a future update!" Verify — boosts ARE implemented now, text is stale Fix needed
71 on_timeout doesn't edit message Buttons stay visually active after 120s Known, low priority
72 Card embed perf (1 API call per card) Note latency on roster views with 10+ cards Monitor
73 Season-stats failure kills refractor eval Both in same try/except Known risk, verify logging

API Endpoints Under Test

Method Endpoint Used By
GET /api/v2/refractor/tracks Track listing
GET /api/v2/refractor/cards?team_id=X /refractor status command
GET /api/v2/refractor/cards/{card_id} Tier badge in card embeds
POST /api/v2/refractor/cards/{card_id}/evaluate Force re-evaluation
POST /api/v2/refractor/evaluate-game/{game_id} Post-game hook
GET /api/v2/teams/{team_id}/refractors Teams alias endpoint
GET /api/v2/players/{id}/card-image?tier=N Card art tier preview

Notification Embed Colors

Tier Name Color
T1 Base Chrome Green (0x2ECC71)
T2 Refractor Gold (0xF1C40F)
T3 Gold Refractor Purple (0x9B59B6)
T4 Superfractor Teal (0x1ABC9C)