Skip to content

DCC2: complete eligibility fixtures - #273

Merged
CamilleFljt merged 2 commits into
feature/DCC2-adaptationfrom
feature/mxp-5077-complete-eligibility-fixtures
Sep 2, 2026
Merged

DCC2: complete eligibility fixtures#273
CamilleFljt merged 2 commits into
feature/DCC2-adaptationfrom
feature/mxp-5077-complete-eligibility-fixtures

Conversation

@CamilleFljt

Copy link
Copy Markdown
Contributor

The eligibility API now returns a transaction_country on each plan. Nothing consumes it yet, this PR gets the types and the test fixtures ready so the feature work can land on top without touching every fixture again.

While in there, the fixture file was missing the deferred plan shapes we need for the upcoming work, so they're added too.

@CamilleFljt
CamilleFljt changed the base branch from master to feature/DCC2-adaptation September 1, 2026 09:04

@greg-olivier greg-olivier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing is blocking for me, just a few suggestions/questions 🙂

Comment thread src/test/fixtures.ts Outdated
* Returns a copy of `plan` with its `transaction_country` overridden.
* The input plan is never mutated, so shared fixtures stay reusable across tests.
*/
export const withCountry = <T extends EligibilityPlan>(plan: T, countryCode: string): T => ({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Why use generic here ? Does a (plan: EligibilityPlan, countryCode: string): EligibilityPlan is sufficient ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right it's sufficient !

Comment thread src/hooks/useFetchEligibility.test.ts
@CamilleFljt
CamilleFljt merged commit 9707655 into feature/DCC2-adaptation Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants