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

[#20446] Collectibles in activity tab #21109

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

ulisesmac
Copy link
Contributor

fixes #20446

Summary

This PR finishes the collectible displaying in the activity tab

⚠️ PLEASE NOTE THIS PR IS NOT SOLVING OTHER PROBLEMS IN THE ACTIVITY TAB, such as the problem of some missing activities ⚠️

Address used to test:
0x35f0686c63f50707ea3b5bace186938e4e19f03a
Link to Etherscan

This PR implements the fallback for collectibles (Link to figma):

image

Collectible transactions displayed in-app:

From 3 May - 11 May:

From 27 May - 3 May:

From 7 Jun - 18 Jun:

Testing notes

It's easier to test with an address with lots of collectibles and sometimes we don't own an address like that, I'd recommend adding an address to watch using desktop and then pairing it with mobile, so the watched address is added to mobile.

Platforms

  • Android
  • iOS

Steps to test

  • Open Status
  • Add an address with collectibles and transactions involving collectibles
  • Visit the address and check the activity tab (you may need to relogin to fetch the activities)

status: ready

@ulisesmac ulisesmac self-assigned this Aug 21, 2024
@ulisesmac ulisesmac force-pushed the 20446-collectibles-activity-tab branch from 031b27a to 634271f Compare August 21, 2024 20:09
Comment on lines +29 to +30
:collectible-number (when (not= token-id "0")
token-id)}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Status-go replies with a token-id 0x0 for collectibles, seems this is just a default number always comming, not exactly the collectible number, so I'm skipping that case

@status-im-auto
Copy link
Member

status-im-auto commented Aug 21, 2024

Jenkins Builds

Click to see older builds (5)
Commit #️⃣ Finished (UTC) Duration Platform Result
634271f #2 2024-08-21 20:12:39 ~2 min tests 📄log
✔️ 0447343 #3 2024-08-21 20:20:51 ~4 min tests 📄log
✔️ 0447343 #3 2024-08-21 20:22:28 ~6 min android-e2e 🤖apk 📲
✔️ 0447343 #3 2024-08-21 20:24:08 ~7 min android 🤖apk 📲
✔️ 0447343 #3 2024-08-21 20:31:32 ~15 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 046481d #4 2024-09-05 09:17:01 ~4 min tests 📄log
✔️ 046481d #4 2024-09-05 09:20:15 ~7 min android-e2e 🤖apk 📲
✔️ 046481d #4 2024-09-05 09:20:40 ~7 min android 🤖apk 📲
✔️ 046481d #4 2024-09-05 09:25:09 ~12 min ios 📱ipa 📲
✔️ c2784b3 #6 2024-09-06 21:36:38 ~4 min tests 📄log
✔️ c2784b3 #6 2024-09-06 21:39:26 ~7 min android-e2e 🤖apk 📲
✔️ c2784b3 #6 2024-09-06 21:39:52 ~7 min android 🤖apk 📲
✔️ c2784b3 #6 2024-09-06 21:42:30 ~10 min ios 📱ipa 📲

[rn/image {:style (style/circle-logo size) :source dapp-logo}]]

