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_removing_an_admin_member_from_an_organization(self): """An admin member can remove a member from an 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() assert page.get_member_title() == "MEMBER: Admin User" page.click_disabled_remove_button() assert page.get_member_title() == "MEMBER: Admin User"
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_editing_member_in_archived_organization(self): """A user that can create a new organization and is automatically made an admin.""" LoginPage(self).login('admin_user', 'password') page = OrganizationMemberPage(self) page.go_to() OrganizationPage(self).go_to_organization_page() OrganizationPage(self).get_archive_button() OrganizationPage(self).click_on_archive_and_confirm() OrganizationMemberListPage(self).go_to_member_list_page() testuser_title = page.go_to_testuser_member_page(success=False) assert "MEMBER: Test User" != testuser_title
def test_removing_a_member_from_an_organization(self): """An admin member can remove a member from an 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() page.try_cancel_and_close() assert page.get_member_title() == "MEMBER: Test User" page.click_remove_member_and_confirm_buttons() members = page.get_table_row().text assert "Test User" not in members
def test_removing_a_member_from_an_organization(self): """An admin member can remove a member from an 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() page.try_cancel_and_close_remove() assert page.get_member_title() == "MEMBER: Test User" page.click_remove_member_and_confirm_buttons() members = page.get_table_row().text assert "Test User" not in members
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_that_an_individual_members_information_displays(self): """The organization's individual member page displays with the correct user information.""" 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() testuser_title = page.go_to_testuser_member_page() assert "MEMBER: Test User" == testuser_title member_form = page.get_displayed_member_info() assert "Test User" in member_form.text assert "testuser" in member_form.text assert "*****@*****.**" in member_form.text assert "Last login:" in member_form.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"
def test_changing_member_project_permissions(self): """An admin user can change a member's permissions on individual projects.""" 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() first_project = page.get_project_title_in_table() assert first_project == 'Test Project' options = page.get_permission_options() assert options['selected'].text == options['pb'].text options['pm'].click() page.click_submit_button() page.go_to_testuser_member_page() options = page.get_permission_options() assert options['selected'].text == options['pm'].text