-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add withdraw page #31
Conversation
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.
This is awesome! Thanks @kirahsapong!!
testWidgets('should navigate to Deposit screen on tap of deposit button', | ||
(tester) async { | ||
await tester.pumpWidget( | ||
WidgetHelpers.testableWidget(child: const AccountBalance()), | ||
); | ||
|
||
await tester.tap(find.text('Deposit')); | ||
await tester.pumpAndSettle(); | ||
|
||
expect(find.byType(DepositPage), findsOneWidget); | ||
}); | ||
|
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.
Nice!!
final depositAmountPattern = RegExp(r'\$[0-9]+\.[0-9]{2}$'); | ||
|
||
expect(find.textContaining(depositAmountPattern), findsExactly(2)); |
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.
Will these amounts not be consistent in these tests? Like can we find.text
with exact matches? Or do we need the regex here.
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.
agree with you on exact matches, the test replacing this one (currency converter) finds exact matches but i've left in the regex, though happy to remove also! it was in the deposit page test - though i suppose its nice to confirm we have something resembling numbers showing up in the component, lol. 😆 in the new currency converter test it sits alongside expects that are looking for exact matches
niiiice! |
Closes #16
currencyConverter
component #30