Skip to content
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

Plans on JP: Checkout Success #18497

Merged
merged 9 commits into from
May 29, 2023
Merged

Plans on JP: Checkout Success #18497

merged 9 commits into from
May 29, 2023

Conversation

ravishanker
Copy link
Contributor

@ravishanker ravishanker commented May 24, 2023

Updates checkout success screen to new design, and removes the old one

Fixes: #18422

Before After Dark Mode
Screenshot_20230522_125624 Screenshot_20230526_094453 Screenshot_20230526_094507

To test:

Feature Flag

  • Launch Jetpack app
  • Go to App Settings (Tap on Avatar at the top right hand corner on My Site -> Find App Settings)
  • Tap Debug Settings
  • Find dashboard_card_free_to_paid_plans under Remote features
  • Enable the flag, and restart the app (scroll down)

Store sandbox

  • Connect android emulator/device to sandbox paqN3M-5m-p2
  • Use sandbox on Jetpack app to test for free with test cards pc8HXX-14D-p2

Success screen

  • Verify plans card appears as shown above on dashboard
  • Tap on plans card
  • Verify it navigates to Register domain screen, and domains show label Free for the first year
  • Select a domain, and Tap on Select domain button
  • Verify that it goes to Plans page on the web
  • Tap on Upgrade button of a Personal or Premium Plan
  • Verify it takes to checkout screen
  • Use the test card numbers to purchase
  • Verify the Success screen is shown as in after image above
  • Verify the screen in landscape and dark mode as well
  • Tap on Done button, return to dashboard
  • If the app is connected to store sandbox, could verify that plans card doesn't show anymore
  • Otherwise, go to store admin, change to sandbox (if Live), find the site, and verify the plan subscription is added

Note

Regression Notes

  1. Potential unintended areas of impact
    None

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Unit tests and manual tests

  3. What automated tests I added (or what prevented me from doing so)
    Updated and added unit tests

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

UI Changes testing checklist:

  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

@ravishanker ravishanker added this to the 22.5 milestone May 24, 2023
@ravishanker ravishanker requested a review from staskus May 24, 2023 02:14
@ravishanker ravishanker self-assigned this May 24, 2023
@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 24, 2023

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr18497-92cd6cf
Commit92cd6cf
Direct Downloadjetpack-prototype-build-pr18497-92cd6cf.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 24, 2023

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr18497-92cd6cf
Commit92cd6cf
Direct Downloadwordpress-prototype-build-pr18497-92cd6cf.apk
Note: Google Login is not supported on these builds.

@staskus
Copy link
Contributor

staskus commented May 24, 2023

Thanks, @ravishanker, the flow overall works well! 👍

Couple observations:

  1. ❓ Pressing the back button from the Checkout view returns to the Plans view. (Update: Returns to Domains view, not Plans view) We haven't explicitly agreed on that in the scope but there's an iOS task to solve this issue cc @guarani

  2. ❌ After completing the purchase, the card still appears. Even after logout & login. I checked same happens when accessing the same site on iOS. site.hasFreePlan returns true. However, if I complete the same purchase on iOS sandbox, then site.hasFreePlan returns false and the card disappears 🤔. I wonder what happened differently on Android.

Android flow

test.android.mov

iOS flow (success not yet implemented)

Simulator.Screen.Recording.-.iPhone.14.-.2023-05-24.at.16.28.24.mp4

@ravishanker
Copy link
Contributor Author

ravishanker commented May 25, 2023

👋 @staskus - Thanks for testing

  1. ❓ Pressing the back button from the Checkout view returns to the Plans view.

It should or it shouldn't return to plans? Point 3 on that issue is saying it should return to plans view on back press.

  1. ❌ After completing the purchase, the card still appears. Even after logout & login. I checked same happens when accessing the same site on iOS. site.hasFreePlan returns true. However, if I complete the same purchase on iOS sandbox, then site.hasFreePlan returns false and the card disappears 🤔. I wonder what happened differently on Android.

Android flow

test.android.mov

iOS flow (success not yet implemented)

Simulator.Screen.Recording.-.iPhone.14.-.2023-05-24.at.16.28.24.mp4

