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
Fix CardDetectTest
and SSDOcrTest
TODO
s
#7681
base: master
Are you sure you want to change the base?
Fix CardDetectTest
and SSDOcrTest
TODO
s
#7681
Conversation
Pablo Guardiola seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
65bcf3f
to
4e30676
Compare
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.
Thanks for doing this! this looks good to me.
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.
looks like you'll need to sign the CLA. I'll approve once that's done.
Thanks for taking the time reviewing my contribution @awush-stripe πββοΈ
Originally had some issues signing the CLA but I was able to do it, and apparently everything went well, in fact the BTW I noticed that there are some E2E tests failing https://github.com/stripe/stripe-android/actions/runs/7037971542/job/19872041475?pr=7681
I'm going to rebase from Thanks again! |
4e30676
to
c28a080
Compare
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.
looks good! let's see what bitrise says
Unfortunately it keeps complaining π Same E2E tests failing π
Will try to reproduce / run these tests locally and report back here π Thanks Adam! |
Summary
CardDetectTest
andSSDOcrTest
TODO
sMotivation
Quick PR fixing
CardDetectTest
andSSDOcrTest
TODO
s that I found while exploringstripe-android
's repo / learning how Stripe's Android SDK works. This is mostly a quick refactoring that addresses that tech debt replacingrunBlocking
occurrences byrunTest
as Kotlin/kotlinx.coroutines#1204 was already fixed.Also, when checking that the changes made in
CardDetectTest
were working as expected, noticed that the tests were not formatted to follow the tripleA
(A
rrange /A
ct /A
ssert) while tests inSSDOcrTest
were, so for consistency, took a quick pass and re-structured them. Reasoning: I think that normally is good to structure the tests following the triple A π https://speakerdeck.com/guardiola31337/elegant-unit-testing-mobilization-2016?slide=40 http://wiki.c2.com/?ArrangeActAssertBTW, I'm a big fan of Working Effectively with Unit Tests
Using DAMP you increase maintainability and readability of the tests π
On a side note, I highly recommend you reading that book (if you haven't already). It's π π―
Testing
Added tests
Modified tests
Manually verified
Run tests locally to confirm there are no regressions and all tests are β
Screenshots
Changelog