Repository navigation
test(frontend): pin the literal Archera signup URL in archera tests - #1320
Conversation
Both signup-link tests (education page and offer modal) only compared the href against the imported ARCHERA_SIGNUP_URL constant, so they kept passing if the constant itself drifted to a wrong destination (typo, stray UTM, wrong domain). Each now also asserts the literal canonical URL, https://www.archera.ai/cudly, mirroring the Go-side fix in LeanerCloud/cloud-commitments-cli#1280. The constant-based assertion stays, so the tests still prove the code uses the exported const. Verified by temporarily changing the constant: both tests fail with the pin and passed without it. Refs LeanerCloud#49 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 1 billable file and costs up to $0.25. Or wait 58 minutes for your next included review. View limit details
Comment |
|
Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): APPROVE Blocking:
|
|
Local verification at
|
|
Marked ready and merged by IAmJSD's agent, at IAmJSD's request (IAmJSD reviewed the before/after screenshots; cristim is traveling), after the independent review and local verification above, all at |
The two Archera signup-link tests compared the link's
hrefonly to the importedARCHERA_SIGNUP_URLconstant, so they would keep passing if the constant drifted to a wrong destination (typo, stray UTM, wrong domain). This PR also pins the literal canonical URL in each test, matching the Go-side fix in LeanerCloud/cloud-commitments-cli#1280.Closes #49
What changed
frontend/src/__tests__/archera.test.ts: in both signup-link tests (education pagea.archera-signup-btnand offer modala.archera-offer-signup), addedexpect(link!.href).toBe('https://www.archera.ai/cudly')next to the existing constant-based assertion, which is kept as the issue asks. Test-only change, 8 added lines.Why this approach
It follows the acceptance criteria: one literal pin per surface, with the constant check kept so the tests still prove the code uses the exported const. The literal is inlined in each assertion instead of a shared test constant, so the canonical destination is visible right where it is asserted.
Screenshots
No visible change: this is a test-only change.
Verification
Run on this branch's head
61ebaca1on top of maina14dc8f2:archera.test.ts: 29/29, also with--randomize, including both partnership disclosure tests (non-gating "works fully without" and "sponsors").ARCHERA_SIGNUP_URLtemporarily changed to...cudly?utm_source=oops, both pinned tests fail; main's version of the test file still passes 29/29 with the same mutation.Note for the UI owner
This changes UI code that @cristim owns. IAmJSD reviewed the before/after screenshots and asked for it to be merged; any design point you disagree with can be a follow-up.
🤖 Generated with Claude Code