Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pages/base_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def __init__(self, page: Page):
self.main_menu__header = self.page.locator("#ntshPageTitle")

def click_main_menu_link(self) -> None:
self.click(self.main_menu_link)
if self.main_menu_link.is_visible():
self.click(self.main_menu_link)

def click_log_out_link(self) -> None:
self.click(self.log_out_link)
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ markers =
compartment1: only for compartment 1
compartment2: only for compartment 2
compartment3: only for compartment 3
vpn_required: for tests that require a VPN connection
1 change: 1 addition & 0 deletions tests/smokescreen/test_compartment_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def test_create_invitations_plan(page: Page, smokescreen_properties: dict) -> No
logging.info("Invitation plan created")


@pytest.mark.vpn_required
@pytest.mark.smoke
@pytest.mark.smokescreen
@pytest.mark.compartment1
Expand Down
1 change: 1 addition & 0 deletions tests/smokescreen/test_compartment_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def smokescreen_properties() -> dict:
return PropertiesFile().get_smokescreen_properties()


@pytest.mark.vpn_required
@pytest.mark.smoke
@pytest.mark.smokescreen
@pytest.mark.compartment2
Expand Down
1 change: 1 addition & 0 deletions tests/smokescreen/test_compartment_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def smokescreen_properties() -> dict:
return PropertiesFile().get_smokescreen_properties()


@pytest.mark.vpn_required
@pytest.mark.smokescreen
@pytest.mark.compartment3
def test_compartment_3(page: Page, smokescreen_properties: dict) -> None:
Expand Down
1 change: 1 addition & 0 deletions tests/smokescreen/test_compartment_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def smokescreen_properties() -> dict:
return PropertiesFile().get_smokescreen_properties()


@pytest.mark.vpn_required
@pytest.mark.smokescreen
@pytest.mark.compartment4
def test_compartment_4(page: Page, smokescreen_properties: dict) -> None:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_bcss_19181_users_permit_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def before_test(page: Page):
OracleDB().delete_all_users_from_approved_users_table()


# @pytest.mark.smoke
@pytest.mark.vpn_required
@pytest.mark.smoke
def test_only_users_on_approved_can_login_to_bcss(page: Page) -> None:
#NOTE: You must be connected to the non prod vpn to connect to oracle DB and run this test
# Add bcss401 user to approved users list table
OracleDB().populate_ui_approved_users_table("BCSS401")
# BCSS401 user successfully logs in to BCSS whilst on the approved list
Expand Down
3 changes: 1 addition & 2 deletions utils/user_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from pathlib import Path
from dotenv import load_dotenv
from playwright.sync_api import Page

from pages.cognito_login_page import CognitoLoginPage
from pages.login.cognito_login_page import CognitoLoginPage

logger = logging.getLogger(__name__)
USERS_FILE = Path(__file__).parent.parent / "users.json"
Expand Down
Loading