test: lock in 7-day free trial copy (closes #2290)#2354
Merged
Conversation
#2290) Pre-fix: trial copy had drifted from 14 days to 7 days across PRD.md, dashboard.py, the paywall modal, and the alerts/approvals/notifications templates. Manual grep confirmed the migration was complete, but nothing prevents a future copy-paste from old marketing material from quietly reintroducing "14-day" trial language. This adds a small regression test that scans the user-facing surfaces and asserts: - No "14 day" / "14-day" appears within 80 chars of "trial" - PRD pricing matrix lists Trial as 7 days - Paywall modal CTA says "7-day free trial" - dashboard.py has ≥2 mentions of "7-day free trial" (gate error + cloud link) Verified the regression catches a real flip: swapping the PRD line back to "14 days" makes test_no_14_day_trial_copy_in_user_facing_files fail with the offending file:line pinpointed. Closes #2290.
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.
Closes #2290.
What
Adds a regression test that locks in the 7-day free trial copy across user-facing surfaces. The 14→7 migration is already complete in code (PRD matrix, paywall modal, dashboard.py gate copy, alerts/approvals/notifications templates). This PR adds the guard so a future copy-paste from old marketing material can't quietly reintroduce "14-day" trial language.
How
tests/test_trial_copy_consistency.pyscans the user-facing files (PRD.md,dashboard.py,clawmetry/sync.py,clawmetry/templates/partials/paywall_modal.html,clawmetry/templates/tabs/{alerts,approvals,notifications}.html) and asserts four invariants:"14 day"/"14-day"appears within 80 chars of"trial"in any user-facing surface (tests/, CHANGELOG, etc. are excluded — they can legitimately reference history)."7-day free trial".dashboard.pymentions"7-day free trial"in ≥ 2 places (Pro-gate error + cloud upgrade link).Verified the regression catches real flips
Acceptance criteria from #2290
grep -rIn "14[- ]day"returns zero hits in trial contexts (only14-daytoken-usage chart references remain — unrelated)grep -rIn "7[- ]day"covers all trial mentionsvivekchand/clawmetry-cloud#1210tracks the cloud-sideTRIAL_DAYS+ Stripetrial_period_daysflipTest plan
pytest tests/test_trial_copy_consistency.py -v→ 4 passed