From 4cf0626a256591c24893708d446453bfb419de6d Mon Sep 17 00:00:00 2001 From: Valentina Novgorodtceva Date: Wed, 15 May 2024 11:13:17 +0700 Subject: [PATCH] chore: some changes for stability --- test/e2e/gui/screens/community_settings_tokens.py | 13 ++++++++++--- .../test_communities_mint_owner_token.py | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/test/e2e/gui/screens/community_settings_tokens.py b/test/e2e/gui/screens/community_settings_tokens.py index f7e0506dc7..6847b7364d 100644 --- a/test/e2e/gui/screens/community_settings_tokens.py +++ b/test/e2e/gui/screens/community_settings_tokens.py @@ -253,12 +253,19 @@ class EditOwnerTokenView(QObject): return str(destructible_box.value) @allure.step('Select Mainnet network') - def select_mainnet_network(self): + def select_mainnet_network(self, attempts: int = 2): if not self._select_network_combobox.is_visible: self._scroll.vertical_down_to(self._select_network_combobox) self._select_network_combobox.click() - self._mainnet_network_item.click() - return self + try: + self._mainnet_network_item.wait_until_appears() + self._mainnet_network_item.click() + return self + except AssertionError as err: + if attempts: + self.select_mainnet_network(attempts - 1) + else: + raise err @allure.step('Click mint button') def click_mint(self): diff --git a/test/e2e/tests/communities/test_communities_mint_owner_token.py b/test/e2e/tests/communities/test_communities_mint_owner_token.py index 8e973f47af..98de7eaefc 100644 --- a/test/e2e/tests/communities/test_communities_mint_owner_token.py +++ b/test/e2e/tests/communities/test_communities_mint_owner_token.py @@ -79,7 +79,7 @@ def test_mint_owner_token(keys_screen, main_window, user_account): with step('Verify all elements of master token panel'): tokens_screen.verify_text_on_master_token_panel() - with step('Select Mainnet network in edit network view and click mint'): + with step('Click next'): edit_owner_token_view = tokens_screen.click_next() with (step('Verify all elements of owner token section')): @@ -115,7 +115,7 @@ def test_mint_owner_token(keys_screen, main_window, user_account): assert edit_owner_token_view.get_transferable_box_content(1) == 'No' assert edit_owner_token_view.get_destructible_box_content(1) == 'Yes' - with step('Verify all elements of master token section'): + with step('Select Mainnet network'): select_network = edit_owner_token_view.select_mainnet_network() with step('Verify fees title and gas fees exist'):