feat: clarify mobile mileage legend

This commit is contained in:
lingniu
2026-07-19 01:33:28 +08:00
parent e7b49df8ed
commit 3770afabec
3 changed files with 48 additions and 16 deletions

View File

@@ -73,6 +73,10 @@ test('renders only the desktop matrix with dates as columns and a period total',
expect(screen.getByRole('note', { name: '里程矩阵读表说明' })).toHaveTextContent('0 km已上报、无里程增量');
expect(screen.getByRole('note', { name: '里程矩阵读表说明' })).toHaveTextContent('—无可用里程');
expect(screen.getByRole('note', { name: '里程矩阵读表说明' })).toHaveTextContent('颜色越深、里程越高');
expect(screen.getByLabelText('移动端里程矩阵读表说明')).toHaveTextContent('左右滑动日期 · 车牌与总里程固定');
expect(screen.getByLabelText('0 公里表示已上报、无里程增量')).toHaveTextContent('0 km无增量');
expect(screen.getByLabelText('横线表示无可用里程')).toHaveTextContent('—无数据');
expect(screen.getByLabelText('颜色越深、里程越高')).toHaveTextContent('色阶深色更高');
const matrixRegion = screen.getByRole('region', { name: '车辆每日里程矩阵,可横向滚动查看日期' });
expect(matrixRegion).toHaveAttribute('tabindex', '0');
const matrixScroller = matrixRegion.querySelector<HTMLElement>('.semi-table-body');