style(ui): open career and document surfaces and show single-month activity
This commit is contained in:
@@ -125,6 +125,23 @@ test('[PRES-S01] activity chart uses one shared zero-based scale and a readable
|
||||
expect(firstY(paths[0])).toBeLessThan(firstY(paths[1]));
|
||||
});
|
||||
|
||||
test('[PRES-S01] a single recorded month has visible markers on the shared scale and retains exact values', async () => {
|
||||
const writesBefore = mockedApi.put.mock.calls.length;
|
||||
mockedApi.get.mockImplementation((url: string) => Promise.resolve({ data: url.endsWith('/analytics') ? [monthly[0]] : data(url) }) as any);
|
||||
open();
|
||||
const activity = await screen.findByRole('region', { name: 'Application activity' });
|
||||
const markers = activity.querySelectorAll('svg circle');
|
||||
expect(markers).toHaveLength(2);
|
||||
expect(markers[0]).toHaveAttribute('cy', '20');
|
||||
expect(markers[1]).toHaveAttribute('cy', '140');
|
||||
for (const marker of markers) expect(Number(marker.getAttribute('r'))).toBeGreaterThan(0);
|
||||
fireEvent.click(within(activity).getByText('View monthly values'));
|
||||
const table = within(activity).getByRole('table');
|
||||
expect(within(table).getByRole('cell', { name: '4' })).toBeVisible();
|
||||
expect(within(table).getByRole('cell', { name: '1' })).toBeVisible();
|
||||
expect(mockedApi.put).toHaveBeenCalledTimes(writesBefore);
|
||||
});
|
||||
|
||||
test('[P7-02 PRES-S01 S02] setup guidance treats pending and failed summaries as unknown until their owner retries', async () => {
|
||||
let resolveStats!: (response: { data: typeof stats }) => void;
|
||||
let fail = false;
|
||||
|
||||
Reference in New Issue
Block a user