From d06cfd342a392af6587d7e3fd2b590c5e5f5bbfa Mon Sep 17 00:00:00 2001 From: Anastasiya Semiankevich Date: Tue, 30 Apr 2024 15:49:18 +0300 Subject: [PATCH] chore: raise lookup error if contacts list is empty and don't waste 30 minutes --- test/e2e/gui/screens/settings_messaging.py | 13 ++++++++++--- test/e2e/tests/communities/test_communities.py | 3 +-- .../tests/settings/test_settings_back_up_seed.py | 2 ++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/test/e2e/gui/screens/settings_messaging.py b/test/e2e/gui/screens/settings_messaging.py index 656810d326..7b6ebc5ce5 100644 --- a/test/e2e/gui/screens/settings_messaging.py +++ b/test/e2e/gui/screens/settings_messaging.py @@ -26,7 +26,7 @@ class MessagingSettingsView(QObject): @allure.step('Open contacts settings') def open_contacts_settings(self) -> 'ContactsSettingsView': self._contacts_button.click() - return ContactsSettingsView().wait_until_appears() + return ContactsSettingsView() class ContactItem: @@ -106,7 +106,14 @@ class ContactsSettingsView(QObject): @property @allure.step('Get contact items') def contact_items(self) -> typing.List[ContactItem]: - return [ContactItem(item) for item in self._contacts_items_list.items] + try: + contact_items = [] + for i in range(2): + contact_items = [ContactItem(item) for item in self._contacts_items_list.items] + if len(contact_items) != 0: + return contact_items + except LookupError as err: + raise err @property @allure.step('Get title of list with sent pending requests') @@ -181,7 +188,7 @@ class ContactsSettingsView(QObject): @allure.step('Open verify identity popup') def open_more_options_popup( - self, contact: str, timeout_sec: int = configs.timeouts.MESSAGING_TIMEOUT_SEC, attempts: int = 2): + self, contact: str, timeout_sec: int = configs.timeouts.MESSAGING_TIMEOUT_SEC): request = self.find_contact_in_list(contact, timeout_sec) request.open_more_options_popup() return self diff --git a/test/e2e/tests/communities/test_communities.py b/test/e2e/tests/communities/test_communities.py index 83e2e9bafd..6ecef4838c 100644 --- a/test/e2e/tests/communities/test_communities.py +++ b/test/e2e/tests/communities/test_communities.py @@ -63,8 +63,7 @@ def test_create_community(user_account, main_screen: MainWindow, params): community_screen.verify_channel( 'general', 'General channel for the community', - None, - color + None ) with step('Verify community parameters in community settings view'): diff --git a/test/e2e/tests/settings/test_settings_back_up_seed.py b/test/e2e/tests/settings/test_settings_back_up_seed.py index abc2723bbb..8d7ad29c2b 100644 --- a/test/e2e/tests/settings/test_settings_back_up_seed.py +++ b/test/e2e/tests/settings/test_settings_back_up_seed.py @@ -8,6 +8,8 @@ from gui.components.back_up_your_seed_phrase_banner import BackUpSeedPhraseBanne from gui.main_window import MainWindow pytestmark = marks + + @pytest.mark.critical @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703001', 'Backup seed phrase') @pytest.mark.case(703001)