-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Plans on JP: Update UI test to reach purchase result screen #20805
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: Update UI test to reach purchase result screen #20805
Conversation
|
@guarani if you're interested, it looks like |
|
| App Name | WordPress Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr20805-51fe2ef | |
| Version | 23.5 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 51fe2ef | |
| App Center Build | WPiOS - One-Offs #7523 |
|
| App Name | Jetpack Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr20805-51fe2ef | |
| Version | 23.5 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 51fe2ef | |
| App Center Build | jetpack-installable-builds #6550 |
This seems like an interesting approach. I watched the screen recording and agree this test can ensure that the app can handle the redirects. On Calypso a test for Automattic/wp-calypso#77029 could verify the sequence of screens and redirect URLs don't get changed. |
Yes. These are not E2E tests, only native UI tests. Just like with mocked APIs, we expect our app to behave in a certain way given the input.
👍 Good idea |
|
Ready for review. The whole free to paid plans flow on the native side is now covered with UI tests |
guarani
left a comment
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.
👋 While the changes look good, I keep running into the issue where the dashboard card doesn't appear and the UI test keeps trying to scroll the screen up to find it (similar to #20728 (review)). It also works the second time I run the app.
I re-read your comment, #20728 (comment), and the fix you added (reloading local cards after the app fetches the site domains), but don't see anything wrong.
Stopping at breakpoints seems to affect whether the card shows up or not, so I printed hasLoadedDomains in both the failing scenario (1st run after fresh install) and the passing scenario (2nd run) and there's a difference:
| Not working | Working |
|---|---|
![]() |
![]() |
I thought to check if this is reproducible on trunk and it isn't. I did two fresh installs and both worked the first time. Have you tried a fresh install on this branch? I'm curious if you can reproduce.
It is reproducible but only sometimes. In a morning investigation, I couldn't point out exactly why it would happen. Even in your "not working" scenario, the third reload of the free to-paid plan card indicates that domains are loaded so the card should appear. I continue investigating. |
|
I found the issue that
I haven't identified how these API mocks are matched and how it differs between the first or second launches. However, after making the mocks consistent, I could no longer reproduce the issue in multiple attempts. Could you try it out again, @guarani, thanks! |
|
👋 Hey @staskus, I gave this a try today and weirdly still getting the same issue. I'd love to investigate more today, but I want to prioritise manually testing the flows since the project is close to finishing. Do you agree with de-prioritizing this until we're confident we've done enough manual testing? I appreciate you investigating this and I think once it's working, having the UI test here for the happy path will be very valuable to catch regressions going forward. |
Yes, we can wait given the issues we're facing in producing these tests. |
- Introduce fake checkout and plans pages to be used in UI tests - Use WireMock mocks to match plans/yearly and checkout pages to open fake views
Use the same mechanism as mocking base WP.com rest API URL by adding and editing the value through Environment struct
- hasMappedDomain returns incorrect value in UI Tests when unmaped_url and url mismatch unintentionally
This reverts commit 41d91de.
This reverts commit a1cfc1e.
49f5670 to
74d086e
Compare





Fixes #20790
Implementation
WireMockto mock web view pages instead of API endpointsEnvironmentto injectWireMockURL and use it instead of WP.com URLTo test:
Regression Notes
Affecting free to paid plans flow
Manually retesting the whole purchase flow
Covered the whole free to paid plans flow with automated UI Tests
PR submission checklist:
RELEASE-NOTES.txtif necessary.Video
Full.Flow.UI.Test.mp4