fix(web): bound stalled mutations

This commit is contained in:
lingniu
2026-07-16 07:54:04 +08:00
parent be1ff4ff0d
commit 1a9b2ce962
5 changed files with 74 additions and 37 deletions
@@ -41,6 +41,6 @@ test('renders date-range mileage summary, trend and daily detail list', async ()
expect((await screen.findAllByText('210.5 km')).length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('粤A12345')).toBeInTheDocument();
expect(screen.getAllByText('80.5').length).toBeGreaterThanOrEqual(1);
await waitFor(() => expect(fetchMock).toHaveBeenCalledWith(expect.stringContaining('dateFrom=2026-07-01'), undefined));
expect(fetchMock).toHaveBeenCalledWith(expect.stringContaining('keyword=%E7%B2%A4A12345'), undefined);
await waitFor(() => expect(fetchMock).toHaveBeenCalledWith(expect.stringContaining('dateFrom=2026-07-01'), { signal: expect.any(AbortSignal) }));
expect(fetchMock).toHaveBeenCalledWith(expect.stringContaining('keyword=%E7%B2%A4A12345'), { signal: expect.any(AbortSignal) });
});