Skip to content

Commit 8682bc8

Browse files
committed
chore(@e2e): fix tests to reflect the changes in UI
1 parent f04a0e8 commit 8682bc8

File tree

5 files changed

+8
-12
lines changed

5 files changed

+8
-12
lines changed

test/e2e/gui/main_window.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ def create_profile(self, user_account: UserAccount):
179179
splash_screen.wait_until_appears()
180180
splash_screen.wait_until_hidden(APP_LOAD_TIMEOUT_MSEC)
181181

182-
# Navigate from home to settings first
183182
# since we now struggle with 3 words names, I need to change display name first
184-
settings_screen = self.home.open_from_dock(DockButtons.SETTINGS.value)
183+
left_panel = MainLeftPanel()
184+
settings_screen = left_panel.open_settings()
185185
profile = settings_screen.left_panel.open_profile_settings()
186186
profile.set_name(user_account.name)
187187
profile.save_changes_button.click()

test/e2e/tests/crtitical_tests_prs/test_add_edit_restart_add_delete_generated_account.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_add_edit_restart_add_delete_generated_account(aut: AUT, main_screen: Ma
6565
main_screen.authorize_user(user_account)
6666

6767
with step('Add second generated wallet account'):
68-
wallet = main_screen.home.open_from_dock(DockButtons.WALLET.value)
68+
wallet = main_screen.left_panel.open_wallet()
6969
account_popup = wallet.left_panel.open_add_account_popup()
7070
account_popup.set_name(name2).save_changes()
7171

test/e2e/tests/crtitical_tests_prs/test_onboarding_import_seed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_import_and_reimport_random_seed(
3232
import_seed_and_log_in(create_your_profile_view, seed_phrase, user_account)
3333

3434
with step('Verify that restored account reveals correct status wallet address'):
35-
profile = main_window.home.open_from_dock(DockButtons.SETTINGS.value).left_panel.open_profile_settings()
35+
profile = main_window.left_panel.open_settings().left_panel.open_profile_settings()
3636
profile.set_name(user_account.name)
3737
profile.save_changes_button.click()
3838

test/e2e/tests/crtitical_tests_prs/test_onboarding_sync_with_code.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,9 @@ def test_sync_devices_during_onboarding_change_settings_unpair(multiple_instance
7575
SplashScreen().wait_until_hidden(APP_LOAD_TIMEOUT_MSEC)
7676

7777
with step('Verify user details are the same with user in first instance'):
78-
home = HomeScreen()
79-
online_identifier = home.open_online_identifier_from_home_screen()
78+
online_identifier = main_window.left_panel.open_online_identifier()
8079
assert online_identifier.get_user_name == user.name, \
8180
f'Name in online identifier and display name do not match'
82-
main_window.home.click()
8381
main_window.hide()
8482

8583
with step(f'Open first instance {aut_one.aut_id} and verify it is synced, click done'):
@@ -92,17 +90,15 @@ def test_sync_devices_during_onboarding_change_settings_unpair(multiple_instance
9290
sync_device_found.done_button.click()
9391

9492
with step('Change Allow contact requests toggle state to OFF'):
95-
home = main_window.left_panel.open_home_screen()
96-
messaging_settings = home.open_messaging_settings_from_grid()
93+
messaging_settings = main_window.left_panel.open_settings().left_panel.open_messaging_settings()
9794
messaging_settings.switch_allow_contact_requests_toggle(False)
9895
assert not messaging_settings.allow_contact_requests_toggle.object.checked
9996
main_window.minimize()
10097

10198
with step(f'Check that settings changes are reflected in second instance {aut_two.aut_id}'):
10299
aut_two.attach()
103100
main_window.prepare()
104-
home = HomeScreen()
105-
msg_stngs = home.open_messaging_settings_from_grid()
101+
msg_stngs = main_window.left_panel.open_settings().left_panel.open_messaging_settings()
106102
assert driver.waitFor(
107103
lambda: not msg_stngs.allow_contact_requests_toggle.object.checked, 15000), \
108104
f'Toggle changes are not synced'

test/e2e/tests/crtitical_tests_prs/test_settings_password_change_password.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ def test_change_password_and_login(aut: AUT, main_screen: MainWindow, user_accou
3434
password=new_password))
3535

3636
with step('Verify that the user logged in correctly'):
37-
online_identifier = main_screen.home.open_online_identifier_from_home_screen()
37+
online_identifier = main_screen.left_panel.open_online_identifier()
3838
profile_popup = online_identifier.open_profile_popup_from_online_identifier()
3939
assert profile_popup.user_name == user_account.name

0 commit comments

Comments
 (0)