tests: reduce timeout for saved address test

This commit is contained in:
Anastasiya Semenkevich 2024-08-19 09:47:00 +03:00 committed by Anastasiya
parent 7c10b16b67
commit 4673c1af57
3 changed files with 7 additions and 8 deletions

View File

@ -2,6 +2,7 @@
UI_LOAD_TIMEOUT_SEC = 5 UI_LOAD_TIMEOUT_SEC = 5
UI_LOAD_TIMEOUT_MSEC = UI_LOAD_TIMEOUT_SEC * 1000 UI_LOAD_TIMEOUT_MSEC = UI_LOAD_TIMEOUT_SEC * 1000
LOADING_LIST_TIMEOUT_MSEC = 20000
PROCESS_TIMEOUT_SEC = 10 PROCESS_TIMEOUT_SEC = 10
APP_LOAD_TIMEOUT_MSEC = 60000 APP_LOAD_TIMEOUT_MSEC = 60000
MESSAGING_TIMEOUT_SEC = 60 MESSAGING_TIMEOUT_SEC = 60

View File

@ -38,8 +38,7 @@ def test_wallet_settings_add_saved_address(main_screen: MainWindow, address: str
with step('Verify recently added saved address is present in the list'): with step('Verify recently added saved address is present in the list'):
assert driver.waitFor( assert driver.waitFor(
lambda: name in settings_saved_addresses.get_saved_address_names_list(), lambda: name in settings_saved_addresses.get_saved_address_names_list(),
configs.timeouts.APP_LOAD_TIMEOUT_MSEC), f'Address: {name} not found' configs.timeouts.LOADING_LIST_TIMEOUT_MSEC), f'Address: {name} not found'
# TODO change timeout after https://github.com/status-im/status-desktop/issues/16121
with step('Verify toast message when adding saved address'): with step('Verify toast message when adding saved address'):
messages = main_screen.wait_for_notification() messages = main_screen.wait_for_notification()

View File

@ -26,7 +26,6 @@ pytestmark = marks
'0x8397bc3c5a60a1883174f722403d63a8833312b7', '0x8397bc3c5a60a1883174f722403d63a8833312b7',
''.join(random.choices(string.ascii_letters, k=24))) ''.join(random.choices(string.ascii_letters, k=24)))
]) ])
# TODO: https://github.com/status-im/desktop-qa-automation/issues/452
def test_manage_saved_address(main_screen: MainWindow, name: str, address: str, new_name: str): def test_manage_saved_address(main_screen: MainWindow, name: str, address: str, new_name: str):
with step('Add new saved address'): with step('Add new saved address'):
wallet = main_screen.left_panel.open_wallet() wallet = main_screen.left_panel.open_wallet()
@ -36,7 +35,7 @@ def test_manage_saved_address(main_screen: MainWindow, name: str, address: str,
with step('Verify that saved address is in the list of saved addresses'): with step('Verify that saved address is in the list of saved addresses'):
assert driver.waitFor( assert driver.waitFor(
lambda: name in wallet.left_panel.open_saved_addresses().address_names, lambda: name in wallet.left_panel.open_saved_addresses().address_names,
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), f'Address: {name} not found' configs.timeouts.LOADING_LIST_TIMEOUT_MSEC), f'Address: {name} not found'
with step('Verify toast message when adding saved address'): with step('Verify toast message when adding saved address'):
messages = main_screen.wait_for_notification() messages = main_screen.wait_for_notification()
@ -49,7 +48,7 @@ def test_manage_saved_address(main_screen: MainWindow, name: str, address: str,
with step('Verify that saved address with new name is in the list of saved addresses'): with step('Verify that saved address with new name is in the list of saved addresses'):
assert driver.waitFor( assert driver.waitFor(
lambda: new_name in SavedAddressesView().address_names, lambda: new_name in SavedAddressesView().address_names,
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), f'Address: {new_name} not found' configs.timeouts.LOADING_LIST_TIMEOUT_MSEC), f'Address: {new_name} not found'
with step('Verify toast message when editing saved address'): with step('Verify toast message when editing saved address'):
messages = main_screen.wait_for_notification() messages = main_screen.wait_for_notification()
@ -65,6 +64,6 @@ def test_manage_saved_address(main_screen: MainWindow, name: str, address: str,
f"Toast message about deleting saved address is not correct or not present. Current list of messages: {messages}" f"Toast message about deleting saved address is not correct or not present. Current list of messages: {messages}"
with step('Verify that saved address with new name is not in the list of saved addresses'): with step('Verify that saved address with new name is not in the list of saved addresses'):
assert not driver.waitFor( assert not driver.waitFor(
lambda: new_name in wallet.left_panel.open_saved_addresses().get_saved_addresses_list(), lambda: new_name in wallet.left_panel.open_saved_addresses().get_saved_addresses_list(),
configs.timeouts.APP_LOAD_TIMEOUT_MSEC), f'Address: {new_name} is still present' configs.timeouts.LOADING_LIST_TIMEOUT_MSEC), f'Address: {new_name} is still present'