chore: Fix create community test (#315)
This commit is contained in:
parent
62bf869602
commit
5eeac9226a
|
@ -173,7 +173,6 @@ class MainWindow(Window):
|
|||
|
||||
@allure.step('Authorize user')
|
||||
def authorize_user(self, user_account) -> 'MainWindow':
|
||||
self.prepare()
|
||||
assert isinstance(user_account, UserAccount)
|
||||
if LoginView().is_visible:
|
||||
return self.log_in(user_account)
|
||||
|
|
|
@ -35,7 +35,7 @@ class MockedKeycardController(Window):
|
|||
self._scroll = Scroll('keycardFlickable')
|
||||
|
||||
def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC):
|
||||
self._plugin_reader_button.wait_until_appears()
|
||||
driver.waitFor(lambda: self._plugin_reader_button.exists, timeout_msec)
|
||||
return self
|
||||
|
||||
@property
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import logging
|
||||
import time
|
||||
import typing
|
||||
|
||||
import allure
|
||||
|
||||
import configs.timeouts
|
||||
import driver
|
||||
from constants import UserCommunityInfo
|
||||
from driver import objects_access
|
||||
|
@ -56,11 +58,16 @@ class CommunitiesSettingsView(QObject):
|
|||
raise LookupError(f'Community item: {name} not found')
|
||||
|
||||
@allure.step('Open community info')
|
||||
def get_community_info(self, name: str) -> UserCommunityInfo:
|
||||
for community in self.communities:
|
||||
if community.name == name:
|
||||
return community
|
||||
raise LookupError(f'Community item: {name} not found')
|
||||
def get_community_info(
|
||||
self, name: str, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC) -> UserCommunityInfo:
|
||||
started_at = time.monotonic()
|
||||
while True:
|
||||
communities = self.communities
|
||||
for community in communities:
|
||||
if community.name == name:
|
||||
return community
|
||||
if time.monotonic() - started_at > timeout_msec:
|
||||
raise LookupError(f'Community item: {name} not found in {communities}')
|
||||
|
||||
@allure.step('Open community overview settings')
|
||||
def open_community_overview_settings(self, name: str):
|
||||
|
|
|
@ -17,7 +17,7 @@ from scripts.tools import image
|
|||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703084', 'Create community')
|
||||
@pytest.mark.case(703084)
|
||||
@pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/167")
|
||||
# @pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/167")
|
||||
@pytest.mark.parametrize('params', [constants.community_params])
|
||||
def test_create_community(user_account, main_screen: MainWindow, params):
|
||||
with step('Create community'):
|
||||
|
|
Loading…
Reference in New Issue