From aae6fed7680f7bd214fd71d63bce8159cca08278 Mon Sep 17 00:00:00 2001 From: Anastasiya Semiankevich Date: Thu, 18 Apr 2024 21:09:53 +0300 Subject: [PATCH] chore: fix syncing test --- test/e2e/gui/screens/onboarding.py | 2 +- test/e2e/tests/onboarding/test_onboarding_syncing.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/e2e/gui/screens/onboarding.py b/test/e2e/gui/screens/onboarding.py index ec2e2e0e68..8cf96d8f9d 100755 --- a/test/e2e/gui/screens/onboarding.py +++ b/test/e2e/gui/screens/onboarding.py @@ -140,7 +140,7 @@ class SyncCodeView(OnboardingView): return self @allure.step('Paste sync code') - def paste_sync_code(self): + def click_paste_button(self): self._paste_sync_code_button.click() @property diff --git a/test/e2e/tests/onboarding/test_onboarding_syncing.py b/test/e2e/tests/onboarding/test_onboarding_syncing.py index e42efbd17e..d32fd41b23 100644 --- a/test/e2e/tests/onboarding/test_onboarding_syncing.py +++ b/test/e2e/tests/onboarding/test_onboarding_syncing.py @@ -71,7 +71,8 @@ def test_sync_device_during_onboarding(multiple_instances): with step('Paste sync code on second instance and wait until device is synced'): sync_start = sync_view.open_enter_sync_code_form() - sync_start.paste_sync_code() + pyperclip.copy(sync_code) + sync_start.click_paste_button() sync_device_found = SyncDeviceFoundView() assert driver.waitFor( lambda: 'Device found!' in sync_device_found.device_found_notifications, 15000) @@ -106,9 +107,9 @@ def test_wrong_sync_code(sync_screen, wrong_sync_code): with step('Open sync code form'): sync_view = sync_screen.open_enter_sync_code_form() - with step('Paste wrong sync code on second instance and check that error message appears'): + with step('Paste wrong sync code and check that error message appears'): pyperclip.copy(wrong_sync_code) - sync_view.paste_sync_code() + sync_view.click_paste_button() assert SyncingSettings.SYNC_CODE_IS_WRONG_TEXT.value == sync_view.sync_code_error_message, f'Wrong sync code message did not appear'