🤔 Looks like site is not refreshing

@staskus
Copy link
Contributor

staskus commented May 25, 2023

It should or it shouldn't return to plans? Point 3 on that issue is saying it should return to plans view on back press.

@ravishanker, I think I misspoke. On Android, we return from Checkout to Domains view after tapping back. Ideally, it would return to the Plans view.

🤔 Looks like site is not refreshing

I will test again today, it's hard to tell, maybe it was related to the sandbox store and it's not actually an issue.

@ravishanker
Copy link
Contributor Author

🤔 Looks like site is not refreshing

I will test again today, it's hard to tell, maybe it was related to the sandbox store and it's not actually an issue.

I do get a receipt in email when testing upgrades, that upgrade happened. It's not clear, if the actual upgrade happens when using sandbox!

I checked with test accounts on Test Plan pc8eDl-WC-p2, hasFreePlan is returning true for free sites and false for paid ones.

Also, checked using Store Admin, the upgrade doesn't seem to actually happen, it goes through test tables apparently, not actual ones PCYsg-MaN-p2, and PCYsg-IA-p2

@staskus
Copy link
Contributor

staskus commented May 25, 2023

@ravishanker thanks for the information. I tested again and got the same results for the same site. The card disappears after completing the purchase on iOS and doesn't disappear on Android. On Android, I also get "Verify email" popup after completing the purchase, although I checked the email and I only got the receipt but not a verification email. Not sure if it's a related issue.

Are you getting the same result on Android yourself?

ios.test.again.mp4
android.test.again.mov

@ravishanker ravishanker requested a review from AjeshRPai May 25, 2023 07:42
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented May 25, 2023

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

Add a new activity result request code to avoid conflict with existing domain purchase
@ravishanker
Copy link
Contributor Author

ravishanker commented May 26, 2023

@ravishanker thanks for the information. I tested again and got the same results for the same site. The card disappears after completing the purchase on iOS and doesn't disappear on Android. On Android, I also get "Verify email" popup after completing the purchase, although I checked the email and I only got the receipt but not a verification email. Not sure if it's a related issue.

Are you getting the same result on Android yourself?

It doesn't disappear too if not pointing to the sandbox. It has to do with store Sandbox vs Live discrepancy! The transaction is created on sandbox, while dashboard site is live source.

From the FG: Testing the Store PCYsg-IA-p2

Note that while your store is sandboxed, all of the APIs will be backed by test tables instead of production tables. That means that all subscriptions, including plans, are completely separate. If you purchase something on production, you won’t see your purchase while sandboxed (and vice versa).

I've checked on the store admin, the subscription is being added successfully on store sandbox.

The email is not related to plans purchase, it's just a conflict with the plugin installation feature, fixed it now.

By any chance is your iOS simulator/device pointing to sandbox, while android emulator/device doesn't?

How to connect android emulator/device to sandbox paqN3M-5m-p2

@ravishanker ravishanker requested review from irfano and removed request for irfano May 28, 2023 23:46
Copy link
Contributor

@AjeshRPai AjeshRPai left a comment

Choose a reason for hiding this comment

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

Hey @ravishanker

The code changes looks good to me 👍🏼

Approving and merging the PR 🚀

@AjeshRPai AjeshRPai merged commit 5ca4b38 into trunk May 29, 2023
@AjeshRPai AjeshRPai deleted the Plans-on-JP-Success-Screen branch May 29, 2023 05:46
@staskus
Copy link
Contributor

staskus commented May 30, 2023

By any chance is your iOS simulator/device pointing to sandbox, while android emulator/device doesn't?

@ravishanker, thanks for the answers! It does point to the sandbox, otherwise, the payment wouldn't go through with the testing cards. After I make a purchase on Android, it does appear on SA but the API still tells that the user is on a free plan. It's strange to me that that doesn't happen on iOS. Not sure what could be the difference, since we both finish the purchase on the same web view 🤔

@staskus
Copy link
Contributor

staskus commented May 30, 2023

I tested further and it seems to be related to the sandbox store configuration rather than anything else.

On iOS, I observe the same behavior if I kill and relaunch the app after the purchase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plans on JP: Checkout - Success
4 participants