-
Notifications
You must be signed in to change notification settings - Fork 121
Store creation M2: integrate with mock IAP to test the entire flow #8154
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… to become a Jetpack site --> continue with the new Atomic site.
* feat/8117-store-name-form: Show store name form as the first screen in the store creation flow that continues to the domain selector. Create store name form for store creation. 8079 Remove plugins.sync to fix payment cancellation Simpler name. Add feature area to preparing reader release note Remove errors related to other PurchaseResult cases 8079 Add Preparing Card Reader spinner to 11.3 Update tests to match changes to flow 8079 Show spinner while preparing reader for payment 8079Add PreparingReader card reader modal 8079 Add Indefinite progress view style Add descriptions for IAP Store errors Better text. Use environment variable to get test site id for IAP Improve error handling in the IAP store Show an alert in the IAP debug screen when a purchase fails # Conflicts: # WooCommerce/Classes/Authentication/Store Creation/StoreCreationCoordinator.swift
* feat/8117-store-name-form: Update store name text field placeholder based on the latest design. Update `StoreCreationCoordinatorTests` now that store name form becomes the first screen.
* trunk: Remove trailing whitespace. Typealias the purchase result type Include purchase result in purchaseProduct API Verify last navigation step in create_new_order test Distribute WCiOS Prototype Builds to Collaborators Makes a simpler version of the sandbox warning. Only show alert if the sandbox environment url is not setup. Make WordPressApiError conform to LocalizedError so it shows in alerts Remove unnecessary `discardableResult`s from UnifiedOrderScreen Remove unnecessary `discardableResult`s from SingleOrderScreen Add additional ElementGetter to init Remove 2 `discardableResult`s from UnifiedOrderScreen Add a warning text and alert to remind the importance of setting up the sandbox. Update test name to match conventions Ignore API errors when an order already exists Pause transaction listener while purchasing Update test coverage documentation for edit order UI test Rename the test Add action to close Order Edit flow in UI test Add products check in Order Edit UI test
…ore creation flow development.
…tegration * feat/8118-store-creation-success: (22 commits) Create `StoreCreationSuccessView` and its hosting controller for store creation success screen. Remove redundant period Remove background color on empty stores cell Rename enum Strings to Links Fix test failure for AuthenticationManager Revert unnecessary changes Remove the navigation to the native jetpack flow from the site address login flow Fix issue navigating to the native jetpack flow from the site address login flow Update unit test ULErrorViewController with the terms label Add unit tests for JetpackSetupRequiredViewModel Make termsLabelText an NSAttributedString instead of Publisher Add terms label to the jetpack setup required screen Add help button on Jetpack setup required Navigate to native jetpack flow from AuthenticationManager Add JetpackSetupRequiredViewModel Add terms label to ULErrorViewController Embed labels on the empty store screen in a stack view Update empty store screen with new image and copies Add temporary feature flag for the native jetpack setup flow Update IconsTests with new assets ...
* trunk: StoreCreationSuccessView: replace fixed bottom view below the scroll view by using `safeAreaInset` from CR suggestion. Clear products onboarding banner and resync announcements when a product is added Trigger add product flow for products onboarding without switching tabs Remove not needed functions. Cleanup tests for removed auth tools Remove unused wp-com auth tools from WebKitVC
…instead of pushing it to the navigation stack (with an odd background glitch).
…n bar back button.
… hosting controller to SwiftUI view to fix large title issues.
Collaborator
You can test the changes from this Pull Request by:
|
5 tasks
selanthiraiyan
approved these changes
Nov 21, 2022
Contributor
selanthiraiyan
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.
LGTM 🚢 🎉
|
|
||
| // MARK: - Store creation M2 | ||
|
|
||
| /// This property is kept as a lazy var instead of a dependency in the initializer because `InAppPurchasesForWPComPlansManager` is a @MainActor. |
Contributor
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 explaining in the comments.
1 task
* trunk: (42 commits) Freeze strings for localization Release Notes: add new section for next version (11.4) Update draft release notes for 11.3. Bump version number Add a root view for the analytics hub Hide analytics hub button behind feature flag Animate analytics hub button during stats loading state Add analytics hub button on the stats dashboard Add a new feature flag for the analytics hub Update Experiments/Experiments/FeatureFlag.swift Add feature flag for adding SSR to support request Remove 💜 character from release notes Bump version number Update metadata translations Update app translations – `Localizable.strings` Add reset button Fix layout for the eye button Update error code and domain check for wrong credentials Add top padding to bottom button Use `SecureField` for showsSecureInput ...
1 task
* trunk: Update sample stats with averageOrderValue from mock Update metadata strings Update release notes for 11.3 Add averageOrderValue to OrderStatsV4Totals storage entity Use Decimal type for consistent stats data handling Add Average Order Value to OrderStatsV4Totals model
Generated by 🚫 dangerJS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
status: feature-flagged
Behind a feature flag. Milestone is not strongly held.
type: task
An internally driven task.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #8108
Description
Using an IAP mock
There is still an IAP backend issue (p1668419146340439-slack-C025A8VV728) that results in a
Server could not read responsefailure (p1668592527610099/1668419146.340439-slack-C025A8VV728) when I tested purchasing the eCommerce plan. In order to unblock us from testing and developing the store creation flow, I decided to create a mock implementation ofInAppPurchasesForWPComPlansProtocolin debug builds using the DEBUG macro and a feature flagstoreCreationM2WithInAppPurchasesEnabledto easily turn it on and off. The DEBUG macro is used so that the mock struct isn't included in non-debug builds, since it's generally a good practice not to include mock/debug classes in production builds. If you feel like the use of the macro makes it harder to read, I can also remove the macro condition since it's only temporary.Changes to navigation bar title & back button styles
Because the
store name form(StoreNameForm) andplan purchase view(StoreCreationPlanView) screens do not use any navigation bar title, before this PR a gap is shown below the navigation bar for these screens. I struggled with various navigation bar title styles in all different screens in the flow, sometimes disabling the large title style in one screen results in the next screen not being able to show a large title. I also got stuck on hiding the back button in the navigation bar forStoreCreationPlanView. After debugging for a while, I realized that the issues were from having SwiftUI view in aUIHostingControllerand setting navigation bar title and back button in the hosting controller 🤦🏻♀️ As a result, I changed the navigation bar title and back button configurations from the hosting controller to the SwiftUI view.Changes to
StoreCreationCoordinatorUsing the IAP interface
InAppPurchasesForWPComPlansProtocol, we can now integrate the whole flow with each step in place. To wait for the newly created site to become a Jetpack site, I copied most of the logic from M1 implementation but the site ID subscription feels a bit odd to me since it never changes. Please feel free to suggest a better solution not using Combine.Testing instructions
Switch store+ Add a storeCreate a new store--> an in-progress modal should be shown briefly, then dismissed. the store name form is then presentedContinuewhen ready --> the store name should be used for the initial domain query in the next screenContinue--> a free Simple site should be created, and a store summary screen is shown with the store name and site slugContinue to payment--> the eCommerce plan should be shownCreate Store for $69.99/month--> an in-progress screen should be shown about creating the store. after the site becomes available in the/me/sitesresponse, the success screen should be shownManage My Storeto continue to the new site in the app --> a WC version alert is probably shown because it's a Simple site without WCScreenshots
simulator.mov
RELEASE-NOTES.txtif necessary.