fix(export): label synthetic ordinal '# Days Reach (ordinal)' to avoid collision with same-named daily field
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -96,7 +96,7 @@ describe('ExportDataModal', () => {
|
||||
await waitFor(() => expect(screen.getByText(/2 rows/i)).toBeInTheDocument());
|
||||
fireEvent.click(screen.getByText('Export CSV'));
|
||||
const text = await readBlobText(dl.getBlob());
|
||||
expect(text).toBe('Data,Total attempts\n\n# Days Reach,Alpha,Beta\n1,5,9\n2,7,');
|
||||
expect(text).toBe('Data,Total attempts\n\n# Days Reach (ordinal),Alpha,Beta\n1,5,9\n2,7,');
|
||||
await dl.restore();
|
||||
});
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@ describe('buildSubjectSeriesMatrix', () => {
|
||||
{ xField: '__days__', dataParam: totalParam, groupField: '__none__' },
|
||||
{ statuses: ssStatuses, animals: ssAnimals, dailyTemplate: [] },
|
||||
);
|
||||
expect(m.corner).toBe('# Days Reach');
|
||||
expect(m.corner).toBe('# Days Reach (ordinal)');
|
||||
expect(m.rows.map((r) => r.member.label)).toEqual(['1', '2']);
|
||||
expect(m.rows[0].values).toEqual([5, 9]);
|
||||
expect(m.rows[1].values).toEqual([7, '']);
|
||||
|
||||
Reference in New Issue
Block a user