def runTest(self): """Regression test for non-UTF-8 PATH_INFO (#3663) Verify that URLs not encoded with UTF-8 are reported as invalid. """ import httplib # Work around for InvalidURL since Python 2.7.17 (#13233) saved_re = httplib._contains_disallowed_url_pchar_re \ if hasattr(httplib, '_contains_disallowed_url_pchar_re') \ else None try: if saved_re: httplib._contains_disallowed_url_pchar_re = \ re.compile(r'[\x00-\x20]') # invalid PATH_INFO self._tester.go_to_wiki(u'été'.encode('latin1')) tc.code(404) tc.find('Invalid URL encoding') # invalid SCRIPT_NAME tc.go(u'été'.encode('latin1')) tc.code(404) tc.find('Invalid URL encoding') finally: if saved_re: httplib._contains_disallowed_url_pchar_re = saved_re
def runTest(self): team_name = 'team_for_capacity_saving' member_name = 'Team member_name' sprint_name = 'capacity_saving_sprint' self._tester.login_as(Usernames.admin) self._tester.create_new_team(team_name) self._tester.add_member_to_team(team_name, member_name) sprint_start = now() self._tester.create_sprint_via_admin(sprint_name, start=sprint_start, team=team_name) # having tasks with remaining time which were not assigned to a specific # user triggered another bug on the team page. attributes = dict(sprint=sprint_name, remaining_time='12') self._tester.create_new_agilo_task('Not assigned Task', **attributes) self._tester.login_as(Usernames.scrum_master) self._tester.go_to_team_page(team_name, sprint_name) team_page_url = tc.get_browser().get_url() day_ordinal = (sprint_start + timedelta(days=3)).toordinal() input_name = 'ts_%s_%d' % (member_name, day_ordinal) tc.formvalue('team_capacity_form', input_name, '2') tc.submit('save') tc.code(200) tc.url(team_page_url)
def runTest(self): self._tester.login_as(Usernames.admin) # get page for editing requirement ticket type page_url = self._tester.url + '/admin/agilo/types/requirement' tc.go(page_url) tc.url(page_url) tc.code(200) tc.find('requirement') tc.find('Alias:') # test default field tc.find('name="fields" value="businessvalue" checked="checked"') # change alias and fields and save tc.formvalue('modcomp', 'fields', '+priority') tc.formvalue('modcomp', 'fields', '-businessvalue') tc.formvalue('modcomp', 'fields', '-milestone') tc.formvalue('modcomp', 'fields', '-keywords') tc.submit('save') # redirects to list page, now only the priority should be selected tc.find('<td class="fields">[\n ]*Priority<br />[\n ]*</td>') tc.go(page_url) # We must ensure that these fields are available for later tests. tc.formvalue('modcomp', 'fields', '+businessvalue') tc.formvalue('modcomp', 'fields', '+milestone') tc.submit('save')
def runTest(self): self._tester.login_as(Usernames.admin) # Create the milestone first self._tester.create_milestone('milestone2') # get sprint listing, should be empty page_url = self._tester.url + '/admin/agilo/sprints' tc.go(page_url) tc.url(page_url) tc.code(200) # add new sprint sprint_start = normalize_date(now()) sprint_name = 'Test sprint' tc.formvalue('addsprint', 'name', sprint_name) tc.formvalue('addsprint', 'start', format_datetime(sprint_start, format='iso8601')) tc.formvalue('addsprint', 'duration', '1') tc.formvalue('addsprint', 'milestone', 'milestone2') tc.submit('add') # add redirects to list view, new sprint should be in there tc.find(sprint_name) # go to detail page tc.go("%s/%s" % (page_url, quote(sprint_name))) # see if milestone is set correctly tc.find('<option selected="selected">\s*milestone2') # test setting end date, not duration tc.formvalue('modcomp', 'description', '[http://www.example.com]') tomorrow = sprint_start + timedelta(days=1) tc.formvalue('modcomp', 'end', format_datetime(tomorrow, format='iso8601')) tc.formvalue('modcomp', 'duration', '') tc.submit('save') tc.url(page_url) # duration of the new sprint should be 2 tc.find('"duration">2</td>') # --- test invalid values when adding sprint --- # no values, should redirect to list view tc.formvalue('addsprint', 'name', '') tc.submit('add') tc.url(page_url) # invalid date, should throw an error tc.formvalue('addsprint', 'name', 'Testsprint 2') tc.formvalue('addsprint', 'start', '2008 May 13') tc.formvalue('addsprint', 'duration', '1') tc.submit('add') tc.find('Error: Invalid Date') # no end date or duration tc.go(page_url) tc.formvalue('addsprint', 'name', 'Testsprint 2') yesterday = now() - timedelta(days=3) tc.formvalue('addsprint', 'start', format_datetime(yesterday, format='iso8601')) tc.submit('add') tc.url(page_url)
def runTest(self): self.tester.login_as(Usernames.product_owner) self.tester.create_new_agilo_requirement('New Task') trac_tester = self.testenv._trac_functional_test_environment.tester login_as(trac_tester, Usernames.team_member) ticket_id = trac_tester.create_ticket() trac_tester.go_to_ticket(ticket_id) tc.code(200)
def download_as_csv(self): url_template = '%(prefix)s/%(backlog)s' backlog_path = url_template % dict(prefix=BACKLOG_URL, backlog='Product Backlog') url = self.tester.url + unicode_quote(backlog_path) + '?format=csv' tc.go(url) tc.code(200) csv_export = tc.show() csvfile = CSVFile(StringIO(csv_export), None, 'UTF-8') return csvfile
def runTest(self): self._tester.login_as(Usernames.team_member) page_url = self._tester.url + TEAM_URL tc.go(page_url) tc.url(page_url) tc.code(200) tc.follow('Team#1') tc.code(200) tc.find('Member#1')
def runTest(self): self._tester.login_as(Usernames.product_owner) ticket_info = self._tester.perform_import(GOOD_CSV_DATA) changed_tickets = self._tester.perform_ticket_deletion_through_csv_upload(ticket_info) self.assertEqual(2, len(changed_tickets)) for hit in changed_tickets: ticket_id = hit[0] self._tester.go_to_view_ticket_page(ticket_id, should_fail=True) tc.code(404)
def runTest(self): self._tester.login_as(Usernames.product_owner) ticket_info = self._tester.perform_import(GOOD_CSV_DATA) changed_tickets = self._tester.perform_ticket_deletion_through_csv_upload( ticket_info) self.assertEqual(2, len(changed_tickets)) for hit in changed_tickets: ticket_id = hit[0] self._tester.go_to_view_ticket_page(ticket_id, should_fail=True) tc.code(404)
def runTest(self): tc.go(self.tester.url + '/admin/ticket/milestones/' + unicode_quote(self.milestone_name())) new_name = self.milestone_name() + 'Renamed' tc.formvalue('modifymilestone', 'name', new_name) tc.submit('save') tc.code(200) # Now we expect that the ticket and the sprint have updated milestone ticket_page = self.tester.navigate_to_ticket_page(self.tkt_id) self.assert_equals(new_name, ticket_page.milestone()) self.tester.go_to_sprint_edit_page("SprintFor" + self.milestone_name()) tc.find('for milestone %s</h1>' % new_name)
def runTest(self): self.tester.login_as(Usernames.admin) tc.go("backlog/Sprint%20Backlog?bscope=non-existing-sprint") tc.code(500) tc.find("Invalid Sprint name") try: tc.notfind("trac.edgewall.org/newticket") except TwillAssertionError: raise Exception("Found a link to the official trac bug tracking platform") tc.find("trac-hacks.org/newticket")
def runTest(self): self.tester.login_as(Usernames.admin) tc.go("backlog/Sprint%20Backlog?bscope=non-existing-sprint") tc.code(500) tc.find("Invalid Sprint name") try: tc.notfind("trac.edgewall.org/newticket") except TwillAssertionError: raise Exception( "Found a link to the official trac bug tracking platform") tc.find("trac-hacks.org/newticket")
def runTest(self): self._tester.login_as(Usernames.product_owner) ticket_info = self._tester.perform_import(GOOD_CSV_DATA) first_ticket_id, second_ticket_id = \ _change_first_hit_and_get_ticket_ids(ticket_info, new_first_summary=u"Invalid Summary that does not exist") changed_tickets = self._tester.perform_ticket_deletion_through_csv_upload(ticket_info, force=True) self.assertEqual(2, len(changed_tickets)) self._tester.go_to_view_ticket_page(first_ticket_id, should_fail=True) tc.code(404) self._tester.go_to_view_ticket_page(second_ticket_id, should_fail=True) tc.code(404)
def runTest(self): self._tester.login_as(Usernames.product_owner) dashboard_url = self._tester.url + DASHBOARD_URL tc.go(dashboard_url) tc.code(200) self._tester.logout() tc.go(dashboard_url) tc.code(403) self._tester.go_to_front() tc.notfind('href="%s"' % DASHBOARD_URL)
def runTest(self): # First login, anonymous may not be allowed to do anything self._tester.login_as(Usernames.admin) bug_id = self._tester.create_new_agilo_ticket('bug', 'Nothing happens') task_id = self._tester.create_referenced_ticket(bug_id, Type.TASK, 'Think about fixing it') self._tester.go_to_view_ticket_page(bug_id) tc.find('value="delete link"') tc.formvalue('delete_link', 'cmd', 'delete') # select the correct form tc.submit('cmd') tc.code(200) self.assertTrue(self._tester.browser_shows_ticket_edit_page(bug_id)) self._assert_task_is_not_linked_to_bug(task_id, bug_id)
def runTest(self): self._tester.login_as(Usernames.product_owner) ticket_info = self._tester.perform_import(GOOD_CSV_DATA) first_ticket_id, second_ticket_id = \ _change_first_hit_and_get_ticket_ids(ticket_info, new_first_summary=u"Invalid Summary that does not exist") changed_tickets = self._tester.perform_ticket_deletion_through_csv_upload(ticket_info) tc.find('File contents read with encoding <b>UTF-8</b>') self.assertEqual(1, len(changed_tickets)) tc.find("Ticket %s has a different summary" % first_ticket_id) self._tester.go_to_view_ticket_page(first_ticket_id, should_fail=False) self._tester.go_to_view_ticket_page(second_ticket_id, should_fail=True) tc.code(404)
def runTest(self): """Regression test for non-UTF-8 PATH_INFO (#3663) Verify that URLs not encoded with UTF-8 are reported as invalid. """ # invalid PATH_INFO self._tester.go_to_wiki(u'été'.encode('latin1')) tc.code(404) tc.find('Invalid URL encoding') # invalid SCRIPT_NAME tc.go(u'été'.encode('latin1')) tc.code(404) tc.find('Invalid URL encoding')
def runTest(self): self._tester.login_as(Usernames.product_owner) ticket_info = self._tester.perform_import(GOOD_CSV_DATA) first_ticket_id, second_ticket_id = \ _change_first_hit_and_get_ticket_ids(ticket_info, new_first_summary=u"Invalid Summary that does not exist") changed_tickets = self._tester.perform_ticket_deletion_through_csv_upload( ticket_info, force=True) self.assertEqual(2, len(changed_tickets)) self._tester.go_to_view_ticket_page(first_ticket_id, should_fail=True) tc.code(404) self._tester.go_to_view_ticket_page(second_ticket_id, should_fail=True) tc.code(404)
def runTest(self): self._tester.login_as(Usernames.admin) self._tester.delete_custom_field('remaining_time', 'Remaining Time') # add the field again tc.formvalue('addcf', 'name', 'remaining_time') # don't put a value in label field, test empty value tc.submit('add') tc.code(200) tc.url(self._tester.url + '/admin/agilo/fields') # redirects to list page, now link with default label # should be found again tc.find('<td><a href="/admin/agilo/fields/remaining_time">remaining_time') tc.find('<td>Remaining_time</td>', 'm') last = self._get_number_of_custom_fields() self._assert_field_has_number('remaining_time', last) self._tester.modify_custom_field('remaining_time', label='Linking Source') # see if the new label is found tc.find('<td>Linking Source</td>') # add another field tc.formvalue('addcf', 'name', 'testfield') tc.formvalue('addcf', 'label', 'Test Field') tc.submit('add') # see if the new label is found tc.find('<td><a href="/admin/agilo/fields/testfield">testfield') tc.find('<td>Test Field</td>') tc.code(200) # set order of fields last = self._get_number_of_custom_fields() # There are 7 standard fields, so these new ones should be 7 and 8. ord1 = str(last - 1) ord2 = str(last) # check the actual position of the two custom fields self._assert_field_has_number('remaining_time', ord1) self._assert_field_has_number('testfield', ord2) # Change the order tc.formvalue('customfields', 'order_testfield', ord1) tc.formvalue('customfields', 'order_remaining_time', ord2) tc.submit('apply') # has the order been changed? This regex finds the order select field # for testfield and the selected option -> should be 8 tc.find('<select name="order_remaining_time">(</*option>|\s|\d)*' \ '<option selected="selected">\s*' + ord2, 'm') tc.find('<select name="order_testfield">(</*option>|\s|\d)*' \ '<option selected="selected">\s*' + ord1, 'm')
def runTest(self): self._tester.login_as(Usernames.product_owner) ticket_info = self._tester.perform_import(GOOD_CSV_DATA) first_ticket_id, second_ticket_id = \ _change_first_hit_and_get_ticket_ids(ticket_info, new_first_summary=u"Invalid Summary that does not exist") changed_tickets = self._tester.perform_ticket_deletion_through_csv_upload( ticket_info) tc.find('File contents read with encoding <b>UTF-8</b>') self.assertEqual(1, len(changed_tickets)) tc.find("Ticket %s has a different summary" % first_ticket_id) self._tester.go_to_view_ticket_page(first_ticket_id, should_fail=False) self._tester.go_to_view_ticket_page(second_ticket_id, should_fail=True) tc.code(404)
def runTest(self): """Tests the ticket delete method""" self._tester.login_as(Usernames.admin) ticket_id = self._tester.create_new_agilo_userstory('Delete Me') self._tester.go_to_view_ticket_page(ticket_id) tc.formvalue('propertyform', 'delete', 'click') tc.submit('delete') self._tester.go_to_view_ticket_page(ticket_id, should_fail=True) tc.code(404) from agilo.ticket import AgiloTicketSystem if AgiloTicketSystem.is_trac_1_0(): return else: self._tester._set_ticket_id_sequence(new_value=self._tester.ticketcount)
def runTest(self): self._tester.login_as(Usernames.product_owner) ticket_info = self._tester.perform_import(GOOD_CSV_DATA) first_ticket_id, second_ticket_id = \ _change_first_hit_and_get_ticket_ids(ticket_info, new_first_ticket_id="foo") changed_tickets = self._tester.perform_ticket_deletion_through_csv_upload(ticket_info) self.assertEqual(1, len(changed_tickets)) tc.find("Non-numeric ticket ID") self._tester.go_to_view_ticket_page(first_ticket_id, should_fail=False) self._tester.go_to_view_ticket_page(second_ticket_id, should_fail=True) tc.code(404)
def create_link(self, source_type_alias, target_type_alias, source_type, target_type): # add new link # this form uses the aliased values tc.formvalue('addlink', 'source', source_type_alias) tc.formvalue('addlink', 'target', target_type_alias) tc.submit('add') tc.code(200) # save should redirect to edit page, see if it does tc.find('Modify %s-%s Link' % (source_type_alias, target_type_alias)) # add new link tc.formvalue('modcomp', 'copy_fields', '+resolution') tc.submit('save') # redirects to list page, now new link should be found tc.find('%s-%s' % (source_type, target_type))
def runTest(self): self._tester.login_as(Usernames.product_owner) ticket_info = self._tester.perform_import(GOOD_CSV_DATA) first_ticket_id, second_ticket_id = \ _change_first_hit_and_get_ticket_ids(ticket_info, new_first_ticket_id="foo") changed_tickets = self._tester.perform_ticket_deletion_through_csv_upload( ticket_info) self.assertEqual(1, len(changed_tickets)) tc.find("Non-numeric ticket ID") self._tester.go_to_view_ticket_page(first_ticket_id, should_fail=False) self._tester.go_to_view_ticket_page(second_ticket_id, should_fail=True) tc.code(404)
def runTest(self): """Tests the ticket delete method""" self._tester.login_as(Usernames.admin) ticket_id = self._tester.create_new_agilo_userstory('Delete Me') self._tester.go_to_view_ticket_page(ticket_id) tc.formvalue('propertyform', 'delete', 'click') tc.submit('delete') self._tester.go_to_view_ticket_page(ticket_id, should_fail=True) tc.code(404) from agilo.ticket import AgiloTicketSystem if AgiloTicketSystem.is_trac_1_0(): return else: self._tester._set_ticket_id_sequence( new_value=self._tester.ticketcount)
def runTest(self): self._tester.login_as(Usernames.admin) self._tester.create_new_team('privilege_team') self._tester.login_as(Usernames.product_owner) teampage_url = self._tester.url + TEAM_URL tc.go(teampage_url) tc.code(200) self._tester.logout() tc.go(teampage_url) tc.code(403) self._tester.go_to_front() tc.notfind('href="%s"' % TEAM_URL)
def _delete_sprint(name, retarget=None, tickets=0): page_url = '%s/%s' % (SPRINT_URL, name) confirm_url = '%s/%s/confirm' % (SPRINT_URL, name) tc.go(page_url) tc.fv('confirmform', 'delete', 'click') tc.submit() # show confirmation form tc.url(confirm_url) if retarget is not None: # should show that some tickets can be re-targeted tc.find('Retarget the %s remaining tickets to sprint' % tickets) tc.fv('confirmform', 'retarget', retarget) tc.fv('confirmform', 'sure', 'click') tc.submit('sure') # we're back at the roadmap tc.code(200) tc.url('/roadmap')
def runTest(self): env = self._testenv.get_trac_environment() config = AgiloConfig(env).get_section(AgiloConfig.AGILO_LINKS) option_name = '%s.calculate' % Type.REQUIREMENT configured_properties = config.get_list(option_name) broken_definition = 'sum:get_outgoing.blubber' configured_properties.append(broken_definition) config.change_option(option_name, ', '.join(configured_properties)) config.save() self._tester.login_as(Usernames.admin) page_url = self._tester.url + '/admin/agilo/types/%s' % Type.REQUIREMENT tc.go(page_url) tc.code(200) html = tc.show() assert "sum:get_outgoing.rd_points|type=story|story_priority=Mandatory" in html assert 'blubber' not in html
def runTest(self): '''Checks that a modified description produces a description diff and we can look at that diff later as well as the ticket history page.''' self._tester.login_as(Usernames.admin) ticket_id = self._tester.create_new_agilo_task( 'Blub', 'The boring description') self._tester.go_to_view_ticket_page(ticket_id) tc.formvalue('propertyform', 'field_description', 'A new, exciting description') tc.submit('submit') self._tester.go_to_view_ticket_page(ticket_id) tc.follow('diff') tc.code(200) # There seems to be no easyer way to get to the ticket history page tc.follow('Ticket History') tc.code(200)
def _test_roadmap(self): # get page for editing requirement ticket type self._tester.login_as(Usernames.team_member) page_url = self._tester.url + '/roadmap' tc.go(page_url) tc.url(page_url) tc.code(200) # page should not enable new sprint functionality... tc.notfind('Add new sprint') # ... except for ScrumMasters self._tester.login_as(Usernames.scrum_master) tc.go(page_url) tc.find('Add new sprint') # ... and Product Owners self._tester.login_as(Usernames.product_owner) tc.go(page_url) tc.find('Add new sprint')
def runTest(self): '''Checks that a modified description produces a description diff and we can look at that diff later as well as the ticket history page.''' self._tester.login_as(Usernames.admin) ticket_id = self._tester.create_new_agilo_task('Blub', 'The boring description') self._tester.go_to_view_ticket_page(ticket_id) tc.formvalue('propertyform', 'field_description', 'A new, exciting description') tc.submit('submit') self._tester.go_to_view_ticket_page(ticket_id) tc.follow('diff') tc.code(200) # There seems to be no easyer way to get to the ticket history page tc.follow('Ticket History') tc.code(200)
def runTest(self): # Setting the a default type different from the ticket type to be # created triggered another bug in the preview display... self._tester.login_as(Usernames.admin) self._tester.login_as(Usernames.product_owner) title = 'Foo Bar Title' ticket_id = self._tester.create_new_agilo_userstory(title) self._tester.go_to_view_ticket_page(ticket_id) new_title = 'bulb' tc.formvalue('propertyform', 'summary', new_title) tc.submit('preview') tc.code(200) from agilo.ticket.api import AgiloTicketSystem if AgiloTicketSystem.is_trac_1_0(): tc.find('<span[^>]*>%s</span>' % new_title) else: tc.find('<h2[^>]*>%s</h2>' % new_title)
def runTest(self): self._tester.login_as(Usernames.admin) page_url = self._tester.url + '/admin/agilo/types/task' tc.go(page_url) assert ('sum:remaining_time;actual_time' not in tc.show()) tc.formvalue('modcomp', 'result', 'summed_time') tc.formvalue('modcomp', 'function', 'sum:remaining_time=actual_time') tc.submit('save') assert "Wrong format for calculated property 'summed_time'" in tc.show() tc.go(page_url) # Add some spaces around the names to test stripping. tc.formvalue('modcomp', 'result', ' summed_time ') tc.formvalue('modcomp', 'function', ' sum:remaining_time;actual_time ') tc.submit('save') tc.code(200) tc.go(page_url) assert 'sum:remaining_time;actual_time' in tc.show()
def go_to_admin_links_page(self): page_url = self._tester.url + '/admin/agilo/links' tc.go(page_url) tc.url(page_url) tc.code(200) return page_url
def runTest(self): tc.go(self.tester.url + '/admin/ticket/milestones') tc.formvalue('milestone_table', 'sel', self.milestone_name()) tc.submit('remove') tc.code(200)
def runTest(self): self._tester.login_as(Usernames.admin) page_url = self._tester.url + '/admin/agilo/teams' #TODO: find a way to test with umlaut without compromising the encoding team_name = self.classname() + 'Team' utf8_team_name = team_name.encode('UTF-8') team_desc = "'''Testdescription'''" self._tester.create_new_team(team_name) # set description tc.fv('modcomp', 'description', team_desc) tc.submit('save') # back at list view tc.url(page_url) tc.code(200) # add a new team and team member #TODO: find a way to test team names with umlaut without assuming the # locale of the testing system is UTF-8.de_DE member_name = self.classname() + 'Member' utf8_member_name = member_name.encode('UTF-8') member_desc = "Goldmember" team_name2 = "T-team" tc.fv('addteam', 'name', team_name2) tc.submit('add') tc.code(200) tc.fv('modcomp', 'team_member', utf8_member_name) tc.fv('modcomp', 'member_description', member_desc) tc.submit('add') tc.code(200) try: # IF the accountmanagerplugin is enabled has to appear # the Confirm user creation frame tc.find('Create new user') except TwillAssertionError: account_manager_plugin_enabled = False else: account_manager_plugin_enabled = True tc.fv('modcomp', 'createUser_ok', 'click') tc.submit('createUser_ok') tc.code(200) # correct team selected? tc.find('<option selected="selected">%s</option>' % team_name2) tc.find(utf8_member_name) tc.find(member_desc) # set new value for mondays and tuesdays tc.fv('modcomp', 'ts_0', '0') tc.fv('modcomp', 'ts_1', '') tc.submit('save') # back at team page tc.url("%s/%s" % (page_url, quote(team_name2))) tc.find(utf8_member_name) # three days x 6h tc.find('18.0h') user_not_confirmed = None if account_manager_plugin_enabled: # start to add a new user as team member but cancel at last user_not_confirmed = 'user-not-confirmed' tc.fv('modcomp', 'team_member', user_not_confirmed) tc.submit('add') # abort user creation tc.find('Create new user') tc.fv('modcomp', 'createUser_cancel', 'click') tc.submit('createUser_cancel') # back at team page tc.url("%s/%s" % (page_url, quote(team_name2))) tc.find(utf8_member_name) if user_not_confirmed is not None: tc.notfind(user_not_confirmed) # change team tc.follow(utf8_member_name) tc.fv('modcomp', 'team', utf8_team_name) tc.submit('save') tc.notfind(utf8_member_name) tc.go("%s/%s" % (page_url, unicode_quote(team_name))) tc.find(utf8_member_name) # --------- unassigned team members functionality -------- # add another team member to team 1 member_name2 = 'member #2' tc.fv('modcomp', 'team_member', member_name2) tc.submit('add') if account_manager_plugin_enabled: tc.find('Create new user') tc.find(member_name2) tc.fv('modcomp', 'createUser_ok', 'click') tc.submit('createUser_ok') tc.fv('modcomp', 'member_description', '') tc.submit('save') # back at team list, delete first team member tc.url("%s/%s" % (page_url, unicode_quote(team_name))) tc.fv('modcomp', 'delete', utf8_member_name) tc.submit('save') # same url, should not list this member anymore tc.url("%s/%s" % (page_url, unicode_quote(team_name))) tc.notfind(utf8_member_name) # select the other one but cancel back to team list. Formvalue # must use True here because Twill treats checkboxes differently # when there are several with the same name or only one tc.fv('modcomp', 'delete', True) tc.submit('cancel') tc.go(page_url) tc.follow('Unassigned team members') # shows the member we deleted, not the one we canceled on tc.url(page_url + "/unassigned") tc.find(utf8_member_name) tc.notfind(member_name2) # completely delete the team member tc.fv('modcomp', 'delete', True) tc.submit('remove') # no team members without teams anymore tc.url(page_url) tc.notfind('unassigned') # now delete the teams tc.fv('team_table', 'delete', utf8_team_name) tc.fv('team_table', 'delete', team_name2) tc.submit() tc.notfind(utf8_team_name) tc.notfind(team_name2) tc.find('unassigned')
def go_to_sprint_detail_page(self, sprint_name): tc.go('%s/%s' % (SPRINT_URL, sprint_name)) tc.code(200)
def runTest(self): self.tester.login_as(Usernames.product_owner) query_url = self.tester.url + "/query?type=!bug&type=!enhancement" tc.go(query_url) tc.code(200)
def runTest(self): # All help pages are accessible as anonymous too self._tester.logout() tc.go(self._tester.url + '/agilo-help/admin/index') tc.code(200) tc.find('Agilo Administration Guide')