Add a Declined chip to the bench attendance sheet, drop silent's yellow tint
Silent and declined are both left out of the default "Responded" view, but only silent had its own chip to review -- declined now gets one too. The silent-row background tint is gone; nothing else on this screen tints rows, and the chip itself already says which bucket you're looking at. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3113,6 +3113,18 @@ class CoachAttendanceViewTests(TestCase):
|
||||
self.assertEqual([row.member for row in rows], [self.player])
|
||||
self.assertEqual(response.context["responded_count"], 1)
|
||||
|
||||
def test_declined_filter_narrows_to_declined_rows(self):
|
||||
declined_member = Member.objects.create(first_name="Cara", last_name="Declined")
|
||||
TeamMembership.objects.create(team=self.team, member=declined_member, season=self.season)
|
||||
Attendance.objects.update_or_create(event=self.event, member=declined_member, defaults={"status": Attendance.AttendanceStatus.ABSENT})
|
||||
self.client.force_login(self.user)
|
||||
|
||||
response = self._get(filter="declined")
|
||||
|
||||
rows = response.context["rows"]
|
||||
self.assertEqual([row.member for row in rows], [declined_member])
|
||||
self.assertEqual(response.context["declined_count"], 1)
|
||||
|
||||
def test_the_goalies_chip_is_gone(self):
|
||||
self.client.force_login(self.user)
|
||||
|
||||
@@ -3120,6 +3132,17 @@ class CoachAttendanceViewTests(TestCase):
|
||||
|
||||
self.assertNotContains(response, "Goalies")
|
||||
self.assertContains(response, "Responded")
|
||||
self.assertContains(response, "Declined")
|
||||
|
||||
def test_silent_rows_have_no_special_background(self):
|
||||
silent_member = Member.objects.create(first_name="Ben", last_name="Silent")
|
||||
TeamMembership.objects.create(team=self.team, member=silent_member, season=self.season)
|
||||
Attendance.objects.update_or_create(event=self.event, member=silent_member, defaults={"status": Attendance.AttendanceStatus.NO_RESPONSE})
|
||||
self.client.force_login(self.user)
|
||||
|
||||
response = self._get(filter="silent")
|
||||
|
||||
self.assertNotContains(response, "bg-warn-bg")
|
||||
|
||||
def test_event_from_another_team_is_not_reachable(self):
|
||||
other_team = Team.objects.create(club=self.club, name="U14", short_name="U14")
|
||||
|
||||
Reference in New Issue
Block a user