chore: replaced watched address to another one and enabled test

This commit is contained in:
Valentina Novgorodtceva 2024-06-28 15:38:43 +07:00 committed by Anastasiya
parent bb3ac3fc99
commit 4693660226
1 changed files with 41 additions and 43 deletions

View File

@ -24,13 +24,11 @@ pytestmark = marks
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/727227',
'Sort by Asset name')
@pytest.mark.case(727223, 727224, 727225, 727226, 727227)
@pytest.mark.parametrize('address, name, dai, weenus, stt, eth', [
pytest.param('0xFf58d746A67C2E42bCC07d6B3F58406E8837E883', 'AssetsCollectibles', 'Dai Stablecoin', 'WEENUS Token',
@pytest.mark.parametrize('address, name, dai, wrappedeth, stt, eth', [
pytest.param('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 'AssetsCollectibles', 'Dai Stablecoin', 'Wrapped Ether',
'Status Test Token', 'Ether')
])
@pytest.mark.skip(reason="https://github.com/status-im/status-desktop/issues/14862")
@pytest.mark.skip(reason="https://github.com/status-im/status-desktop/issues/14509")
def test_wallet_sort_assets(main_screen: MainWindow, address, name, dai, weenus, stt, eth):
def test_wallet_sort_assets(main_screen: MainWindow, address, name, dai, wrappedeth, stt, eth):
with step('Turn on Testnet mode'):
networks = main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_networks()
networks.switch_testnet_mode_toggle().turn_on_testnet_mode_in_testnet_modal()
@ -51,16 +49,16 @@ def test_wallet_sort_assets(main_screen: MainWindow, address, name, dai, weenus,
assert wallet_account_view.get_combobox_value() == 'Asset balance value ↑'
assets_order = wallet_account_view.get_list_of_assets()
assert driver.waitFor(lambda: assets_order[0].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[1].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[2].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[1].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[2].title == wrappedeth, 6000)
assert driver.waitFor(lambda: assets_order[3].title == eth, 6000)
wallet_account_view.click_arrow_button('arrow-down-icon', 1)
assert wallet_account_view.get_combobox_value() == 'Asset balance value ↓'
assets_order = wallet_account_view.get_list_of_assets()
assert driver.waitFor(lambda: assets_order[0].title == eth, 6000)
assert driver.waitFor(lambda: assets_order[1].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[2].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[1].title == wrappedeth, 6000)
assert driver.waitFor(lambda: assets_order[2].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[3].title == stt, 6000)
with step('Sort assets by asset balance and verify the value in combobox is correct and the order is correct'):
@ -70,14 +68,14 @@ def test_wallet_sort_assets(main_screen: MainWindow, address, name, dai, weenus,
assets_order = wallet_account_view.get_list_of_assets()
assert driver.waitFor(lambda: assets_order[0].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[1].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[2].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[2].title == wrappedeth, 6000)
assert driver.waitFor(lambda: assets_order[3].title == eth, 6000)
wallet_account_view.click_arrow_button('arrow-down-icon', 2)
assert wallet_account_view.get_combobox_value() == 'Asset balance ↓'
assets_order = wallet_account_view.get_list_of_assets()
assert driver.waitFor(lambda: assets_order[0].title == eth, 6000)
assert driver.waitFor(lambda: assets_order[1].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[1].title == wrappedeth, 6000)
assert driver.waitFor(lambda: assets_order[2].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[3].title == stt, 6000)
@ -86,18 +84,18 @@ def test_wallet_sort_assets(main_screen: MainWindow, address, name, dai, weenus,
wallet_account_view.click_arrow_button('arrow-up-icon', 3)
assert wallet_account_view.get_combobox_value() == 'Asset value ↑'
assets_order = wallet_account_view.get_list_of_assets()
assert driver.waitFor(lambda: assets_order[0].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[1].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[2].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[0].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[1].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[2].title == wrappedeth, 6000)
assert driver.waitFor(lambda: assets_order[3].title == eth, 6000)
wallet_account_view.click_arrow_button('arrow-down-icon', 3)
assert wallet_account_view.get_combobox_value() == 'Asset value ↓'
assets_order = wallet_account_view.get_list_of_assets()
assert driver.waitFor(lambda: assets_order[0].title == eth, 6000)
assert driver.waitFor(lambda: assets_order[1].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[2].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[3].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[1].title == wrappedeth, 6000)
assert driver.waitFor(lambda: assets_order[2].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[3].title == stt, 6000)
with step(
'Sort assets by 1d change: balance value and verify the value in combobox is correct and the order is correct'):
@ -106,16 +104,16 @@ def test_wallet_sort_assets(main_screen: MainWindow, address, name, dai, weenus,
assert wallet_account_view.get_combobox_value() == '1d change: balance value ↑'
assets_order = wallet_account_view.get_list_of_assets()
assert driver.waitFor(lambda: assets_order[0].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[1].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[2].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[1].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[2].title == wrappedeth, 6000)
assert driver.waitFor(lambda: assets_order[3].title == eth, 6000)
wallet_account_view.click_arrow_button('arrow-down-icon', 4)
assert wallet_account_view.get_combobox_value() == '1d change: balance value ↓'
assets_order = wallet_account_view.get_list_of_assets()
assert driver.waitFor(lambda: assets_order[0].title == eth, 6000)
assert driver.waitFor(lambda: assets_order[1].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[2].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[1].title == wrappedeth, 6000)
assert driver.waitFor(lambda: assets_order[2].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[3].title == stt, 6000)
with step('Sort assets by asset name and verify the value in combobox is correct and the order is correct'):
@ -126,12 +124,12 @@ def test_wallet_sort_assets(main_screen: MainWindow, address, name, dai, weenus,
assert driver.waitFor(lambda: assets_order[0].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[1].title == eth, 6000)
assert driver.waitFor(lambda: assets_order[2].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[3].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[3].title == wrappedeth, 6000)
wallet_account_view.click_arrow_button('arrow-down-icon', 5)
assert wallet_account_view.get_combobox_value() == 'Asset name ↓'
assets_order = wallet_account_view.get_list_of_assets()
assert driver.waitFor(lambda: assets_order[0].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[0].title == wrappedeth, 6000)
assert driver.waitFor(lambda: assets_order[1].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[2].title == eth, 6000)
assert driver.waitFor(lambda: assets_order[3].title == dai, 6000)
@ -144,13 +142,11 @@ def test_wallet_sort_assets(main_screen: MainWindow, address, name, dai, weenus,
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704732',
'Edit custom order')
@pytest.mark.case(704709, 704731, 704732)
@pytest.mark.parametrize('address, name, dai, weenus, stt, eth', [
pytest.param('0xFf58d746A67C2E42bCC07d6B3F58406E8837E883', 'AssetsCollectibles', 'Dai Stablecoin', 'WEENUS Token',
@pytest.mark.parametrize('address, name, dai, wrappedeth, stt, eth', [
pytest.param('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 'AssetsCollectibles', 'Dai Stablecoin', 'Wrapped Ether',
'Status Test Token', 'Ether')
])
@pytest.mark.skip(reason="https://github.com/status-im/status-desktop/issues/14862")
@pytest.mark.skip(reason="https://github.com/status-im/status-desktop/issues/14509")
def test_custom_ordering(main_screen: MainWindow, address, name, dai, weenus, stt, eth):
def test_custom_ordering(main_screen: MainWindow, address, name, dai, wrappedeth, stt, eth):
with step('Turn on Testnet mode'):
networks = main_screen.left_panel.open_settings().left_panel.open_wallet_settings().open_networks()
networks.switch_testnet_mode_toggle().turn_on_testnet_mode_in_testnet_modal()
@ -177,7 +173,7 @@ def test_custom_ordering(main_screen: MainWindow, address, name, dai, weenus, st
with step('Verify the order is correct in Manage Tokens View'):
tokens_order = manage_tokens.tokens
assert driver.waitFor(lambda: tokens_order[0].title == eth, 6000)
assert driver.waitFor(lambda: tokens_order[1].title == weenus, 6000)
assert driver.waitFor(lambda: tokens_order[1].title == wrappedeth, 6000)
assert driver.waitFor(lambda: tokens_order[2].title == stt, 6000)
assert driver.waitFor(lambda: tokens_order[3].title == dai, 6000)
@ -187,7 +183,7 @@ def test_custom_ordering(main_screen: MainWindow, address, name, dai, weenus, st
sorting.choose_sort_by_value('Custom order')
assets_order = wallet_account_view.get_list_of_assets()
assert driver.waitFor(lambda: assets_order[0].title == eth, 6000)
assert driver.waitFor(lambda: assets_order[1].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[1].title == wrappedeth, 6000)
assert driver.waitFor(lambda: assets_order[2].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[3].title == dai, 6000)
@ -200,17 +196,19 @@ def test_custom_ordering(main_screen: MainWindow, address, name, dai, weenus, st
manage_tokens.drag_token(eth, 3)
CustomSortOrderChangesDetectedToastMessage().wait_until_appears().save_and_apply_changes()
with step('Verify the order is correct in Manage Tokens View'):
tokens_order = manage_tokens.tokens
assert driver.waitFor(lambda: tokens_order[0].title == weenus, 6000)
assert driver.waitFor(lambda: tokens_order[1].title == stt, 6000)
assert driver.waitFor(lambda: tokens_order[2].title == dai, 6000)
assert driver.waitFor(lambda: tokens_order[3].title == eth, 6000)
# TODO return these steps back after fix of https://github.com/status-im/status-desktop/issues/15368
with step('Verify the order is correct in Wallet view'):
main_screen.left_panel.open_wallet().left_panel.select_account(name)
assets_order = wallet_account_view.get_list_of_assets()
assert driver.waitFor(lambda: assets_order[0].title == weenus, 6000)
assert driver.waitFor(lambda: assets_order[1].title == stt, 6000)
assert driver.waitFor(lambda: assets_order[2].title == dai, 6000)
assert driver.waitFor(lambda: assets_order[3].title == eth, 6000)
# with step('Verify the order is correct in Manage Tokens View'):
# tokens_order = manage_tokens.tokens
# assert driver.waitFor(lambda: tokens_order[0].title == wrappedeth, 6000)
# assert driver.waitFor(lambda: tokens_order[1].title == stt, 6000)
# assert driver.waitFor(lambda: tokens_order[2].title == dai, 6000)
# assert driver.waitFor(lambda: tokens_order[3].title == eth, 6000)
#
# with step('Verify the order is correct in Wallet view'):
# main_screen.left_panel.open_wallet().left_panel.select_account(name)
# assets_order = wallet_account_view.get_list_of_assets()
# assert driver.waitFor(lambda: assets_order[0].title == wrappedeth, 6000)
# assert driver.waitFor(lambda: assets_order[1].title == stt, 6000)
# assert driver.waitFor(lambda: assets_order[2].title == dai, 6000)
# assert driver.waitFor(lambda: assets_order[3].title == eth, 6000)