fix: hide subjects with no data in day modal; fix failure bar rendering

- Day modal now only shows animals that have a status record for that day
- Removed '+ Add' button and 'No data' placeholder for absent subjects
- Fixed failure bars disappearing in recharts: removed radius from all bars,
  added minPointSize=2 on failure bar so zero-value bars remain visible

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-04-23 12:13:05 -04:00
parent d764bc66fb
commit 8b40856205
2 changed files with 17 additions and 15 deletions
+3 -2
View File
@@ -227,8 +227,9 @@ describe('day click modal', () => {
expect(screen.queryByRole('dialog')).not.toBeInTheDocument();
});
it('shows all animals in the modal (with and without data)', async () => {
it('shows only animals with data — excludes subjects with no record that day', async () => {
const dateStr = todayStr();
// Only Rat A has a record; Rat B does not
const statuses = [
makeStatus('a1000000-0000-0000-0000-000000000001', dateStr, { 'ww000000-0000-0000-0000-000000000099': '320' }),
];
@@ -239,7 +240,7 @@ describe('day click modal', () => {
await waitFor(() => {
const dialog = screen.getByRole('dialog');
expect(within(dialog).getAllByText('Rat A').length).toBeGreaterThan(0);
expect(within(dialog).getAllByText('Rat B').length).toBeGreaterThan(0);
expect(within(dialog).queryAllByText('Rat B')).toHaveLength(0);
});
});
});