chore: fixed cancel syncing test

This commit is contained in:
Valentina Novgorodtceva 2024-05-15 13:35:11 +07:00 committed by Valentina1133
parent 5b4a4e31e9
commit 25cba56273
1 changed files with 5 additions and 5 deletions

View File

@ -2,6 +2,8 @@ import allure
import pyperclip import pyperclip
import pytest import pytest
from allure_commons._allure import step from allure_commons._allure import step
from gui.screens.settings_syncing import SyncingSettingsView
from . import marks from . import marks
import configs.testpath import configs.testpath
@ -121,9 +123,7 @@ def test_cancel_setup_syncing(main_screen: MainWindow):
if configs.DEV_BUILD: if configs.DEV_BUILD:
sync_settings_view.is_backup_button_present() sync_settings_view.is_backup_button_present()
with step('Click setup syncing and close authenticate popup'): with step('Click setup syncing and close authenticate popup'):
main_screen.left_panel.open_settings().left_panel.open_syncing_settings().click_setup_syncing().close_authenticate_popup() sync_settings_view.click_setup_syncing().close_authenticate_popup()
sync_new_device_popup = SyncNewDevicePopup().wait_until_appears()
with step('Verify error messages appear'): with step('Verify that authenticate popup was closed and syncing settings view appears after closing'):
assert sync_new_device_popup.primary_error_message == SyncingSettings.SYNC_SETUP_ERROR_PRIMARY.value SyncingSettingsView().wait_until_appears()
assert sync_new_device_popup.secondary_error_message == SyncingSettings.SYNC_SETUP_ERROR_SECONDARY.value