1+ from sys import platform
2+
13import pytest
4+ import logging
25from jproperties import Properties
3-
4- from my_pages import *
6+ from utils .user_tools import UserTools
7+ from pages .login_page import BcssLoginPage
8+ from pages .bcss_home_page import MainMenu
9+ from pages .call_and_recall_page import CallAndRecall
10+ from pages .invitations_monitoring_page import InvitationsMonitoring
11+ from pages .invitations_plans_page import InvitationsPlans
12+ from pages .create_a_plan_page import *
13+ from playwright .sync_api import Page
514from utils .batch_processing import batch_processing
615
716
@@ -15,14 +24,18 @@ def smokescreen_properties() -> dict:
1524 dict: A dictionary containing the values loaded from the 'bcss_smokescreen_tests.properties' file.
1625 """
1726 configs = Properties ()
18- with open ('bcss_smokescreen_tests.properties' , 'rb' ) as read_prop :
19- configs .load (read_prop )
27+ if platform == "win32" :
28+ with open ('tests/smokescreen/bcss_smokescreen_tests.properties' , 'rb' ) as read_prop :
29+ configs .load (read_prop )
30+ elif platform == "darwin" :
31+ with open ('bcss_smokescreen_tests.properties' , 'rb' ) as read_prop :
32+ configs .load (read_prop )
2033 return configs .properties
2134
2235
2336@pytest .mark .smoke
2437@pytest .mark .compartment1
25- def test_create_invitations_plan (page : Page ) -> None :
38+ def test_create_invitations_plan (page : Page , smokescreen_properties : dict ) -> None :
2639 """
2740 This is used to create the invitations plan. As it is not always needed it is separate to the main Compartment 1 function
2841 """
@@ -44,6 +57,7 @@ def test_create_invitations_plan(page: Page) -> None:
4457 InvitationsPlans (page ).invitations_plans_title .wait_for ()
4558 logging .info ("Invitation plan created" )
4659
60+
4761@pytest .mark .smoke
4862@pytest .mark .smokescreen
4963@pytest .mark .compartment1
@@ -59,6 +73,7 @@ def test_compartment_1(page: Page) -> None:
5973 UserTools .user_login (page , "Hub Manager State Registered" )
6074
6175 # Generate Invitations
76+ NavigationBar (page ).click_main_menu_link ()
6277 MainMenu (page ).go_to_call_and_recall_page ()
6378 CallAndRecall (page ).go_to_generate_invitations_page ()
6479 logging .info ("Generating invitations based on the invitations plan" )
@@ -70,7 +85,8 @@ def test_compartment_1(page: Page) -> None:
7085 if self_referrals_available :
7186 batch_processing (page , "S1" , "Pre-invitation (FIT) (digital leaflet)" , "S9 - Pre-invitation Sent" )
7287 else :
73- logging .warning ("Skipping S1 Pre-invitation (FIT) (digital leaflet) as no self referral invitations were generated" )
88+ logging .warning (
89+ "Skipping S1 Pre-invitation (FIT) (digital leaflet) as no self referral invitations were generated" )
7490 batch_processing (page , "S1" , "Pre-invitation (FIT)" , "S9 - Pre-invitation Sent" , True )
7591
7692 # Print the batch of Invitation & Test Kit Letters - England
0 commit comments