organisations.tests.integration package#
Submodules#
organisations.tests.integration.01_high_level_admin module#
- class organisations.tests.integration.01_high_level_admin.OrgHighLevelAdmin(manager: CobaltTestManagerIntegration)[source]#
Bases:
object
Tests for higher level admin functions such as creating clubs and setting up RBAC.
These actions generally require state or national body level admin rights.
Club admins can also change the RBAC settings for their club which is also tested here.
Alan Admin has the role “orgs.admin.edit” and can add clubs for any state. Betty Bunting has “orgs.state.3” - NSW. Colin Corgy has “orgs.state.5” - QLD.
organisations.tests.integration.02_club_level_admin module#
- class organisations.tests.integration.02_club_level_admin.ClubLevelAdmin(manager: CobaltTestManagerIntegration)[source]#
Bases:
object
Tests for club level admin. These are the changes that club admins will do regularly. State and system admins should also be able to do this.
- NSW = 3#
- QLD = 5#
Check who can access the club menu
organisations.tests.integration.03_club_settings module#
organisations.tests.integration.04_club_members module#
- class organisations.tests.integration.04_club_members.ClubMembers(manager: CobaltTestManagerIntegration)[source]#
Bases:
object
Tests for club menu members. Some of these tests connect to the MPC so data may change over time.
organisations.tests.integration.05_club_comms module#
- class organisations.tests.integration.05_club_comms.ClubComms(manager: CobaltTestManagerIntegration)[source]#
Bases:
object
Tests for club communications
organisations.tests.integration.06_congress_setup module#
- class organisations.tests.integration.06_congress_setup.ClubCongress(manager: CobaltTestManagerIntegration)[source]#
Bases:
object
Tests for club congresses
organisations.tests.integration.common_functions module#
Common functions for organisations.
Common function to check access to the club menu for different users
The club menu uses a lot of HTMX so we access this through Selenium.
Initial Selenium State: Any Final Selenium State: On front page of Club Menu for provided club name as provided user
- Parameters:
manager – test_manager.Manager object for interacting with system
user – User object
club_id – Django id of club, not org_id
expected_club_name – name we expect to find in the H1
test_description – long description of test
test_name – name of test
reverse_result – for tests that should fail
- organisations.tests.integration.common_functions.access_finance_for_club(manager: CobaltTestManagerIntegration, club: Organisation, user: User, test_name: str, test_description: str, reverse_result=False)[source]#
Common function to move to the Access tab
Initial Selenium State: Doesn’t matter Final Selenium State: On Organisation Statement logged in as User
- Parameters:
manager – test_manager.Manager object for interacting with system
club – club to check for
user – User to use for test
test_description – long description of test
test_name – name of test
reverse_result – for tests that should fail
- organisations.tests.integration.common_functions.add_club(manager: CobaltTestManagerIntegration, user: User = None, view_data=None, reverse_result=False)[source]#
Common function to try to add a club
- Parameters:
manager – test_manager.Manager object for interacting with system
user – User object
view_data – dic thing for the view
reverse_result – swap True for False - we want this to fail
- organisations.tests.integration.common_functions.change_rbac_status_as_user(manager: CobaltTestManagerIntegration, user: User, club_org_id: int, new_status: str, test_name: str, test_description: str, reverse_result: bool)[source]#
Common function to change the rbac state of a club and check the outcome. Sometimes we expect this to fail.
- Parameters:
manager – test_manager.Manager object for interacting with system
user – User object
club_org_id – org id of club
new_status – status to change to
test_description – long description of test
test_name – name of test
reverse_result – for tests that should fail
Common function to move to the Access tab
Initial Selenium State: On any tab of Club Menu Final Selenium State: On specified tab of Club Menu
- Parameters:
manager – test_manager.Manager object for interacting with system
tab – the tab we want to go to
title_id – id of the title, should appear if we successfully click on tab
test_description – long description of test
test_name – name of test
Common function to check which tabs a user has access to
Initial Selenium State: On front page of Club Menu Final Selenium State: On front page of Club Menu
- Parameters:
manager – test_manager.Manager object for interacting with system
expected_tabs – the tabs we expect to find
test_description – long description of test
test_name – name of test
- organisations.tests.integration.common_functions.confirm_club_rbac_status(manager: CobaltTestManagerIntegration, club_org_id: int, expected_status: str, test_name: str, test_description: str, reverse_result=False)[source]#
Common function to test the rbac status of a club
- Parameters:
manager – test_manager.Manager object for interacting with system
club_org_id – org id of club
expected_status – what the status should be
test_description – long description of test
test_name – name of test
reverse_result – if failure is a good outcome
Login and got to the club menu
Initial Selenium State: Doesn’t matter Final Selenium State: On Club Menu logged in as User (if allowed)
- Parameters:
manager – test_manager.Manager object for interacting with system
org_id – club to check for
user – User to use for test
test_description – long description of test
test_name – name of test
reverse_result – for tests that should fail
- organisations.tests.integration.common_functions.set_rbac_status_as_user(manager: CobaltTestManagerIntegration, user: User, club_org_id: int, new_status: str, test_name: str, test_description: str, reverse_result: bool)[source]#
Common function to change the rbac state of a club and check the outcome. Sometimes we expect this to fail.
- Parameters:
manager – test_manager.Manager object for interacting with system
user – User object
club_org_id – org id of club
new_status – status to change to
test_description – long description of test
test_name – name of test
reverse_result – for tests that should fail