woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
277 stars 135 forks source link

[Blaze i4] Add switch to the objective screen #12795

Closed irfano closed 1 month ago

irfano commented 1 month ago

Description

This adds a switch to the bottom of the blaze objective screen. The switch will store the selected objective and in the next campaign creation, the it will be selected automatically.

Steps to reproduce

  1. Log into a Blaze-eligible site.
  2. Trigger Blaze campaign creation flow.
  3. Tap "Campaign objective" on the preview screen.

Testing information

Case 1

  1. Verify the switch is disabled.
  2. Disable switch.
  3. Tap back button.
  4. Reopen objective screen.
  5. The switch button should be enabled.

Case 2

  1. Select an objective
  2. Enable the switch.
  3. Tap SAVE.
  4. Kill the app.
  5. Retrigger the blaze flow and open objective screen.
  6. Verify the same objective is selected.

Case 3 - Analytics

  1. Tap the objective row, select an option from the list, and tap Save. Confirm that blaze_campaign_objective_saved is tracked with the ID of the selected objective.
  2. Tap Confirm Details on the Preview screen. Confirm that blaze_creation_confirm_details_tapped is tracked with the ID of the selected objective.

The tests that have been performed

Tested cases above.

Images/gif

split screen

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:

dangermattic commented 1 month ago
1 Warning
:warning: This PR is assigned to the milestone 20.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.
1 Message
:book:

This PR contains changes to Tracks-related logic. Please ensure (author and reviewer) the following are completed:

  • The tracks events must be validated in the Tracks system.
  • Verify the internal Tracks spreadsheet has also been updated.
  • Please consider registering any new events.
  • The PR must be assigned the category: tracks label.

Generated by :no_entry_sign: Danger

wpmobilebot commented 1 month ago
📲 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
Commit185a0fe20c9f0e93320f99b5ec18c2677e34e8a1
Direct Downloadwoocommerce-wear-prototype-build-pr12795-185a0fe.apk
wpmobilebot commented 1 month ago

📲 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
Commit185a0fe20c9f0e93320f99b5ec18c2677e34e8a1
Direct Downloadwoocommerce-prototype-build-pr12795-185a0fe.apk
codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 2.56410% with 38 lines in your changes missing coverage. Please review.

Project coverage is 40.80%. Comparing base (d2f7e2d) to head (185a0fe). Report is 7 commits behind head on trunk.

Files with missing lines Patch % Lines
...ation/objective/BlazeCampaignObjectiveViewModel.kt 0.00% 27 Missing :warning:
...om/woocommerce/android/ui/blaze/BlazeRepository.kt 0.00% 5 Missing :warning:
...rc/main/kotlin/com/woocommerce/android/AppPrefs.kt 0.00% 4 Missing :warning:
.../kotlin/com/woocommerce/android/AppPrefsWrapper.kt 0.00% 1 Missing :warning:
...n/preview/BlazeCampaignCreationPreviewViewModel.kt 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #12795 +/- ## ============================================ - Coverage 40.82% 40.80% -0.02% Complexity 5752 5752 ============================================ Files 1237 1237 Lines 69795 69829 +34 Branches 9693 9699 +6 ============================================ + Hits 28493 28494 +1 - Misses 38675 38707 +32 - Partials 2627 2628 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.