def setUpClass(cls): super(TestCaseInvitationTeamPage, cls).setUpClass() cls.team_dir_pg = TeamsDirPage(cls) cls.a_team_pg = ATeamPage(cls) cls.members_tab = members_tab.MembersTab(cls) cls.team_owner = UserFactory.create() cls.team = TeamMemberFactory.create(team__membership_policy=2, user = cls.team_owner).team cls.a_team_pg.open_team_page(cls.team.slug)
def setUpClass(cls): super(TestCaseManageMembers, cls).setUpClass() cls.members_tab = members_tab.MembersTab(cls) cls.team_owner = UserFactory.create() cls.team = TeamMemberFactory.create(team__membership_policy=1, user=cls.team_owner).team cls.manager = TeamManagerMemberFactory.create(team=cls.team).user cls.admin = TeamAdminMemberFactory.create(team=cls.team).user cls.member = TeamContributorMemberFactory.create(team=cls.team).user cls.members_tab.open_members_page(cls.team.slug)
def setUpClass(cls): super(TestCaseManageMembers, cls).setUpClass() cls.members_tab = members_tab.MembersTab(cls) cls.team_owner = UserFactory.create() cls.team = TeamMemberFactory.create(team__membership_policy=1, user=cls.team_owner).team cls.manager = TeamMemberFactory(role="ROLE_MANAGER", team=cls.team).user cls.admin = TeamMemberFactory(role="ROLE_ADMIN", team=cls.team).user cls.member = TeamMemberFactory.create(role="ROLE_CONTRIBUTOR", team=cls.team).user cls.members_tab.open_members_page(cls.team.slug)
def test_members__update(self): """Update a team members role. PUT /api2/partners/teams/[team-slug]/members/[username]/ """ updated_info = {'role': 'admin'} url_part = 'teams/%s/members/member/' % self.open_team.slug status, response = self.data_utils.put_api_request( self.user, url_part, updated_info) self.teams_dir_pg.open_page('teams/%s/members/' % self.open_team.slug) self.teams_dir_pg.log_in(self.user.username, 'password') members_tb = members_tab.MembersTab(self) members_tb.member_search(self.open_team.slug, 'member') self.assertEqual(members_tb.user_role(), 'Admin')
def setUpClass(cls): super(TestCaseMembersTab, cls).setUpClass() cls.team_dir_pg = TeamsDirPage(cls) cls.user_message_pg = user_messages_page.UserMessagesPage(cls) cls.members_tab = members_tab.MembersTab(cls) cls.team_owner = UserFactory.create() cls.team = TeamMemberFactory.create( team__name='Members tab roles Test', user=cls.team_owner).team cls.promoted_manager = TeamContributorMemberFactory.create( team=cls.team, user=UserFactory()).user cls.promoted_admin = TeamContributorMemberFactory.create( team=cls.team, user=UserFactory()).user cls.project = TeamProjectFactory.create( team=cls.team, workflow_enabled=True, ) cls.members_tab.open_members_page(cls.team.slug)
def setUpClass(cls): super(TestCaseTeamMessages, cls).setUpClass() cls.a_team_pg = ATeamPage(cls) cls.members_tab = members_tab.MembersTab(cls) cls.messages_tab = messages_tab.MessagesTab(cls) cls.user_message_pg = user_messages_page.UserMessagesPage(cls) cls.non_member = UserFactory.create(username='******') cls.team_owner = UserFactory.create(is_partner=True) #CREATE AN APPLICATION-ONLY TEAM cls.team = TeamMemberFactory.create( team__membership_policy=1, user=cls.team_owner, ).team cls.team_member = TeamContributorMemberFactory.create( user=UserFactory(), team=cls.team).user #ADD THE TEST MESSAGES TO THE TEST TEAM cls.members_tab.open_members_page(cls.team.slug) cls.members_tab.log_in(cls.team_owner.username, 'password') cls.messages_tab.open_messages_tab(cls.team.slug) cls.messages_tab.edit_messages(cls._TEST_MESSAGES)