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

[JP Content Migration Flow] Adds jetpack migration email api call #17531

Merged
merged 6 commits into from
Nov 25, 2022

Conversation

antonis
Copy link
Contributor

@antonis antonis commented Nov 24, 2022

Fixes #17481

Depends on: wordpress-mobile/WordPress-FluxC-Android#2576

To test:

Enable the Jetpack Content Migration Flow

Enable the following flags in the build.gradle

        buildConfigField "boolean", "JETPACK_POWERED_BOTTOM_SHEET", "true"
        buildConfigField "boolean", "JETPACK_SHARED_LOGIN", "true"
        buildConfigField "boolean", "JETPACK_LOCAL_USER_FLAGS", "true"
        buildConfigField "boolean", "JETPACK_BLOGGING_REMINDERS_SYNC", "true"
        buildConfigField "boolean", "JETPACK_READER_SAVED_POSTS", "true"
        buildConfigField "boolean", "JETPACK_PROVIDER_SYNC", "true"
        buildConfigField "boolean", "JETPACK_MIGRATION_FLOW", "true"

Success flow

  1. Enable the Jetpack Content Migration Flow
  2. Install the WordPress app flavor from this branch
  3. Login to the WordPress app and select a site
  4. Uninstall the Jetpack app or log out of Jetpack and delete all data.
  5. Run the Jetpack app from this branch
  6. Expect to see the migration flow
  7. Press the main buttons to proceed till the end of the flow
  8. Verify that you received an email confirming your migration
  9. Verify that the tracking event Tracked: migration_email_triggered is emitted

Error flow

  1. Repeat the steps above starting from 4
  2. Repeat the steps 4 to 7 above
  3. Verify that you received no email confirming your migration
  4. Verify that the tracking event Tracked: migration_email_failed, Properties: {"error_type":"This endpoint limited to 2 requests per email address per hour."} is emitted

Regression Notes

  1. Potential unintended areas of impact
    N/A

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

  3. What automated tests I added (or what prevented me from doing so)
    Added api tests in Adds Jetpack migration API call WordPress-FluxC-Android#2576

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.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Nov 24, 2022

Jetpack📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr17531-929ea97.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppJetpack
Build FlavorJalapeno
Build TypeDebug
Commit929ea97
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@antonis antonis changed the title Adds jetpack migration email api call [JP Content Migration Flow] Adds jetpack migration email api call Nov 24, 2022
@peril-wordpress-mobile
Copy link

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

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Nov 24, 2022

WordPress📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr17531-929ea97.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppWordPress
Build FlavorJalapeno
Build TypeDebug
Commit929ea97
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

Copy link
Contributor

@develric develric left a comment

Choose a reason for hiding this comment

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

Tested as per steps and works as described. Code LGTM 👍

Feel free to merge this one after merging the companion FluxC and linking to the FluxC trunk 🙇

Antonis Lilis added 2 commits November 25, 2022 10:13
# Conflicts:
#	WordPress/src/main/java/org/wordpress/android/ui/main/jetpack/migration/JetpackMigrationViewModel.kt
@wpmobilebot
Copy link
Contributor

Found 1 violations:

The PR caused the following dependency changes:

