Skip to content

Fix the discover integration test against the merged promo hook - #152

Merged
gcutrini merged 1 commit into
mainfrom
fix/discover-integration-test
Aug 13, 2026
Merged

Fix the discover integration test against the merged promo hook#152
gcutrini merged 1 commit into
mainfrom
fix/discover-integration-test

Conversation

@gcutrini

@gcutrini gcutrini commented Aug 13, 2026

Copy link
Copy Markdown
Member

ref: https://app.clickup.com/t/86bb9xgex

Fixes the CI break on main after #150 and #151 merged.

Each PR was green alone. #150's integration test fed the promo hook promoCodeVerified as a prop; #151 moved that state inside the hook, where it is earned by validating. Merged together, the prop is ignored, the discovered code never counts as active, and the test fails.

The test now runs one successful validation against a qualifying ticket, the way the app reaches that state. Test-only change; 133 unit and 33 e2e green on merged main plus this fix.

Summary by CodeRabbit

  • Tests
    • Updated integration coverage for the current promo-code validation flow.
    • Added verification for revalidation with an eligible ticket and successful valid-code handling.

PR 150 wrote the test against the hook where promoCodeVerified was a
prop; PR 151 made acceptance the hook's own state, earned by validating.
Merged together, the prop is ignored and the discovered code never counts
as active. The test now runs one successful validation, the way the app
reaches that state.
@gcutrini
gcutrini requested a review from smarcet August 13, 2026 16:42
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4ee14309-9ba2-48d8-b8cc-b8e5d7471ecc

📥 Commits

Reviewing files that changed from the base of the PR and between dadb3b7 and 00ad26c.

📒 Files selected for processing (1)
  • src/__tests__/discoverPromoCodes.integration.test.js

📝 Walkthrough

Walkthrough

The integration test now matches the current promo-code hook validation flow. It uses act, response-based validation, and explicit onRevalidate invocation with a qualifying ticket.

Changes

Promo code test alignment

Layer / File(s) Summary
Update validation flow
src/__tests__/discoverPromoCodes.integration.test.js
The test imports act, removes obsolete verification-state props, uses response-based validation, and obtains verification state through onRevalidate.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 00ad2

This is a localized test-only update that aligns the integration test with the merged promotion-hook behavior; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: smarcet

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the integration test fix required by the merged promo hook changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/discover-integration-test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gcutrini
gcutrini merged commit 28321ed into main Aug 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant