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

Synchronise Sticker Pack setting fields #13358

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

audriu
Copy link
Contributor

@audriu audriu commented May 16, 2022

Synchronize Sticker Pack setting fields
fixes #13193

Summary

Implement functionality that handles the syncing of the stickers/recent-stickers settings

Platforms

  • Android
  • iOS
Functional
  • 1-1 chat
  • public chats
  • group chats

Steps to test

Enable synchronization as described in this comment:
#13053 (comment)

Open Status
Send stickers and see them added to recent stickers and synchronized in another device with the same account.

status: ready

@status-github-bot status-github-bot bot added this to REVIEW in Pipeline for QA May 16, 2022
@status-im-auto
Copy link
Member

status-im-auto commented May 16, 2022

Jenkins Builds

Click to see older builds (36)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 7d6943d #1 2022-05-16 05:41:08 ~9 min android-e2e 📦apk 📲
✔️ 7d6943d #1 2022-05-16 05:41:22 ~9 min android 📦apk 📲
✔️ 7d6943d #1 2022-05-16 05:46:16 ~14 min ios 📦ipa 📲
✔️ 8c5e163 #2 2022-05-30 14:13:22 ~9 min android-e2e 📦apk 📲
✔️ 8c5e163 #2 2022-05-30 14:13:31 ~9 min android 📦apk 📲
✔️ 8c5e163 #2 2022-05-30 14:19:31 ~15 min ios 📦ipa 📲
✖️ 7eb8d48 #3 2022-05-30 19:42:15 ~9 min android-e2e 📦apk 📲
✖️ 7eb8d48 #3 2022-05-30 19:42:28 ~9 min android 📦apk 📲
✖️ 7eb8d48 #3 2022-05-30 19:45:31 ~12 min ios 📦ipa 📲
✔️ dbc581c #4 2022-05-31 07:16:52 ~9 min ios 📦ipa 📲
✔️ dbc581c #4 2022-05-31 07:18:34 ~11 min android-e2e 📦apk 📲
✔️ dbc581c #4 2022-05-31 07:18:45 ~11 min android 📦apk 📲
8375b64 #5 2022-05-31 08:51:11 ~9 min ios 📄log
✔️ 8375b64 #5 2022-05-31 08:53:42 ~12 min android-e2e 📦apk 📲
✔️ 8375b64 #5 2022-05-31 08:54:28 ~13 min android 📦apk 📲
✔️ 8375b64 #6 2022-05-31 09:01:17 ~9 min ios 📦ipa 📲
✔️ 8375b64 #7 2022-05-31 15:51:08 ~20 min ios 📦ipa 📲
eb5b82b #8 2022-06-07 15:17:41 ~6 min ios 📄log
✔️ eb5b82b #6 2022-06-07 15:21:29 ~9 min android-e2e 📦apk 📲
✔️ eb5b82b #6 2022-06-07 15:23:36 ~11 min android 📦apk 📲
✔️ eb5b82b #9 2022-06-07 15:49:17 ~24 min ios 📦ipa 📲
✔️ eb5b82b #10 2022-06-08 10:09:45 ~14 min ios 📦ipa 📲
c0d0606 #11 2022-06-12 13:26:14 ~12 sec ios 📄log
c0d0606 #7 2022-06-12 13:26:21 ~23 sec android-e2e 📄log
c0d0606 #7 2022-06-12 13:26:24 ~22 sec android 📄log
fcc18c6 #8 2022-06-12 17:52:58 ~15 sec android-e2e 📄log
fcc18c6 #8 2022-06-12 17:52:58 ~15 sec android 📄log
fcc18c6 #12 2022-06-12 17:53:00 ~11 sec ios 📄log
4c71252 #13 2022-06-13 07:14:52 ~7 min ios 📄log
✔️ 4c71252 #9 2022-06-13 07:19:23 ~12 min android 📦apk 📲
✔️ 4c71252 #14 2022-06-13 07:47:46 ~15 min ios 📦ipa 📲
✔️ 4c71252 #15 2022-06-13 08:34:39 ~12 min ios 📦ipa 📲
✔️ 4c71252 #10 2022-06-13 08:45:37 ~9 min android-e2e 📦apk 📲
✔️ b872ada #11 2022-06-13 12:58:23 ~9 min android-e2e 📦apk 📲
✔️ b872ada #10 2022-06-13 12:58:47 ~9 min android 📦apk 📲
✔️ b872ada #16 2022-06-13 13:05:51 ~16 min ios 📦ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
26f2387 #17 2022-06-14 14:07:20 ~12 sec ios 📄log
26f2387 #12 2022-06-14 14:11:43 ~4 min android-e2e 📄log
26f2387 #11 2022-06-14 14:12:12 ~5 min android 📄log
✔️ e602a82 #13 2022-06-14 14:34:24 ~9 min android-e2e 📦apk 📲
✔️ e602a82 #12 2022-06-14 14:34:45 ~9 min android 📦apk 📲
✔️ e602a82 #18 2022-06-14 14:43:00 ~18 min ios 📦ipa 📲

@flexsurfer flexsurfer changed the title Synchronise Sticker Pack setting fields [WIP] Synchronise Sticker Pack setting fields May 16, 2022
@audriu audriu force-pushed the 13193-synchronise-sticker-pack-setting-fields branch 2 times, most recently from 8c5e163 to 7eb8d48 Compare May 30, 2022 19:32
@audriu audriu requested a review from flexsurfer May 30, 2022 19:33
@audriu audriu moved this from REVIEW to E2E Tests in Pipeline for QA May 30, 2022
@audriu audriu changed the title [WIP] Synchronise Sticker Pack setting fields Synchronise Sticker Pack setting fields May 30, 2022
@audriu audriu marked this pull request as draft May 31, 2022 06:04
@audriu audriu moved this from E2E Tests to CONTRIBUTOR in Pipeline for QA May 31, 2022
@audriu audriu force-pushed the 13193-synchronise-sticker-pack-setting-fields branch from 7eb8d48 to dbc581c Compare May 31, 2022 07:06
@audriu audriu marked this pull request as ready for review May 31, 2022 07:06
@audriu audriu moved this from CONTRIBUTOR to E2E Tests in Pipeline for QA May 31, 2022
@audriu audriu requested a review from siddarthkay May 31, 2022 07:09
@status-github-bot status-github-bot bot moved this from E2E Tests to CONTRIBUTOR in Pipeline for QA May 31, 2022
@audriu audriu force-pushed the 13193-synchronise-sticker-pack-setting-fields branch from dbc581c to 8375b64 Compare May 31, 2022 08:41
@audriu audriu moved this from CONTRIBUTOR to REVIEW in Pipeline for QA May 31, 2022
@audriu audriu moved this from REVIEW to IN TESTING in Pipeline for QA May 31, 2022
@audriu audriu moved this from IN TESTING to E2E Tests in Pipeline for QA May 31, 2022
@pavloburykh pavloburykh self-assigned this May 31, 2022
@pavloburykh pavloburykh moved this from E2E Tests to IN TESTING in Pipeline for QA May 31, 2022
@pavloburykh
Copy link
Contributor

pavloburykh commented Jun 1, 2022

@audriu thanx for the PR. Please, take look at following issue

ISSUE 1 App crashes after purchasing of stickerpack when screen with stickerpack is opened during completion of transaction

Prerequisites:
For purposes of reproduction of this bug I created user with 20 STT in order you can purchase Stickerpack on Ropsten.
Recovery seed phrase: van process sugar bike coin damage prison wish tube maximum average reveal

Steps:

  1. Recover given above multiaccount
  2. Start 1-1 chat
  3. Tap sticker icon
  4. Tap "Get stickers"
  5. Purchase "Tozemoon" stickerpack
  6. Do not close app/stickerpack screen until transaction is completed (spinner is presented)
  7. Observe the result after purchase is completed.

Actual result: app crashes. I failed to reproduce this bug in other PRs so I suppose it might be connected to current PR changes.

Expected result: app does not crash. Install button appears after purchase is completed.

OS: Android/IOS

Crash.mp4

geth.log

@pavloburykh pavloburykh moved this from IN TESTING to CONTRIBUTOR in Pipeline for QA Jun 1, 2022
@audriu audriu force-pushed the 13193-synchronise-sticker-pack-setting-fields branch from 8375b64 to eb5b82b Compare June 7, 2022 15:11
@audriu audriu moved this from CONTRIBUTOR to E2E Tests in Pipeline for QA Jun 8, 2022
@pavloburykh
Copy link
Contributor

ISSUE 3 Messages are not delivered in group chats

Steps:

  1. Login different multiaccounts on Device 1 and Device 1
  2. Add Device 2 to contacts on Device 1
  3. Start group chat on Device 1 with Device 2
  4. Send some messages into group chat on Device 1 and Device 2
  5. Pay attention if messages are delivered to receiver

Actual result: no messages received in group chat

Expected result: messages are received

group_chats_bug.mp4

ISSUE 4 Group chat re-appears in chat list on IOS after removing/leaving the chat

Steps:

  1. On IOS device start group chat, invite some other user into it
  2. Leave the group chat
  3. Put app to the background or perform re-login
  4. Pay attention at chat list

Actual result: deleted chat has re-appeared in chat list.

Expected result: deleted chat does not re-appear

telegram-cloud-document-2-5276168801157651127.mp4

@pavloburykh pavloburykh moved this from IN TESTING to CONTRIBUTOR in Pipeline for QA Jun 13, 2022
@audriu audriu force-pushed the 13193-synchronise-sticker-pack-setting-fields branch from 4c71252 to b872ada Compare June 13, 2022 12:48
@pavloburykh pavloburykh moved this from CONTRIBUTOR to E2E Tests in Pipeline for QA Jun 13, 2022
@status-github-bot status-github-bot bot moved this from E2E Tests to CONTRIBUTOR in Pipeline for QA Jun 13, 2022
@pavloburykh pavloburykh moved this from CONTRIBUTOR to IN TESTING in Pipeline for QA Jun 13, 2022
@status-im-auto
Copy link
Member

95% of end-end tests have passed

Total executed tests: 84
Failed tests: 4
Passed tests: 80
IDs of failed tests: 6265,702157,3998,702188 

Failed tests (4)

Click to expand
  • Rerun failed tests

  • 1. test_1_1_chat_command_decline_eth_push_changing_state, id: 6265

    Device 2: Element TransactionStatus text is equal to Transaction declined
    Device 1: Wait for text element `TransactionStatus` to be equal to `Transaction declined`

    androidx.test.uiautomator.StaleObjectException

    Class: TestCommandsMultipleDevicesMerged

    Device sessions

    2. test_sticker_1_1_public_chat, id: 702157

    Device 1: Tap on found: EditBox
    Device 1: Find `Button` by `accessibility id`: `show-stickers-icon`

    Device 1: Button by accessibility id: `show-stickers-icon` is not found on the screen

    Class: TestEnsStickersMultipleDevicesMerged

    Device sessions

    3. test_group_chat_offline_pn, id: 3998

    Device 3: Looking for a message by text: message from old member
    Device 3: Looking for a message by text: message from new member

    message from old member PN was not fetched from offline message from new member PN was not fetched from offline

    Class: TestGroupChatMultipleDeviceMerged

    Device sessions

    4. test_cellular_settings_on_off_public_chat_fetching_history, id: 702188

    Device 1: Find `Button` by `xpath`: `//*[@text="Use mobile data"]/following-sibling::android.widget.Switch[1]`
    Device 1: Find `Button` by `xpath`: `//*[@text="Ask me when on mobile network"]/following-sibling::android.widget.Switch[1]`

    Chat history was not fetched with mobile data fetching ON

    Class: TestContactBlockMigrateKeycardMultipleSharedDevices

    Device sessions

    Passed tests (80)

    Click to expand

    1. test_wallet_add_account_seed_phrase_collectibles_rinkeby_set_as_profile_image, id: 700762

    Class: TestWalletManagementDeviceMerged

    Device sessions

    2. test_wallet_manage_assets, id: 700758

    Class: TestWalletManagementDeviceMerged

    Device sessions

    3. test_public_chat_message_edit, id: 700734

    Class: TestPublicChatMultipleDeviceMerged

    Device sessions

    4. test_contact_block_unblock_public_chat_offline, id: 702176

    Class: TestContactBlockMigrateKeycardMultipleSharedDevices

    Device sessions

    5. test_1_1_chat_text_message_edit_delete_push_disappear, id: 695843

    Class: TestOneToOneChatMultipleSharedDevices

    Device sessions

    6. test_keycard_relogin_after_restore, id: 700768

    Class: TestKeycardTxOneDeviceMerged

    Device sessions

    7. test_group_chat_push_system_messages_when_invited, id: 3994

    Class: TestGroupChatMultipleDeviceMerged

    Device sessions

    8. test_ens_command_send_tx_eth_1_1_chat, id: 702153

    Class: TestEnsStickersMultipleDevicesMerged

    Device sessions

    9. test_send_tx_token_7_decimals, id: 700764

    Class: TestSendTxDeviceMerged

    Device sessions

    10. test_contact_add_remove_mention_default_username_nickname_public_chat, id: 702175

    Class: TestContactBlockMigrateKeycardMultipleSharedDevices

    Device sessions

    11. test_public_chat_open_using_deep_link, id: 700739

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    12. test_public_chat_unread_messages_counter, id: 5360

    Class: TestPublicChatMultipleDeviceMerged

    Device sessions

    13. test_pairing_sync_contacts_block_unblock, id: 702196

    Class: TestPairingSyncMultipleDevicesMerged

    Device sessions

    14. test_public_chat_emoji_send_copy_paste_reply, id: 700719

    Class: TestPublicChatMultipleDeviceMerged

    Device sessions

    15. test_1_1_chat_command_request_and_send_tx_stt_in_1_1_chat_offline, id: 6263

    Class: TestCommandsMultipleDevicesMerged

    Device sessions

    16. test_browser_bookmarks_create_edit_remove, id: 702077

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    17. test_send_tx_eth_check_logcat, id: 700763

    Class: TestSendTxDeviceMerged

    Device sessions

    18. test_public_chat_unread_messages_counter_for_mention_relogin, id: 700718

    Class: TestPublicChatMultipleDeviceMerged

    Device sessions

    19. test_send_tx_custom_token_18_decimals_invalid_password, id: 700765

    Class: TestSendTxDeviceMerged

    Device sessions

    20. test_onboarding_add_new_multiaccount_username_by_position_pass_validation, id: 700747

    Class: TestOnboardingOneDeviceMerged

    Device sessions

    21. test_public_chat_delete_chat_long_press, id: 5319

    Class: TestPublicChatMultipleDeviceMerged

    Device sessions

    22. test_onboarding_home_initial_popup, id: 700742

    Class: TestOnboardingOneDeviceMerged

    Device sessions

    23. test_browser_blocked_url, id: 702072

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    24. test_wallet_add_hide_unhide_account_private_key, id: 700761

    Class: TestWalletManagementDeviceMerged

    Device sessions

    25. test_1_1_chat_message_reaction, id: 6315

    Class: TestOneToOneChatMultipleSharedDevices

    Device sessions

    26. test_ens_mention_push_highlighted_public_chat, id: 702156

    Class: TestEnsStickersMultipleDevicesMerged

    Device sessions

    27. test_1_1_chat_emoji_send_reply_and_open_link, id: 5373

    Class: TestOneToOneChatMultipleSharedDevices

    Device sessions

    28. test_keycard_send_tx_sign_message_request_stt_testdapp, id: 700769

    Class: TestKeycardTxOneDeviceMerged

    Device sessions

    29. test_1_1_chat_image_send_save_reply, id: 6305

    Class: TestOneToOneChatMultipleSharedDevices

    Device sessions

    30. test_group_chat_highligted, id: 5756

    Class: TestGroupChatMultipleDeviceMerged

    Device sessions

    31. test_public_chat_link_send_open, id: 700736

    Class: TestPublicChatMultipleDeviceMerged

    Device sessions

    32. test_keycard_command_send_tx_eth_1_1_chat, id: 702186

    Class: TestContactBlockMigrateKeycardMultipleSharedDevices

    Device sessions

    33. test_onboarding_share_contact_address, id: 700743

    Class: TestOnboardingOneDeviceMerged

    Device sessions

    34. test_onboarding_backup_seed_phrase_restore_same_login_logcat, id: 700745

    Class: TestOnboardingOneDeviceMerged

    Device sessions

    35. test_restore_set_up_wallet_sign_phrase, id: 700749

    Class: TestRestoreOneDeviceMerged

    Device sessions

    36. test_ens_mention_nickname_1_1_chat, id: 702155

    Class: TestEnsStickersMultipleDevicesMerged

    Device sessions

    37. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 5310

    Class: TestOneToOneChatMultipleSharedDevices

    Device sessions

    38. test_browser_delete_close_tabs, id: 702076

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    39. test_public_chat_mark_all_messages_as_read, id: 6270

    Class: TestPublicChatMultipleDeviceMerged

    Device sessions

    40. test_browser_connection_is_secure_not_secure_warning, id: 702073

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    41. test_send_tx_set_recipient_options, id: 700757

    Class: TestSendTxDeviceMerged

    Device sessions

    42. test_onboarding_cant_sign_in_with_invalid_password_logcat, id: 700746

    Class: TestOnboardingOneDeviceMerged

    Device sessions

    43. test_send_tx_sign_message_2tx_in_batch_tx_filters_request_stt_testdapp, id: 5342

    Class: TestSendTxDeviceMerged

    Device sessions

    44. test_group_chat_join_send_text_messages_push, id: 700731

    Class: TestGroupChatMultipleDeviceMerged

    Device sessions

    45. test_browser_web3_permissions_testdapp, id: 702078

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    46. test_1_1_chat_text_message_with_push, id: 6316

    Class: TestOneToOneChatMultipleSharedDevices

    Device sessions

    47. test_wallet_add_delete_watch_only_account, id: 700760

    Class: TestWalletManagementDeviceMerged

    Device sessions

    48. test_public_chat_tag_message, id: 700738

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    49. test_onboarding_share_wallet_address, id: 700744

    Class: TestOnboardingOneDeviceMerged

    Device sessions

    50. test_keycard_create_account_unlock_same_seed, id: 5689

    Class: TestKeycardTxOneDeviceMerged

    Device sessions

    51. test_1_1_chat_command_send_tx_eth_outgoing_tx_push, id: 6253

    Class: TestCommandsMultipleDevicesMerged

    Device sessions

    52. test_pairing_sync_initial_contacts_blocked_users, id: 702194

    Class: TestPairingSyncMultipleDevicesMerged

    Device sessions

    53. test_public_chat_navigate_to_chat_when_relaunch, id: 5396

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    54. test_pairing_sync_1_1_chat_message, id: 702198

    Class: TestPairingSyncMultipleDevicesMerged

    Device sessions

    55. test_pairing_sync_public_chat_add_remove, id: 702199

    Class: TestPairingSyncMultipleDevicesMerged

    Device sessions

    56. test_public_chat_copy_and_paste_message_in_chat_input, id: 5317

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    57. test_public_chat_fetch_more_history, id: 5675

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    58. test_wallet_fetching_balance_after_offline_insufficient_funds_errors, id: 700766

    Class: TestWalletManagementDeviceMerged

    Device sessions

    59. test_restore_account_migrate_multiaccount_to_keycard_db_saved, id: 702177

    Class: TestContactBlockMigrateKeycardMultipleSharedDevices

    Device sessions

    60. test_group_chat_add_new_member_activity_centre, id: 700732

    Class: TestGroupChatMultipleDeviceMerged

    Device sessions

    61. test_public_chat_links_with_previews_github_youtube_twitter_gif_send_enable, id: 700737

    Class: TestPublicChatMultipleDeviceMerged

    Device sessions

    62. test_ens_purchased_in_profile, id: 702152

    Class: TestEnsStickersMultipleDevicesMerged

    Device sessions

    63. test_1_1_chat_non_latin_message_to_newly_added_contact_with_profile_picture_on_different_networks, id: 5315

    Class: TestOneToOneChatMultipleSharedDevices

    Device sessions

    64. test_keycard_send_tx_eth, id: 700767

    Class: TestKeycardTxOneDeviceMerged

    Device sessions

    65. test_restore_account_migrate_multiaccount_to_keycard_no_db_saved_add_wallet_send_tx, id: 702189

    Class: TestRestoreOneDeviceMerged

    Device sessions

    66. test_browser_offline, id: 702075

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    67. test_browser_invalid_url, id: 702074

    Class: TestPublicChatBrowserOneDeviceMerged

    Device sessions

    68. test_restore_seed_phrase_field_validation, id: 700750

    Class: TestRestoreOneDeviceMerged

    Device sessions

    69. test_wallet_add_account_generate_new, id: 700759

    Class: TestWalletManagementDeviceMerged

    Device sessions

    70. test_start_new_chat_public_key_validation, id: 702158

    Class: TestEnsStickersMultipleDevicesMerged

    Device sessions

    71. test_restore_uppercase_whitespaces_seed_phrase_special_char_passw_logcat, id: 700748

    Class: TestRestoreOneDeviceMerged

    Device sessions

    72. test_public_chat_message_send_check_timestamps_while_on_different_tab, id: 5313

    Class: TestPublicChatMultipleDeviceMerged

    Device sessions

    73. test_wallet_tx_history_copy_tx_hash_on_cellular, id: 700756

    Class: TestWalletManagementDeviceMerged

    Device sessions

    74. test_1_1_chat_delete_via_delete_button_relogin, id: 5387

    Class: TestOneToOneChatMultipleSharedDevices

    Device sessions

    75. test_group_chat_leave_relogin, id: 3997

    Class: TestGroupChatMultipleDeviceMerged

    Device sessions

    76. test_public_chat_message_delete, id: 700735

    Class: TestPublicChatMultipleDeviceMerged

    Device sessions

    77. test_keycard_wallet_recover_pairing_check_balance_after_offline_tx_history, id: 700770

    Class: TestKeycardTxOneDeviceMerged

    Device sessions

    78. test_1_1_chat_push_emoji, id: 6283

    Class: TestOneToOneChatMultipleSharedDevices

    Device sessions

    79. test_pairing_sync_initial_public_chats, id: 702195

    Class: TestPairingSyncMultipleDevicesMerged

    Device sessions

    80. test_pairing_sync_contacts_add_remove_set_nickname_ens, id: 702197

    Class: TestPairingSyncMultipleDevicesMerged

    Device sessions

    @status-im-auto
    Copy link
    Member

    75% of end-end tests have passed

    Total executed tests: 4
    Failed tests: 1
    Passed tests: 3
    
    IDs of failed tests: 3998 
    

    Failed tests (1)

    Click to expand
  • Rerun failed tests

  • 1. test_group_chat_offline_pn, id: 3998

    Device 3: Looking for a message by text: message from old member
    Device 3: Looking for a message by text: message from new member

    message from old member PN was not fetched from offline message from new member PN was not fetched from offline

    Class: TestGroupChatMultipleDeviceMerged

    Device sessions

    Passed tests (3)

    Click to expand

    1. test_1_1_chat_command_decline_eth_push_changing_state, id: 6265

    Class: TestCommandsMultipleDevicesMerged

    Device sessions

    2. test_sticker_1_1_public_chat, id: 702157

    Class: TestEnsStickersMultipleDevicesMerged

    Device sessions

    3. test_cellular_settings_on_off_public_chat_fetching_history, id: 702188

    Class: TestContactBlockMigrateKeycardMultipleSharedDevices

    Device sessions

    @pavloburykh
    Copy link
    Contributor

    @audriu Thanx. Issue 3 and Issue 4 fixed after rebase of backend. For Issue 2 I will create a separate Issue in order nor to block merging of this PR.

    @pavloburykh pavloburykh moved this from IN TESTING to MERGE in Pipeline for QA Jun 13, 2022
    Comment on lines 48 to 53
    (mapv (fn [sticker-synced] (assoc sticker-synced :url (as-> stickers-from-db vvv
    (get vvv (:packID sticker-synced))
    (:stickers vvv)
    (filter (fn [sticker-db] (= (:hash sticker-db) (:hash sticker-synced))) vvv)
    (first vvv)
    (:url vvv)))) synced-stickers))
    Copy link
    Member

    Choose a reason for hiding this comment

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

    its little bit hard to read, here my suggestion, but it should be tested before merge

    Suggested change
    (mapv (fn [sticker-synced] (assoc sticker-synced :url (as-> stickers-from-db vvv
    (get vvv (:packID sticker-synced))
    (:stickers vvv)
    (filter (fn [sticker-db] (= (:hash sticker-db) (:hash sticker-synced))) vvv)
    (first vvv)
    (:url vvv)))) synced-stickers))
    (mapv #(assoc % :url (-> (get stickers-from-db (:packID %)
    (:stickers)
    (filter (fn [sticker-db] (= (:hash sticker-db) (:hash %))))
    (first)
    (:url))))
    synced-stickers))

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    Thanks for the review. I applied your recommendation (except used ->> because filter). It really looks more readable this way. Also tested - worked the same.

    src/status_im/multiaccounts/update/core.cljs Outdated Show resolved Hide resolved
    @audriu audriu force-pushed the 13193-synchronise-sticker-pack-setting-fields branch from b872ada to 26f2387 Compare June 14, 2022 14:06
    @audriu audriu force-pushed the 13193-synchronise-sticker-pack-setting-fields branch from 26f2387 to e602a82 Compare June 14, 2022 14:24
    @pavloburykh
    Copy link
    Contributor

    @audriu @cammellos @flexsurfer do we need to re-run e2e and make another round of manual testing due to recent changes?

    @audriu audriu force-pushed the 13193-synchronise-sticker-pack-setting-fields branch from e602a82 to 2325f6f Compare June 14, 2022 14:25
    @audriu audriu merged commit 2325f6f into develop Jun 14, 2022
    @audriu audriu deleted the 13193-synchronise-sticker-pack-setting-fields branch June 14, 2022 14:26
    Pipeline for QA automation moved this from MERGE to DONE Jun 14, 2022
    @audriu
    Copy link
    Contributor Author

    audriu commented Jun 14, 2022

    @pavloburykh those changes were just code style. Logic did not change. Although I tested the affected part it still works. Thanks.

    @Samyoul
    Copy link
    Member

    Samyoul commented Jun 14, 2022

    @pavloburykh @audriu do you know if the following scenarios work?

    Scenario 1

    • device 2 adds a sticker pack
    • device 1 and device 2 pair
    • device 1 adds a different sticker pack
    • device 2 receives new sticker pack shows in list of sticker packs
    • device 2 logs out
    • device 2 logs in
    • device 2 shows 2 sticker packs (original sticker pack from device 2 and new sticker pack from device 1)

    Scenario 2

    • device 2 adds a sticker pack
    • device 1 adds a different sticker pack
    • device 1 and device 2 pair
    • device 1 receives the sticker pack from device 2 shows in list of device 1 sticker packs
    • device 2 receives the sticker pack from device 1 shows in list of device 2 sticker packs
    • device 1 and 2 log out
    • device 1 and 2 log in
    • device 1 shows 2 sticker packs (original sticker pack from device 1 and new sticker pack from device 2)
    • device 2 shows 2 sticker packs (original sticker pack from device 2 and new sticker pack from device 1)

    @audriu
    Copy link
    Contributor Author

    audriu commented Jun 15, 2022

    @Samyoul Scenario 1 only works correctly when devices are paired 1-2-1, but if paired 1 way then old sticker packs may get overridden on receiving device.
    Scenario 2: also weird things happen.

    when developed I had only live synchronization in mind. These scenarios have to be investigated.

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

    Successfully merging this pull request may close these issues.

    Synchronise Sticker Pack setting fields
    6 participants