def test_changing_a_members_organizational_role(self): """An admin member can change a member's role in the organization.""" LoginPage(self).login('admin_user', 'password') page = OrganizationMemberPage(self) page.go_to() OrganizationPage(self).go_to_organization_page() OrganizationMemberListPage(self).go_to_member_list_page() page.go_to_testuser_member_page() roles = page.get_role_options() assert roles["member"].text == roles["selected"].text page.try_cancel_and_close(page.click_admin_role_option, "role_admin") page.click_admin_role_option() roles['confirm_admin'].click() page.go_to_testuser_member_page() roles = page.get_role_options() assert roles["admin"].text == roles["selected"].text page.try_cancel_and_close(page.click_member_role_option, "role_member") page.click_member_role_option() roles['confirm_member'].click() page.go_to_testuser_member_page() roles = page.get_role_options() assert roles["member"].text == roles["selected"].text
def test_changing_a_members_organizational_role(self): """An admin member can change a member's role in the organization.""" LoginPage(self).login('admin_user', 'password') page = OrganizationMemberPage(self) page.go_to() OrganizationPage(self).go_to_organization_page() OrganizationMemberListPage(self).go_to_member_list_page() page.go_to_testuser_member_page() roles = page.get_role_options() assert roles["member"].text == roles["selected"].text roles["admin"].click() page.click_submit_button() page.go_to_testuser_member_page() roles = page.get_role_options() assert roles["admin"].text == roles["selected"].text
def test_changing_an_admins_organizational_role(self): """An admin member can change a member's role in the organization.""" LoginPage(self).login('admin_user', 'password') page = OrganizationMemberPage(self) page.go_to() OrganizationPage(self).go_to_organization_page() OrganizationMemberListPage(self).go_to_member_list_page() page.go_to_admin_member_page() role_select = page.get_member_role_select('') assert role_select.get_attribute('disabled') roles = page.get_role_options() assert roles["admin"].text == roles["selected"].text
def test_admin_creation_when_adding_organization(self): """A user that can create a new organization and is automatically made an admin.""" LoginPage(self).login('testuser', 'password') page = OrganizationMemberPage(self) page.go_to() OrganizationListPage(self).click_add_button() fields = OrganizationListPage(self).get_fields() fields['name'].send_keys('Organization #2') fields['description'].send_keys('This is a test organization') OrganizationListPage(self).click_submit_button() OrganizationMemberListPage(self).go_to_member_list_page() page.go_to_testuser_member_page() roles = page.get_role_options() assert roles['selected'].text == "Administrator"