33
44
55class BasePage :
6+ """Base Page locators and methods for interacting with the page."""
7+
68 def __init__ (self , page : Page ):
79 self .page = page
810 # Homepage/Navigation Bar links
@@ -51,42 +53,54 @@ def __init__(self, page: Page):
5153 self .main_menu__header = self .page .locator ("#ntshPageTitle" )
5254
5355 def click_main_menu_link (self ) -> None :
56+ """Click the Base Page 'Main Menu' link if it is visible."""
5457 if self .main_menu_link .is_visible ():
5558 self .click (self .main_menu_link )
5659
5760 def click_log_out_link (self ) -> None :
61+ """Click the Base Page 'Log-out' link."""
5862 self .click (self .log_out_link )
5963
6064 def click_sub_menu_link (self ) -> None :
65+ """Click the Base Page 'Show Sub-menu' link."""
6166 self .click (self .sub_menu_link )
6267
6368 def click_hide_sub_menu_link (self ) -> None :
69+ """Click the Base Page 'Hide Sub-menu' link."""
6470 self .click (self .hide_sub_menu_link )
6571
6672 def click_select_org_link (self ) -> None :
73+ """Click the Base Page 'Select Org' link."""
6774 self .click (self .select_org_link )
6875
6976 def click_back_button (self ) -> None :
77+ """Click the Base Page 'Back' button."""
7078 self .click (self .back_button )
7179
7280 def click_release_notes_link (self ) -> None :
81+ """Click the Base Page 'Release Notes' link."""
7382 self .click (self .release_notes_link )
7483
7584 def click_refresh_alerts_link (self ) -> None :
85+ """Click the Base Page 'Refresh alerts' link."""
7686 self .click (self .refresh_alerts_link )
7787
7888 def click_user_guide_link (self ) -> None :
89+ """Click the Base Page 'User guide' link."""
7990 self .click (self .user_guide_link )
8091
8192 def click_help_link (self ) -> None :
93+ """Click the Base Page 'Help' link."""
8294 self .click (self .help_link )
8395
8496 def bowel_cancer_screening_system_header_is_displayed (self ) -> None :
97+ """Asserts that the Bowel Cancer Screening System header is displayed."""
8598 expect (self .bowel_cancer_screening_system_header ).to_contain_text (
8699 "Bowel Cancer Screening System"
87100 )
88101
89102 def main_menu_header_is_displayed (self ) -> None :
103+ """Asserts that the Main Menu header is displayed."""
90104 expect (self .main_menu__header ).to_contain_text ("Main Menu" )
91105
92106 def bowel_cancer_screening_page_title_contains_text (self , text : str ) -> None :
@@ -106,39 +120,51 @@ def bowel_cancer_screening_page_title_contains_text(self, text: str) -> None:
106120 expect (self .bowel_cancer_screening_ntsh_page_title ).to_contain_text (text )
107121
108122 def go_to_contacts_list_page (self ) -> None :
123+ """Click the Base Page 'Contacts List' link."""
109124 self .click (self .contacts_list_page )
110125
111126 def go_to_bowel_scope_page (self ) -> None :
127+ """Click the Base Page 'Bowel Scope' link."""
112128 self .click (self .bowel_scope_page )
113129
114130 def go_to_call_and_recall_page (self ) -> None :
131+ """Click the Base Page 'Call and Recall' link."""
115132 self .click (self .call_and_recall_page )
116133
117134 def go_to_communications_production_page (self ) -> None :
135+ """Click the Base Page 'Communications Production' link."""
118136 self .click (self .communications_production_page )
119137
120138 def go_to_download_page (self ) -> None :
139+ """Click the Base Page 'Download' link."""
121140 self .click (self .download_page )
122141
123142 def go_to_fit_test_kits_page (self ) -> None :
143+ """Click the Base Page 'FIT Test Kits' link."""
124144 self .click (self .fit_test_kits_page )
125145
126146 def go_to_gfobt_test_kits_page (self ) -> None :
147+ """Click the Base Page 'gFOBT Test Kits' link."""
127148 self .click (self .gfobt_test_kits_page )
128149
129150 def go_to_lynch_surveillance_page (self ) -> None :
151+ """Click the Base Page 'Lynch Surveillance' link."""
130152 self .click (self .lynch_surveillance_page )
131153
132154 def go_to_organisations_page (self ) -> None :
155+ """Click the Base Page 'Organisations' link."""
133156 self .click (self .organisations_page )
134157
135158 def go_to_reports_page (self ) -> None :
159+ """Click the Base Page 'Reports' link."""
136160 self .click (self .reports_page )
137161
138162 def go_to_screening_practitioner_appointments_page (self ) -> None :
163+ """Click the Base Page 'Screening Practitioner Appointments' link."""
139164 self .click (self .screening_practitioner_appointments_page )
140165
141166 def go_to_screening_subject_search_page (self ) -> None :
167+ """Click the Base Page 'Screening Subject Search' link."""
142168 self .click (self .screening_subject_search_page )
143169
144170 def click (self , locator : Locator ) -> None :
0 commit comments