chore: fix test_sync_device_during_onboarding (#240)

This commit is contained in:
Vladimir Druzhinin 2023-11-01 08:19:05 +01:00 committed by GitHub
parent 46e77e14e9
commit c7be5ef7bb
3 changed files with 6 additions and 7 deletions

View File

@ -41,12 +41,10 @@ class AUT:
def __exit__(self, exc_type, exc_value, traceback):
if exc_type:
screenshot = configs.testpath.RUN / 'screenshot.png'
if screenshot.exists():
screenshot = configs.testpath.RUN / f'screenshot_{datetime.now():%H%M%S}.png'
screenshot = configs.testpath.RUN / f'{self.aut_id}.png'
ImageGrab.grab(xdisplay=configs.system.DISPLAY if IS_LIN else None).save(screenshot)
allure.attach(
name='Screenshot on fail', body=screenshot.read_bytes(), attachment_type=allure.attachment_type.PNG)
name=f'Screenshot on fail for multiple instance: {self.aut_id}', body=screenshot.read_bytes(), attachment_type=allure.attachment_type.PNG)
self.stop()
@allure.step('Attach Squish to Test Application')

View File

@ -40,17 +40,17 @@ class Window(QObject):
@allure.step("Close {0}")
def close(self):
driver.toplevel_window.close(self.real_name)
_logger.info(f'Window {getattr(self, "title", "")} closed')
_logger.info(f'{self} closed')
@allure.step("Show {0}")
def show(self):
driver.waitForObjectExists(self.real_name).setVisible(True)
_logger.info(f'Window {getattr(self, "title", "")} is visible')
_logger.info(f'{self} is visible')
@allure.step("Hide {0}")
def hide(self):
driver.waitForObjectExists(self.real_name).setVisible(False)
_logger.info(f'Window {getattr(self, "title", "")} hidden')
_logger.info(f'{self} hidden')
def wait_until_appears(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC):
super().wait_until_appears(timeout_msec)

View File

@ -17,6 +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.parametrize('params', [constants.community_params])
def test_create_community(user_account, main_screen: MainWindow, params):
with step('Create community'):