nil)]])
(let [[image-error? set-image-error] (rn/use-state false)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been added because some collectibles have links to broken images, if so, we try to display these images and we end up showing the placeholder if the images contain errors

Comment on lines +63 to +68
([theme]
(text theme false))
([theme gray-text?]
{:color (if gray-text?
colors/neutral-50
(colors/theme-colors colors/neutral-100 colors/white theme))}))
Copy link
Contributor Author

@ulisesmac ulisesmac Aug 21, 2024

Choose a reason for hiding this comment

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

The new variant for the context tag with gray text

@shivekkhurana
Copy link
Contributor

HEADS UP;
In the next few releases, we will change how activities are managed: https://discord.com/channels/1210237582470807632/1254827811873620068/1276202957422989374

@ulisesmac
Copy link
Contributor Author

HEADS UP;
In the next few releases, we will change how activities are managed: https://discord.com/channels/1210237582470807632/1254827811873620068/1276202957422989374

Hi @shivekkhurana

Should I close this issue then?

@shivekkhurana
Copy link
Contributor

For now, we should merge as the UI will not change, and this seems to be mainly UI.

@VolodLytvynenko VolodLytvynenko self-assigned this Sep 5, 2024
@VolodLytvynenko VolodLytvynenko force-pushed the 20446-collectibles-activity-tab branch from 0447343 to 046481d Compare September 5, 2024 09:12
@status-im-auto
Copy link
Member

57% of end-end tests have passed

Total executed tests: 7
Failed tests: 3
Expected to fail tests: 0
Passed tests: 4
IDs of failed tests: 727230,702745,703133 

Failed tests (3)

Click to expand
  • Rerun failed tests

  • Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745

    Device 2: Accepting incoming CR for sender
    Device 2: Find `Button` by `xpath`: `//*[contains(@text, 'sender')]/ancestor::*[@content-desc='activity']/*[@content-desc="accept-contact-request"]`

    Test setup failed: ../views/home_view.py:409: in handle_contact_request
        chat_element.accept_contact_request()
    ../views/home_view.py:162: in accept_contact_request
        self.handle_cr("accept-contact-request")
    ../views/home_view.py:159: in handle_cr
        ).wait_for_rendering_ended_and_click()
    ../views/base_element.py:164: in wait_for_rendering_ended_and_click
        self.click()
    ../views/base_element.py:92: in click
        element.click()
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py:94: in click
        self._execute(Command.CLICK_ELEMENT)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py:395: in _execute
        return self._parent.execute(command, params)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
    E   Stacktrace:
    E   UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
    E       at UIA2Proxy.command (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/jsonwp-proxy/proxy.js:355:13)
    E       at processTicksAndRejections (node:internal/process/task_queues:95:5)
    E       at AndroidUiautomator2Driver.commands.click (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/lib/commands/element.js:81:10)
    
    During handling of the above exception, another exception occurred:
    critical/chats/test_1_1_public_chats.py:40: in prepare_devices
        self.home_2.handle_contact_request(self.username_1)
    ../views/home_view.py:421: in handle_contact_request
        self.close_activity_centre.wait_for_rendering_ended_and_click()
    ../views/base_element.py:163: in wait_for_rendering_ended_and_click
        self.wait_for_visibility_of_element(20)
    ../views/base_element.py:145: in wait_for_visibility_of_element
        .until(expected_conditions.visibility_of_element_located((self.by, self.locator)))
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py:86: in until
        value = method(self._driver)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/support/expected_conditions.py:152: in _predicate
        return _element_if_visible(driver.find_element(*locator))
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/webdriver.py:409: in find_element
        return self.execute(RemoteCommand.FIND_ELEMENT, {'using': by, 'value': value})['value']
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details
    E   Stacktrace:
    E   UnknownError: An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details
    E       at UIA2Proxy.command (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/jsonwp-proxy/proxy.js:355:13)
    E       at processTicksAndRejections (node:internal/process/task_queues:95:5)
    E       at AndroidUiautomator2Driver.helpers.doFindElementOrEls (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/lib/commands/find.js:30:10)
    E       at doFind (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/find.js:36:17)
    E       at wrappedCondFn (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/timeout.ts:137:14)
    E       at spin (/mnt/sauce/appium/appium-v2.0.0/node_modules/asyncbox/lib/asyncbox.js:221:20)
    E       at waitForCondition (/mnt/sauce/appium/appium-v2.0.0/node_modules/asyncbox/lib/asyncbox.js:238:10)
    E       at AndroidUiautomator2Driver.implicitWaitForCondition (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/timeout.ts:139:12)
    E       at AndroidUiautomator2Driver.findElOrEls (/mnt/sauce/appium/appium-v2.0.0/appium_home/linux/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/find.js:60:5)
    E       at AndroidUiautomator2Driver.findElOrElsWithProcessing (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/find.ts:60:12)
    E       at AndroidUiautomator2Driver.findElement (/mnt/sauce/appium/appium-v2.0.0/packages/base-driver/lib/basedriver/commands/find.ts:75:12)
    



    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    Device 2: Find Text by xpath: //android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='Ether']/../android.widget.TextView[3]
    Device 2: Text is 0.04859 ETH

    critical/test_wallet.py:190: in test_wallet_send_asset_from_drawer
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Sender balance is not updated on Etherscan, it is 0.4387 but expected to be 0.4388
    



    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133

    Device 1: Type Restore user to EditBox
    Device 1: Click until EditBox by xpath: //*[@text="Type password"] will be presented

    critical/chats/test_public_chat_browsing.py:160: in test_restore_multiaccount_with_waku_backup_remove_switch
        self.sign_in.recover_access(passphrase=waku_user.seed, second_user=True)
    ../views/sign_in_view.py:295: in recover_access
        self.set_profile(username, set_image)
    ../views/sign_in_view.py:232: in set_profile
        self.profile_continue_button.click_until_presence_of_element(self.profile_password_edit_box)
    ../views/base_element.py:107: in click_until_presence_of_element
        while not desired_element.is_element_displayed(1) and counter <= attempts:
    ../views/base_element.py:221: in is_element_displayed
        return self.wait_for_visibility_of_element(sec, ignored_exceptions=ignored_exceptions)
    ../views/base_element.py:145: in wait_for_visibility_of_element
        .until(expected_conditions.visibility_of_element_located((self.by, self.locator)))
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py:86: in until
        value = method(self._driver)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/support/expected_conditions.py:152: in _predicate
        return _element_if_visible(driver.find_element(*locator))
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/webdriver.py:409: in find_element
        return self.execute(RemoteCommand.FIND_ELEMENT, {'using': by, 'value': value})['value']
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:345: in execute
        self.error_handler.check_response(response)
    ../../../../status-app-prs-rerun@tmp/venv/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:122: in check_response
        raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
     The test session has already finished, and can't receive further commands. For help please check https://docs.saucelabs.com/dev/error-messages
    



    Device sessions

    Passed tests (4)

    Click to expand

    Class TestWalletMultipleDevice:

    1. test_wallet_send_eth, id: 727229

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    @VolodLytvynenko
    Copy link
    Contributor

    Hey @ulisesmac thank you for PR. No issues from my side. PR is ready to be merged

    @ulisesmac ulisesmac force-pushed the 20446-collectibles-activity-tab branch from 9a417d9 to c2784b3 Compare September 6, 2024 21:31
    @ulisesmac ulisesmac merged commit cf5a395 into develop Sep 6, 2024
    6 checks passed
    @ulisesmac ulisesmac deleted the 20446-collectibles-activity-tab branch September 6, 2024 21:44
    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.

    Show collectibles in Activity tab
    5 participants