@@ -64,31 +64,41 @@ class OrganisationSwitchPage(BasePage):
6464 def __init__ (self , page : Page ):
6565 self .page = page
6666
67- def get_available_organisation_ids (self ):
67+ def get_available_organisation_ids (self )-> list [ str ] :
6868 """
6969 Returns a list of all available organisation radio button IDs.
7070 """
7171 radios = self .page .locator (self .RADIO_SELECTOR )
7272 org_ids = []
73- for i in range (radios .count ()):
74- org_id = radios .nth (i ).get_attribute ("id" )
73+ for int in range (radios .count ()):
74+ org_id = radios .nth (int ).get_attribute ("id" )
7575 if org_id :
7676 org_ids .append (org_id )
7777 return org_ids
7878
79- def select_organisation_by_id_and_navigate_home (self , org_id ):
79+ def select_organisation_by_id_and_navigate_home (self , org_id )-> None :
8080 """
81- Selects the organisation radio button by its id, clicks Continue,
82- and it navigates to the BCSS Home page after which then clicks the 'Select Org' link & it returns back to the change of organisation ids page.
81+ Selects the organisation radio button by its ID, clicks Continue,
82+ navigates to the BCSS Home page, then clicks the 'Select Org' link to return to the organisation selection page.
83+ Args:
84+ organisation_id (str): The id of the organisation to be selected.
8385 """
8486 self .page .locator (f'#{ org_id } ' ).check ()
8587 self .page .get_by_role ('button' , name = 'Continue' ).click ()
8688 self .page .get_by_role ('link' , name = self .SELECT_ORG_LINK_TEXT ).click ()
8789
88- def switch_between_organisations (self ):
90+ def switch_between_organisations (self )-> None :
8991 """
9092 Switches between all available organisations by their ids.
9193 """
9294 org_ids = self .get_available_organisation_ids ()
9395 for org_id in org_ids :
9496 self .select_organisation_by_id_and_navigate_home (org_id )
97+
98+
99+
100+
101+
102+
103+
104+
0 commit comments