Closed ethan-tbd closed 1 month ago
.take
Thanks for taking this issue! Let us know if you have any questions!
Hey @ethan-tbd , I’ve created a few tests, but I’m running into an issue with the second one—it keeps failing. Do you have any suggestions on how I might resolve this?
Here’s the commit link with the code: Commit 149c5b22e57b481c21d66da96c90c3ad6f6f5591
Thanks for any insights you can provide!
Hey @mohitrajsinha maybe it would help if you open a PR? That way ethan or me could check it out and suggest changes to help you get your test working!
@mohitrajsinha there are two problems that are contributing to the failing test case:
WidgetHelpers.testableWidget()
(this will take care of the localized string errors)ModalSelectCurrency
, you will see that if offeringsMap
in PaymentAmountState
is null, then an empty container is rendered. in your setUp
function, make sure to initialize offeringsMap
(hint: look at the TestData
class).@mohitrajsinha also some nits:
_test
find.byKey()
, you can just use find.text('USD')
since you are setting the testCurrency
value to USD
Yeah ,it was great to work on this issue. It was my first time working on a flutter tests.
Thanks for your suggestions.
CurrencyDropdown
widgetCurrencyDropdown
widget is responsible for:PaymentAmountState
to render a list of PFI offerings to choose fromPaymentAmountState
when a new offering is selected from the "Select currency" modal