Skip to content

[Payment Method Improvements] Add more tests #11607

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

Merged
merged 27 commits into from
May 30, 2024
Merged

Conversation

backwardstruck
Copy link
Contributor

Closes: #11542

This PR is branched off of #11606

Description

Add more unit tests to increase test coverage.

Testing instructions

Unit tests should pass

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@backwardstruck backwardstruck added category: unit tests Related to unit testing. feature: mobile payments Related to mobile payments / card present payments / Woo Payments. labels May 29, 2024
@backwardstruck backwardstruck added this to the 18.9 milestone May 29, 2024
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 29, 2024

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
FlavorJalapeno
Build TypeDebug
Commit84194cb
Direct Downloadwoocommerce-prototype-build-pr11607-84194cb.apk

@codecov-commenter
Copy link

codecov-commenter commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.32%. Comparing base (4b1037b) to head (84194cb).
Report is 20 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #11607   +/-   ##
=========================================
  Coverage     39.32%   39.32%           
- Complexity     5225     5232    +7     
=========================================
  Files          1096     1097    +1     
  Lines         63984    63992    +8     
  Branches       8797     8797           
=========================================
+ Hits          25160    25165    +5     
- Misses        36501    36506    +5     
+ Partials       2323     2321    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@backwardstruck backwardstruck marked this pull request as ready for review May 29, 2024 05:41
@backwardstruck backwardstruck changed the title Add more tests [Payment Method Improvements] Add more tests May 29, 2024
@backwardstruck backwardstruck requested a review from kidinov May 29, 2024 05:46
@backwardstruck
Copy link
Contributor Author

Working on resolving the conflicts with the target branch...

…update-tests

# Conflicts:
#	WooCommerce/src/test/kotlin/com/woocommerce/android/ui/payments/changeduecalculator/ChangeDueCalculatorViewModelTest.kt
Copy link
Contributor

@kidinov kidinov left a comment

Choose a reason for hiding this comment

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

@backwardstruck 👋

Could you please test that all once again as the changes I was doing a bit in a rush as I am quite overwhelmed with the pos?

Then you can just change the feature flag. But please do not forget to remove feature flag, OtherPaymentMethodsEnabled class and all the "old" cash collection code - dialog/tests and so on in the following PR (can be merged to the next release)

@backwardstruck
Copy link
Contributor Author

@backwardstruck 👋

Could you please test that all once again as the changes I was doing a bit in a rush as I am quite overwhelmed with the pos?

Then you can just change the feature flag. But please do not forget to remove feature flag, OtherPaymentMethodsEnabled class and all the "old" cash collection code - dialog/tests and so on in the following PR (can be merged to the next release)

Sure! I created this ticket for that code removal:
#11625

Testing now. And changing the FF value to true

Base automatically changed from 11604-gray-out-button-until-payment-amount to trunk May 30, 2024 13:55
@dangermattic
Copy link
Collaborator

dangermattic commented May 30, 2024

1 Warning
⚠️ This PR is assigned to the milestone 18.9. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@backwardstruck backwardstruck merged commit 0c82513 into trunk May 30, 2024
14 checks passed
@backwardstruck backwardstruck deleted the 11542-update-tests branch May 30, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: unit tests Related to unit testing. feature: mobile payments Related to mobile payments / card present payments / Woo Payments.
Projects
None yet
5 participants