def test_registered_user_view(self):
        """A registered admin user can view the member list."""

        LoginPage(self).login('admin_user', 'password')
        page = OrganizationMemberListPage(self)
        page.go_to()
        OrganizationPage(self).go_to_organization_page()

        title = page.go_to_member_list_page()
        assert title == "Members".upper()
예제 #2
0
    def test_registered_user_view(self):
        """A registered admin user can view the member list."""

        LoginPage(self).login('admin_user', 'password')
        page = OrganizationMemberListPage(self)
        page.go_to()
        OrganizationPage(self).go_to_organization_page()

        title = page.go_to_member_list_page()
        assert title == "Members".upper()
예제 #3
0
    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
예제 #4
0
    def test_adding_members_to_archived_organization(self):
        LoginPage(self).login('admin_user', 'password')
        page = OrganizationMemberListPage(self)
        page.go_to()
        OrganizationPage(self).go_to_organization_page()
        OrganizationPage(self).get_archive_button()
        OrganizationPage(self).click_on_archive_and_confirm()

        title = page.go_to_member_list_page()
        assert title == "Members".upper()
        page.click_on_add_button(success=False)
예제 #5
0
    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"
예제 #6
0
    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
예제 #7
0
    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_adding_members_to_archived_organization(self):
        LoginPage(self).login('admin_user', 'password')
        page = OrganizationMemberListPage(self)
        page.go_to()
        OrganizationPage(self).go_to_organization_page()
        OrganizationPage(self).get_archive_button()
        OrganizationPage(self).click_on_archive_and_confirm()

        title = page.go_to_member_list_page()
        assert title == "Members".upper()
        page.click_on_add_button(success=False)
예제 #9
0
    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
예제 #10
0
    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
예제 #11
0
    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
예제 #12
0
    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"
예제 #13
0
    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
예제 #14
0
    def test_adding_members(self):
        """A registered admin user can add members to an organization."""

        LoginPage(self).login('admin_user', 'password')
        page = OrganizationMemberListPage(self)
        page.go_to()
        OrganizationPage(self).go_to_organization_page()
        page.go_to_member_list_page()

        page.click_on_add_button()
        page.try_cancel_and_close()

        input_box = page.click_on_input()
        error_list = page.click_submit_button(success=False)
        assert error_list == 'This field is required.'

        input_box = page.click_on_input()
        input_box.send_keys("darthvader")
        error_list = page.click_submit_button(success=False)
        error_message = 'User with username or email darthvader does not exist'
        assert error_list == error_message

        input_box = page.click_on_input()
        input_box.clear()
        input_box.send_keys("admin_user")
        error_list = page.click_submit_button(success=False)
        error_message = 'User is already a member of the organization.'
        assert error_list == error_message

        input_box = page.click_on_input()
        input_box.clear()
        input_box.send_keys("hansolo")
        member = page.click_submit_button()
        assert member == "MEMBER: Han Solo"

        OrganizationMemberPage(self).click_remove_member_and_confirm_buttons()

        page.click_on_add_button()
        input_box = page.click_on_input()
        input_box.send_keys("*****@*****.**")
        member = page.click_submit_button()
        assert member == "MEMBER: Han Solo"
    def test_adding_members(self):
        """A registered admin user can add members to an organization."""

        LoginPage(self).login('admin_user', 'password')
        page = OrganizationMemberListPage(self)
        page.go_to()
        OrganizationPage(self).go_to_organization_page()
        page.go_to_member_list_page()

        page.click_on_add_button()
        page.try_cancel_and_close()

        fields = page.get_fields()
        page.try_submit(err=['member'])

        fields = page.get_fields()
        fields['member'].send_keys("darthvader")
        page.try_submit(
            err=['member'],
            message='User with username or email darthvader does not exist')

        fields = page.get_fields()
        fields['member'].clear()
        fields['member'].send_keys("admin_user")
        page.try_submit(
            err=['member'],
            message='User is already a member of the organization.')

        fields = page.get_fields()
        fields['member'].clear()
        fields['member'].send_keys("hansolo")
        page.try_submit()

        member = page.get_member_name()
        assert member == "MEMBER: Han Solo"

        OrganizationMemberPage(self).click_remove_member_and_confirm_buttons()

        page.click_on_add_button()

        fields = page.get_fields()
        fields['member'].clear()
        fields['member'].send_keys("*****@*****.**")
        page.try_submit()

        member = page.get_member_name()
        assert member == "MEMBER: Han Solo"
    def test_adding_members(self):
        """A registered admin user can add members to an organization."""

        LoginPage(self).login('admin_user', 'password')
        page = OrganizationMemberListPage(self)
        page.go_to()
        OrganizationPage(self).go_to_organization_page()
        page.go_to_member_list_page()

        page.click_on_add_button()
        page.try_cancel_and_close()

        fields = page.get_fields()
        page.try_submit(err=['member'])

        fields = page.get_fields()
        fields['member'].send_keys("darthvader")
        page.try_submit(
            err=['member'],
            message='User with username or email darthvader does not exist')

        fields = page.get_fields()
        fields['member'].clear()
        fields['member'].send_keys("admin_user")
        page.try_submit(
            err=['member'],
            message='User is already a member of the organization.')

        fields = page.get_fields()
        fields['member'].clear()
        fields['member'].send_keys("hansolo")
        page.try_submit()

        member = page.get_member_name()
        assert member == "MEMBER: Han Solo"

        OrganizationMemberPage(self).click_remove_member_and_confirm_buttons()

        page.click_on_add_button()

        fields = page.get_fields()
        fields['member'].clear()
        fields['member'].send_keys("*****@*****.**")
        page.try_submit()

        member = page.get_member_name()
        assert member == "MEMBER: Han Solo"