chore: add object names to beta consent popup and test mode env variable condition (#308)
* chore: add object names to beta popup * chore: add check for env variable
This commit is contained in:
parent
5be0364ec4
commit
41d431c136
|
@ -8,3 +8,5 @@ IS_WIN = True if platform.system() == 'Windows' else False
|
||||||
OS_ID = 'lin' if IS_LIN else 'mac' if IS_MAC else 'win'
|
OS_ID = 'lin' if IS_LIN else 'mac' if IS_MAC else 'win'
|
||||||
|
|
||||||
DISPLAY = os.getenv('DISPLAY', ':0')
|
DISPLAY = os.getenv('DISPLAY', ':0')
|
||||||
|
|
||||||
|
TEST_MODE = os.getenv('STATUS_RUNTIME_TEST_MODE')
|
||||||
|
|
|
@ -3,15 +3,16 @@ import allure
|
||||||
from gui.components.base_popup import BasePopup
|
from gui.components.base_popup import BasePopup
|
||||||
from gui.elements.button import Button
|
from gui.elements.button import Button
|
||||||
from gui.elements.check_box import CheckBox
|
from gui.elements.check_box import CheckBox
|
||||||
|
from gui.elements.object import QObject
|
||||||
|
|
||||||
|
|
||||||
class BetaConsentPopup(BasePopup):
|
class BetaConsentPopup(QObject):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._agree_to_use_checkbox = CheckBox('agreeToUse_StatusCheckBox')
|
self._agree_to_use_checkbox = CheckBox('agreeToUse_StatusCheckBox')
|
||||||
self._ready_to_use_checkbox = CheckBox('readyToUse_StatusCheckBox')
|
self._ready_to_use_checkbox = CheckBox('readyToUse_StatusCheckBox')
|
||||||
self._ready_to_use_button = Button('i_m_ready_to_use_Status_Desktop_Beta_StatusButton')
|
self._ready_to_use_button = Button('i_m_ready_to_use_Status_Desktop_Beta_StatusButton')
|
||||||
super(BetaConsentPopup, self).__init__()
|
super(BetaConsentPopup, self).__init__('betaConsent_StatusModal')
|
||||||
|
|
||||||
@allure.step('Confirm all')
|
@allure.step('Confirm all')
|
||||||
def confirm(self):
|
def confirm(self):
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
import allure
|
import allure
|
||||||
|
@ -151,18 +152,16 @@ class MainWindow(Window):
|
||||||
if configs.system.IS_MAC:
|
if configs.system.IS_MAC:
|
||||||
BiometricsView().wait_until_appears().prefer_password()
|
BiometricsView().wait_until_appears().prefer_password()
|
||||||
SplashScreen().wait_until_appears().wait_until_hidden()
|
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||||
if not configs.DEV_BUILD:
|
if not configs.system.TEST_MODE:
|
||||||
if driver.waitFor(lambda: BetaConsentPopup().exists, configs.timeouts.UI_LOAD_TIMEOUT_MSEC):
|
BetaConsentPopup().confirm()
|
||||||
BetaConsentPopup().confirm()
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@allure.step('Log in user')
|
@allure.step('Log in user')
|
||||||
def log_in(self, user_account: UserAccount):
|
def log_in(self, user_account: UserAccount):
|
||||||
LoginView().log_in(user_account)
|
LoginView().log_in(user_account)
|
||||||
SplashScreen().wait_until_appears().wait_until_hidden()
|
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||||
if not configs.DEV_BUILD:
|
if not configs.system.TEST_MODE:
|
||||||
if driver.waitFor(lambda: BetaConsentPopup().exists, configs.timeouts.UI_LOAD_TIMEOUT_MSEC):
|
BetaConsentPopup().confirm()
|
||||||
BetaConsentPopup().confirm()
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@allure.step('Authorize user')
|
@allure.step('Authorize user')
|
||||||
|
|
|
@ -66,10 +66,10 @@ copy_icon_StatusIcon = {"container": statusDesktop_mainWindow_overlay, "objectNa
|
||||||
|
|
||||||
|
|
||||||
# Welcome Status Popup
|
# Welcome Status Popup
|
||||||
agreeToUse_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "id": "agreeToUse", "type": "StatusCheckBox", "unnamed": 1, "visible": True}
|
betaConsent_StatusModal = {"container": statusDesktop_mainWindow_overlay, "objectName": "desktopBetaStatusModal", "type": "StatusModal", "visible": True}
|
||||||
readyToUse_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "id": "readyToUse", "type": "StatusCheckBox", "unnamed": 1, "visible": True}
|
agreeToUse_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "desktopBetaAgreeCheckBox", "type": "StatusCheckBox", "visible": True}
|
||||||
i_m_ready_to_use_Status_Desktop_Beta_StatusButton = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "type": "StatusButton", "unnamed": 1, "visible": True}
|
readyToUse_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "objectName": "desktopBetaReadyCheckBox", "type": "StatusCheckBox", "visible": True}
|
||||||
|
i_m_ready_to_use_Status_Desktop_Beta_StatusButton = {"container": statusDesktop_mainWindow_overlay, "type": "StatusButton", "objectName": "desktopBetaStatusButton", "visible": True}
|
||||||
|
|
||||||
""" Communities """
|
""" Communities """
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
import allure
|
import allure
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -73,7 +74,7 @@ def test_generate_new_keys(main_window, keys_screen, user_name: str, password, u
|
||||||
assert BiometricsView().is_touch_id_button_visible(), f"TouchID button is not found"
|
assert BiometricsView().is_touch_id_button_visible(), f"TouchID button is not found"
|
||||||
BiometricsView().wait_until_appears().prefer_password()
|
BiometricsView().wait_until_appears().prefer_password()
|
||||||
SplashScreen().wait_until_appears().wait_until_hidden()
|
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||||
if not configs.DEV_BUILD:
|
if not configs.system.TEST_MODE:
|
||||||
BetaConsentPopup().confirm()
|
BetaConsentPopup().confirm()
|
||||||
|
|
||||||
with step('Open User Canvas and verify user info'):
|
with step('Open User Canvas and verify user info'):
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import os
|
||||||
|
|
||||||
import allure
|
import allure
|
||||||
import pytest
|
import pytest
|
||||||
from allure_commons._allure import step
|
from allure_commons._allure import step
|
||||||
|
@ -43,7 +45,7 @@ def test_import_seed_phrase(aut: AUT, keys_screen, main_window, user_account, au
|
||||||
if configs.system.IS_MAC:
|
if configs.system.IS_MAC:
|
||||||
BiometricsView().wait_until_appears().prefer_password()
|
BiometricsView().wait_until_appears().prefer_password()
|
||||||
SplashScreen().wait_until_appears().wait_until_hidden()
|
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||||
if not configs.DEV_BUILD:
|
if not configs.system.TEST_MODE:
|
||||||
BetaConsentPopup().confirm()
|
BetaConsentPopup().confirm()
|
||||||
|
|
||||||
with (step('Verify that restored account reveals correct status wallet address')):
|
with (step('Verify that restored account reveals correct status wallet address')):
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import allure
|
import allure
|
||||||
|
@ -45,7 +46,7 @@ def test_login_with_wrong_password(aut: AUT, keys_screen, main_window, error: st
|
||||||
if configs.system.IS_MAC:
|
if configs.system.IS_MAC:
|
||||||
BiometricsView().wait_until_appears().prefer_password()
|
BiometricsView().wait_until_appears().prefer_password()
|
||||||
SplashScreen().wait_until_appears().wait_until_hidden()
|
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||||
if not configs.DEV_BUILD:
|
if not configs.system.TEST_MODE:
|
||||||
BetaConsentPopup().confirm()
|
BetaConsentPopup().confirm()
|
||||||
|
|
||||||
with step('Verify that the user logged in correctly'):
|
with step('Verify that the user logged in correctly'):
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import os
|
||||||
|
|
||||||
import allure
|
import allure
|
||||||
import pyperclip
|
import pyperclip
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -75,9 +77,8 @@ def test_sync_device_during_onboarding(multiple_instance, user_data):
|
||||||
with step('Sign in to synced account'):
|
with step('Sign in to synced account'):
|
||||||
sync_result.sign_in()
|
sync_result.sign_in()
|
||||||
SplashScreen().wait_until_hidden()
|
SplashScreen().wait_until_hidden()
|
||||||
if not configs.DEV_BUILD:
|
if not configs.system.TEST_MODE:
|
||||||
if driver.waitFor(lambda: BetaConsentPopup().exists, configs.timeouts.UI_LOAD_TIMEOUT_MSEC):
|
BetaConsentPopup().confirm()
|
||||||
BetaConsentPopup().confirm()
|
|
||||||
|
|
||||||
with step('Verify user details are the same with user in first instance'):
|
with step('Verify user details are the same with user in first instance'):
|
||||||
user_canvas = main_window.left_panel.open_user_canvas()
|
user_canvas = main_window.left_panel.open_user_canvas()
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import os
|
||||||
|
|
||||||
import allure
|
import allure
|
||||||
import pytest
|
import pytest
|
||||||
from allure_commons._allure import step
|
from allure_commons._allure import step
|
||||||
|
@ -57,7 +59,7 @@ def test_check_password_strength_and_login(keys_screen, main_window, user_accoun
|
||||||
if configs.system.IS_MAC:
|
if configs.system.IS_MAC:
|
||||||
BiometricsView().wait_until_appears().prefer_password()
|
BiometricsView().wait_until_appears().prefer_password()
|
||||||
SplashScreen().wait_until_appears().wait_until_hidden()
|
SplashScreen().wait_until_appears().wait_until_hidden()
|
||||||
if not configs.DEV_BUILD:
|
if not configs.system.TEST_MODE:
|
||||||
BetaConsentPopup().confirm()
|
BetaConsentPopup().confirm()
|
||||||
|
|
||||||
with step('Verify that the user logged in correctly'):
|
with step('Verify that the user logged in correctly'):
|
||||||
|
|
Loading…
Reference in New Issue