test(export): stale-group + same-date ordinal coverage; comment/guard polish

This commit is contained in:
Experiments DB Dev
2026-07-19 15:18:56 -04:00
parent 33ee191966
commit 4f3fe64cad
4 changed files with 25 additions and 2 deletions
+11
View File
@@ -110,4 +110,15 @@ describe('ExportDataModal', () => {
expect(text).toMatch(/^Group,Control,Drug$/m);
await dl.restore();
});
it('a stale/unset group field coerces to None (no Group row in the export)', async () => {
const dl = mockDownload();
renderModal({ groupField: 'ghost-field' });
await screen.findByLabelText('X axis (rows)');
await waitFor(() => expect(screen.getByText(/2 rows/i)).toBeInTheDocument());
fireEvent.click(screen.getByText('Export CSV'));
const text = await readBlobText(dl.getBlob());
expect(text).not.toMatch(/^Group,/m);
await dl.restore();
});
});