-+--- org.wordpress:fluxc:{strictly trunk-c0c1d3d56d09eec19e668eb6e2f3bcff648c644f} -> trunk-c0c1d3d56d09eec19e668eb6e2f3bcff648c644f
-|    +--- org.wordpress:wellsql:1.7.0
-|    |    \--- org.wordpress.wellsql:wellsql-annotations:1.7.0
-|    +--- org.wordpress.fluxc:fluxc-annotations:trunk-c0c1d3d56d09eec19e668eb6e2f3bcff648c644f
-|    +--- org.greenrobot:eventbus:3.3.1 (*)
-|    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.9.2 (*)
-|    +--- com.android.volley:volley:1.1.1 -> 1.2.0
-|    +--- androidx.paging:paging-runtime:2.1.2
-|    |    +--- androidx.paging:paging-common:2.1.2
-|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.2.0
-|    |    |    \--- androidx.arch.core:core-common:2.0.0 -> 2.1.0 (*)
-|    |    +--- androidx.arch.core:core-runtime:2.0.0 -> 2.1.0 (*)
-|    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.4.1 (*)
-|    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.4.1 (*)
-|    |    \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0 (*)
-|    +--- com.goterl:lazysodium-android:5.0.2
-|    +--- net.java.dev.jna:jna:5.5.0
-|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 (*)
-|    +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.10 (*)
-|    +--- androidx.appcompat:appcompat:1.0.2 -> 1.3.1 (*)
-|    +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0 (*)
-|    +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.3.3 (*)
-|    +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0 -> 4.9.2
-|    |    +--- com.squareup.okhttp3:okhttp:4.9.2 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.6.10 (*)
-|    +--- com.google.code.gson:gson:2.8.5
-|    +--- org.apache.commons:commons-text:1.1 -> 1.10.0 (*)
-|    +--- androidx.room:room-runtime:2.4.2 (*)
-|    +--- androidx.room:room-ktx:2.4.2
-|    |    +--- androidx.room:room-common:2.4.2 (*)
-|    |    +--- androidx.room:room-runtime:2.4.2 (*)
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
-|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 (*)
-|    +--- com.google.dagger:dagger:2.42 (*)
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.5.2 (*)
-|    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.5.2 (*)
++--- org.wordpress:fluxc:{strictly trunk-9266d1b01317fcecf068e737e51a07186a1baf8f} -> trunk-9266d1b01317fcecf068e737e51a07186a1baf8f
+|    +--- org.wordpress:wellsql:1.7.0
+|    |    \--- org.wordpress.wellsql:wellsql-annotations:1.7.0
+|    +--- org.wordpress.fluxc:fluxc-annotations:trunk-9266d1b01317fcecf068e737e51a07186a1baf8f
+|    +--- org.greenrobot:eventbus:3.3.1 (*)
+|    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.9.2 (*)
+|    +--- com.android.volley:volley:1.1.1 -> 1.2.0
+|    +--- androidx.paging:paging-runtime:2.1.2
+|    |    +--- androidx.paging:paging-common:2.1.2
+|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.2.0
+|    |    |    \--- androidx.arch.core:core-common:2.0.0 -> 2.1.0 (*)
+|    |    +--- androidx.arch.core:core-runtime:2.0.0 -> 2.1.0 (*)
+|    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.4.1 (*)
+|    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.4.1 (*)
+|    |    \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0 (*)
+|    +--- com.goterl:lazysodium-android:5.0.2
+|    +--- net.java.dev.jna:jna:5.5.0
+|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 (*)
+|    +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.10 (*)
+|    +--- androidx.appcompat:appcompat:1.0.2 -> 1.3.1 (*)
+|    +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0 (*)
+|    +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.3.3 (*)
+|    +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0 -> 4.9.2
+|    |    +--- com.squareup.okhttp3:okhttp:4.9.2 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.6.10 (*)
+|    +--- com.google.code.gson:gson:2.8.5
+|    +--- org.apache.commons:commons-text:1.10.0 (*)
+|    +--- androidx.room:room-runtime:2.4.2 (*)
+|    +--- androidx.room:room-ktx:2.4.2
+|    |    +--- androidx.room:room-common:2.4.2 (*)
+|    |    +--- androidx.room:room-runtime:2.4.2 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 (*)
+|    +--- com.google.dagger:dagger:2.42 (*)
+|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.5.2 (*)
+|    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.5.2 (*)
 \--- org.wordpress:login:1.0.0
-     \--- org.wordpress:fluxc:2.0.0 -> trunk-c0c1d3d56d09eec19e668eb6e2f3bcff648c644f (*)
+     \--- org.wordpress:fluxc:2.0.0 -> trunk-9266d1b01317fcecf068e737e51a07186a1baf8f (*)

Please review and act accordingly

@antonis antonis enabled auto-merge November 25, 2022 09:01
@antonis antonis merged commit 296b8fe into trunk Nov 25, 2022
@antonis antonis deleted the task/add-jetpack-migration-email-api-call branch November 25, 2022 09:32
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.

Android - Email
3 participants