test(export): stale-group + same-date ordinal coverage; comment/guard polish
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user