Skip to content

Fix for payment selection screen shown after successful payment #12415

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

Conversation

samiuelson
Copy link
Contributor

@samiuelson samiuelson commented Aug 26, 2024

Closes: #10920

Description

There was a bug in navigation resulting in showing "Take payment" screen again after the payment was successfully collected (e.g. cash payment) after creating an order. The issue was present on large screens in tablet mode.

Steps to reproduce

Steps to reproduce the bug:

  1. Go to order list
  2. Start the order creation flow
  3. Add a product or a custom amount
  4. Tap on Collect Payment
  5. Select Cash
  6. Confirm
  7. Press back
  8. Notice the app navigates you back to the Payment Selection screen

Testing information

The tests should verify that after collecting the payment the app redirects to the order list screen (in phone mode) and to the orders with order details (in tablet mode). Pressing "back" should redirect to the "My store" screen.

The tests that have been performed

I tested the above scenario on phone and tablet physical devices: Pixel 8 and Galaxy Tab, Android 14.

Images/gif

Screen_recording_20240826_162709.mp4
  • 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.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Aug 26, 2024

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit578860c
Direct Downloadwoocommerce-wear-prototype-build-pr12415-578860c.apk

@samiuelson samiuelson added the feature: order creation Related to the Order Creation feature label Aug 26, 2024
@samiuelson samiuelson added this to the 20.2 milestone Aug 26, 2024
@samiuelson samiuelson marked this pull request as ready for review August 26, 2024 14:31
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Aug 26, 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
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit578860c
Direct Downloadwoocommerce-prototype-build-pr12415-578860c.apk

@backwardstruck backwardstruck self-assigned this Aug 26, 2024
@backwardstruck
Copy link
Contributor

It seems to be working correctly in my testing, although the original issue was filed before I added the new change due calculator: #11606 so the repro steps are a little different.

Copy link
Contributor

@backwardstruck backwardstruck left a comment

Choose a reason for hiding this comment

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

The code change looks fine to me. As the testing steps have changed a bit from the original issue, I'm not sure that I was able to reproduce it on trunk though. Happy to re-test on trunk with additional instructions.

@samiuelson samiuelson changed the title 10920 fix payment selection shown after successful payment Fix for payment selection screen shown after successful payment Aug 27, 2024
@samiuelson
Copy link
Contributor Author

The code change looks fine to me. As the testing steps have changed a bit from the original issue, I'm not sure that I was able to reproduce it on trunk though. Happy to re-test on trunk with additional instructions.

👋 @backwardstruck, thanks for review! Sure, I'm sending a video with the reproduction steps shown below:

Screen_recording_20240827_112911.mp4

@backwardstruck
Copy link
Contributor

Thanks for the video @samiuelson I was able to repro on trunk and not in this branch. I see that I had not popped the back stack when adding that cash payment screen (since it was just a dialog before).

@samiuelson
Copy link
Contributor Author

Thanks for the video @samiuelson I was able to repro on trunk and not in this branch. I see that I had not popped the back stack when adding that cash payment screen (since it was just a dialog before).

IMO, it was broken for a long time, even before the due change calculator was added.

@backwardstruck backwardstruck merged commit 967ab49 into trunk Aug 27, 2024
14 checks passed
@backwardstruck backwardstruck deleted the 10920-fix-payment-selection-shown-after-successful-payment branch August 27, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: order creation Related to the Order Creation feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tablet - Two Pane Layout - Payment Selection screen remains on the backstack
3 participants