feat: guide history query start

This commit is contained in:
lingniu
2026-07-19 01:18:42 +08:00
parent 82f81eee33
commit e7b49df8ed
3 changed files with 23 additions and 8 deletions

View File

@@ -202,10 +202,14 @@ test('uses one focused Semi bottom SideSheet for the complete mobile history que
mocks.historyExports.mockResolvedValue([]);
renderPage('/history');
await screen.findByText('等待查询历史数据');
await screen.findByText('选择车辆开始查询');
const trigger = screen.getByRole('button', { name: '修改查询范围:请选择车辆' });
expect(trigger).toHaveAttribute('aria-expanded', 'false');
fireEvent.click(trigger);
expect(screen.queryByRole('button', { name: '展开趋势' })).not.toBeInTheDocument();
expect(screen.queryByRole('button', { name: '打开历史数据工具' })).not.toBeInTheDocument();
expect(screen.queryByRole('button', { name: 'Previous' })).not.toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '选择车辆并查询' }));
expect(trigger).toHaveAttribute('aria-expanded', 'true');
const dialog = await screen.findByRole('dialog', { name: '历史查询范围' });
expect(document.querySelector('.v2-history-filter-sidesheet')).toHaveClass('semi-sidesheet-bottom');