-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(Bonus Pagamenti Digitali): [#176842973] Add tests for the CoBadge components #2826
Conversation
Affected stories
|
Codecov Report
@@ Coverage Diff @@
## master #2826 +/- ##
==========================================
+ Coverage 57.21% 57.30% +0.09%
==========================================
Files 827 827
Lines 22997 22997
Branches 4308 4308
==========================================
+ Hits 13157 13179 +22
+ Misses 9752 9730 -22
Partials 88 88
Continue to review full report at Codecov.
|
const ToBeTested: React.FunctionComponent<React.ComponentProps< | ||
typeof CoBadgeChooseType | ||
>> = (props: React.ComponentProps<typeof CoBadgeChooseType>) => ( | ||
<CoBadgeChooseType {...props} /> | ||
); | ||
const mockStore = configureMockStore<GlobalState>(); | ||
const store: ReturnType<typeof mockStore> = mockStore({ | ||
...globalState | ||
} as GlobalState); | ||
|
||
return { | ||
component: renderScreenFakeNavRedux<GlobalState, NavigationParams>( | ||
ToBeTested, | ||
ROUTES.WALLET_BPAY_DETAIL, | ||
{ abi, legacyAddCreditCardBack }, | ||
store | ||
), | ||
store | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const ToBeTested: React.FunctionComponent<React.ComponentProps< | |
typeof CoBadgeChooseType | |
>> = (props: React.ComponentProps<typeof CoBadgeChooseType>) => ( | |
<CoBadgeChooseType {...props} /> | |
); | |
const mockStore = configureMockStore<GlobalState>(); | |
const store: ReturnType<typeof mockStore> = mockStore({ | |
...globalState | |
} as GlobalState); | |
return { | |
component: renderScreenFakeNavRedux<GlobalState, NavigationParams>( | |
ToBeTested, | |
ROUTES.WALLET_BPAY_DETAIL, | |
{ abi, legacyAddCreditCardBack }, | |
store | |
), | |
store | |
}; | |
}; | |
const mockStore = configureMockStore<GlobalState>(); | |
const store: ReturnType<typeof mockStore> = mockStore({ | |
...globalState | |
} as GlobalState); | |
return { | |
component: renderScreenFakeNavRedux<GlobalState, NavigationParams>( | |
CoBadgeChooseType, | |
ROUTES.WALLET_BPAY_DETAIL, | |
{ abi, legacyAddCreditCardBack }, | |
store | |
), | |
store | |
}; | |
}; |
What you think about avoid to wrap the component? Or there is some reason behind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. There is no reason to wrap the component.
I initially wrapped it because I had some problems with the nav props, and this seemed to fix it.
Removed in 379f267
Short description
This PR add the tests missed during the development of the cobadge flow.
List of changes proposed in this pull request