chore: introduced local run mark and added skipif mark to skip them on ci

This commit is contained in:
Valentina Novgorodtceva 2024-07-31 12:18:37 +07:00 committed by Anastasiya
parent b4ef71142e
commit 905a5d21b4
4 changed files with 11 additions and 5 deletions

View File

@ -96,7 +96,7 @@ class LeftPanel(QObject):
@allure.step('Open ENS usernames settings') @allure.step('Open ENS usernames settings')
@handle_settings_opening(ENSSettingsView, '3-MainMenuItem') @handle_settings_opening(ENSSettingsView, '3-MainMenuItem')
def open_ens_usernames_settings(self, click_attempts: int = 2) -> 'ENSSettingsView': def open_ens_usernames_settings(self, click_attempts: int = 2) -> 'ENSSettingsView':
assert ENSSettingsView().exists, 'ENS settings view was not opened' assert ENSSettingsView().wait_until_appears(), 'ENS settings view was not opened'
return ENSSettingsView() return ENSSettingsView()
@allure.step('Open advanced settings') @allure.step('Open advanced settings')

View File

@ -23,4 +23,5 @@ markers =
transaction: All tests which are doing transactions transaction: All tests which are doing transactions
online_identifier: All tests related to online_identifier functionality online_identifier: All tests related to online_identifier functionality
timeout: Apply timeout when test is running longer than expected timeout: Apply timeout when test is running longer than expected
local_run: All tests which fail on ci but pass locally

View File

@ -4,6 +4,8 @@ import string
import allure import allure
import pytest import pytest
from allure_commons._allure import step from allure_commons._allure import step
from configs import testpath
from . import marks from . import marks
import configs import configs
@ -23,8 +25,9 @@ pytestmark = marks
pytest.param('0x7f1502605A2f2Cc01f9f4E7dd55e549954A8cD0C', ''.join(random.choices(string.ascii_letters + pytest.param('0x7f1502605A2f2Cc01f9f4E7dd55e549954A8cD0C', ''.join(random.choices(string.ascii_letters +
string.digits, k=20))) string.digits, k=20)))
]) ])
@pytest.mark.skip(reason="https://github.com/status-im/status-desktop/issues/14862") @pytest.mark.local_run
@pytest.mark.skip(reason="https://github.com/status-im/status-desktop/issues/14509") @pytest.mark.skipif('jenkins' in str(testpath.ROOT),
reason="https://github.com/status-im/status-desktop/issues/14862, https://github.com/status-im/status-desktop/issues/14509")
def test_settings_include_in_total_balance(main_screen: MainWindow, name, watched_address): def test_settings_include_in_total_balance(main_screen: MainWindow, name, watched_address):
with (step('Open wallet on main screen and check the total balance for new account is 0')): with (step('Open wallet on main screen and check the total balance for new account is 0')):
wallet_main_screen = main_screen.left_panel.open_wallet() wallet_main_screen = main_screen.left_panel.open_wallet()

View File

@ -2,6 +2,7 @@ import allure
import pytest import pytest
from allure_commons._allure import step from allure_commons._allure import step
from configs import testpath
from gui.components.signing_phrase_popup import SigningPhrasePopup from gui.components.signing_phrase_popup import SigningPhrasePopup
@ -11,8 +12,9 @@ from gui.components.signing_phrase_popup import SigningPhrasePopup
@pytest.mark.parametrize('default_name, address, name, color, emoji', [ @pytest.mark.parametrize('default_name, address, name, color, emoji', [
pytest.param('Account 1', '0xea123F7beFF45E3C9fdF54B324c29DBdA14a639A', 'AccWatch1', '#2a4af5', 'sunglasses') pytest.param('Account 1', '0xea123F7beFF45E3C9fdF54B324c29DBdA14a639A', 'AccWatch1', '#2a4af5', 'sunglasses')
]) ])
@pytest.mark.skip(reason="https://github.com/status-im/status-desktop/issues/14862") @pytest.mark.local_run
@pytest.mark.skip(reason="https://github.com/status-im/status-desktop/issues/14509") @pytest.mark.skipif('jenkins' in str(testpath.ROOT),
reason="https://github.com/status-im/status-desktop/issues/14862, https://github.com/status-im/status-desktop/issues/14509")
def test_wallet_modals_default_account_values(main_screen, default_name, address, name, color, emoji): def test_wallet_modals_default_account_values(main_screen, default_name, address, name, color, emoji):
with step('Add watched address with plus action button'): with step('Add watched address with plus action button'):
wallet = main_screen.left_panel.open_wallet() wallet = main_screen.left_panel.open_wallet()