Send the groups list Edit button to the group page, not the rename form
Every other list page with a detail view (Teams, Members, News, Events) has Edit land on the overview; groups jumped straight to the rename form, skipping the page where the members actually are. The group page already carries its own Edit action, so nothing becomes unreachable. The list pages that legitimately do go straight to a form -- Locations, Opponents, Sponsors, Positions, Referee levels -- have no detail view at all, which is why they stay as they are. Noted in the test so the inconsistency doesn't read as one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -824,6 +824,19 @@ class GroupManagementTests(ManagementTestBase):
|
||||
self.client.force_login(self.make_non_admin_coach())
|
||||
self.assertEqual(self.club_get("group_list").status_code, 403)
|
||||
|
||||
def test_the_lists_edit_button_goes_to_the_group_page_not_straight_to_the_form(self):
|
||||
# Same as Teams: Edit lands on the overview, which is where the members
|
||||
# live, and offers its own Edit for the rename form. The list pages that
|
||||
# do jump straight to a form (Locations, Opponents, Sponsors, Positions,
|
||||
# Referee levels) have no detail page to land on at all.
|
||||
group = Group.objects.create(club=self.club, name="Referees")
|
||||
self.client.force_login(self.admin_user)
|
||||
|
||||
response = self.club_get("group_list")
|
||||
|
||||
self.assertContains(response, reverse("management:group_detail", args=[group.pk]))
|
||||
self.assertNotContains(response, reverse("management:group_update", args=[group.pk]))
|
||||
|
||||
def test_admin_can_create_a_group(self):
|
||||
self.client.force_login(self.admin_user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user