refine Semi UI access workspace
This commit is contained in:
@@ -52,9 +52,11 @@ test('removes old access rows immediately when the vehicle filter scope changes'
|
||||
expect(await screen.findByText('旧接入车牌')).toBeInTheDocument();
|
||||
expect(screen.getByRole('heading', { name: '真实来源与接入健康', level: 5 })).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('接入管理操作')).toHaveClass('v2-workspace-command-bar', 'v2-access-command-bar');
|
||||
for (const className of ['v2-access-filter-card-v3', 'v2-access-kpis-card-v3', 'v2-access-table-v3']) {
|
||||
expect(view.container.querySelector('.v2-access-discovery-shell')).toBeInTheDocument();
|
||||
for (const className of ['v2-access-filter-card-v3', 'v2-access-table-v3']) {
|
||||
expect(view.container.querySelector(`.${className}.semi-card`)).toBeInTheDocument();
|
||||
}
|
||||
expect(screen.getByRole('navigation', { name: '接入差异筛选' })).toHaveClass('v2-access-status-tabs');
|
||||
const filterActions = view.container.querySelector<HTMLElement>('.v2-access-filter-actions');
|
||||
expect(filterActions).toBeInTheDocument();
|
||||
expect(within(filterActions!).getByRole('button', { name: '查询' })).toBeInTheDocument();
|
||||
@@ -66,6 +68,7 @@ test('removes old access rows immediately when the vehicle filter scope changes'
|
||||
expect(desktopRow).toHaveAttribute('aria-expanded', 'false');
|
||||
fireEvent.keyDown(desktopRow, { key: 'Enter' });
|
||||
expect(await screen.findByRole('button', { name: '关闭车辆接入详情' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('dialog', { name: '车辆接入详情' })).toBeInTheDocument();
|
||||
expect(desktopRow).toHaveAttribute('aria-expanded', 'true');
|
||||
const inspectorHeader = screen.getByRole('heading', { level: 5, name: '旧接入车牌' }).closest<HTMLElement>('.v2-workspace-panel-header');
|
||||
expect(inspectorHeader).toBeInTheDocument();
|
||||
@@ -143,9 +146,9 @@ test('renders mobile access vehicles as selectable Semi cards', async () => {
|
||||
expect(action.closest('.semi-card')).toHaveClass('v2-access-mobile-card');
|
||||
expect(view.container.querySelector('.v2-access-table-scroll-v3.is-mobile-scroll')).toHaveAttribute('tabindex', '0');
|
||||
expect(view.container.querySelector('.v2-access-table-scroll-v3.is-mobile-scroll')).toHaveAttribute('aria-label', '车辆接入列表,可上下滚动');
|
||||
expect(within(action).getByText('GB32960')).toBeInTheDocument();
|
||||
expect(within(action).getByText('JT808')).toBeInTheDocument();
|
||||
expect(within(action).getByText('YUTONG_MQTT')).toBeInTheDocument();
|
||||
expect(within(action).getByText('32960')).toBeInTheDocument();
|
||||
expect(within(action).getByText('808')).toBeInTheDocument();
|
||||
expect(within(action).getByText('宇通')).toBeInTheDocument();
|
||||
expect(action).toHaveAttribute('aria-pressed', 'false');
|
||||
expect(action).toHaveAttribute('aria-expanded', 'false');
|
||||
fireEvent.click(action);
|
||||
|
||||
Reference in New Issue
Block a user