chore: keycard env

This commit is contained in:
Valentina Novgorodtceva 2024-07-12 15:14:45 +07:00
parent e3ce23949d
commit 82c5787d32
5 changed files with 11 additions and 2 deletions

View File

@ -5,3 +5,4 @@ LOG_LEVEL = logging.getLevelName(os.getenv('LOG_LEVEL', 'INFO'))
UPDATE_VP_ON_FAIL = False UPDATE_VP_ON_FAIL = False
DEV_BUILD = False DEV_BUILD = False
AUT_PATH = os.getenv('AUT_PATH') AUT_PATH = os.getenv('AUT_PATH')
os.environ['STATUS_RUNTIME_USE_MOCKED_KEYCARD'] = 'False'

View File

@ -1,6 +1,8 @@
import logging import logging
import os
LOG_LEVEL = logging.DEBUG LOG_LEVEL = logging.DEBUG
DEV_BUILD = False DEV_BUILD = False
AUT_PATH = "path to the application (.app or .AppImage)" AUT_PATH = "path to the application (.app or .AppImage)"
os.environ['STATUS_RUNTIME_USE_MOCKED_KEYCARD'] = 'False'

View File

@ -44,7 +44,8 @@ def setup_function_scope(
caplog, caplog,
generate_test_data, generate_test_data,
check_result, check_result,
application_logs application_logs,
keycard_controller
): ):
# FIXME: broken due to KeyError: <_pytest.stash.StashKey object at 0x7fd1ba6d78c0> # FIXME: broken due to KeyError: <_pytest.stash.StashKey object at 0x7fd1ba6d78c0>
# caplog.set_level(configs.LOG_LEVEL) # caplog.set_level(configs.LOG_LEVEL)

View File

@ -1,4 +1,5 @@
import allure import allure
import os
import pytest import pytest
import logging import logging
import configs import configs
@ -18,6 +19,10 @@ def options(request):
return request.param return request.param
return '' return ''
@pytest.fixture
def keycard_controller(request):
if 'settings_keycard' in str(getattr(request, 'fspath')):
os.environ['STATUS_RUNTIME_USE_MOCKED_KEYCARD'] = 'True'
@pytest.fixture @pytest.fixture
def application_logs(): def application_logs():

View File

@ -20,7 +20,7 @@ pytestmark = marks
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703627', 'Check whats on a Keycard') @allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703627', 'Check whats on a Keycard')
@pytest.mark.case(703627) @pytest.mark.case(703627)
@pytest.mark.parametrize('user_account', [constants.user.user_account_one]) @pytest.mark.parametrize('user_account', [constants.user.user_account_one])
@pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/274") # @pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/274")
def test_check_whats_on_keycard(main_screen: MainWindow, user_account): def test_check_whats_on_keycard(main_screen: MainWindow, user_account):
main_screen.prepare() main_screen.prepare()