refine Semi UI alert disposition
This commit is contained in:
@@ -163,6 +163,10 @@ test('clears old alert rows and inspector evidence when the event scope changes'
|
||||
expect(screen.getByText('已展开处置详情 · 点击其他事件快速切换')).toBeInTheDocument();
|
||||
expect(desktopAlertRow).toHaveAttribute('aria-expanded', 'true');
|
||||
expect(view.container.querySelector('.v2-alert-focus-card[aria-label="告警处置摘要"]')).toHaveClass('v2-alert-detail-card');
|
||||
expect(screen.getByLabelText('告警事件上下文')).toHaveTextContent('数据来源JT808触发时间07-16 12:00:00处理记录1 条');
|
||||
expect(screen.getByLabelText('告警触发证据')).toHaveTextContent('触发值90 km/h阈值条件> 80 km/h,持续 60 秒超限幅度+10 km/h');
|
||||
expect(screen.getByText('1 条记录').closest('.semi-tag')).toBeInTheDocument();
|
||||
expect(screen.getByText('可操作').closest('.semi-tag')).toBeInTheDocument();
|
||||
expect(view.container.querySelector('.v2-alert-technical-collapse.semi-collapse')).toBeInTheDocument();
|
||||
expect(screen.getByText('技术详情')).toBeInTheDocument();
|
||||
expect(view.container.querySelector('.v2-alert-inspector-heading')).toHaveClass('v2-workspace-panel-header');
|
||||
@@ -233,12 +237,15 @@ test('renders only selectable Semi alert cards on mobile', async () => {
|
||||
expect(view.container.querySelector('.v2-alert-table-scroll.is-mobile-scroll')).toHaveAttribute('aria-label', '告警事件列表,可上下滚动');
|
||||
expect(view.container.querySelector('.v2-alert-event-table')).not.toBeInTheDocument();
|
||||
expect(action).toHaveAttribute('aria-expanded', 'false');
|
||||
expect(action).toHaveTextContent('超限幅度+10 km/h');
|
||||
expect(action).toHaveTextContent('核验并处置');
|
||||
fireEvent.click(action);
|
||||
expect(action).toHaveAttribute('aria-pressed', 'true');
|
||||
expect(action).toHaveAttribute('aria-expanded', 'true');
|
||||
expect(await screen.findByRole('dialog', { name: '告警事件详情' })).toBeInTheDocument();
|
||||
expect(document.querySelector('.v2-alert-detail-sidesheet')).toHaveClass('semi-sidesheet-bottom');
|
||||
expect(document.querySelector('.v2-alert-detail-sidesheet .semi-sidesheet-inner')).toHaveStyle({ height: 'min(86dvh, 760px)' });
|
||||
expect(screen.getByLabelText('告警触发证据')).toHaveTextContent('超限幅度+10 km/h');
|
||||
expect(await screen.findByText('mobile-event')).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: '关闭告警详情' }));
|
||||
expect(screen.queryByText('mobile-event')).not.toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user