feat(web): converge workspace identity themes
This commit is contained in:
@@ -31,8 +31,24 @@ test('renders a Semi identity treatment for primary workspaces', () => {
|
||||
description="车牌、VIN 或手机号快速查车"
|
||||
/>);
|
||||
|
||||
expect(screen.getByLabelText('车辆目录操作')).toHaveClass('has-identity');
|
||||
expect(screen.getByLabelText('车辆目录操作')).toHaveClass('has-identity', 'is-primary');
|
||||
expect(screen.getByText('车辆目录')).toHaveClass('v2-workspace-command-eyebrow');
|
||||
expect(screen.getByRole('heading', { name: '车辆快速定位', level: 5 })).toHaveClass('v2-workspace-command-title');
|
||||
expect(view.container.querySelector('.v2-workspace-command-icon')).toHaveClass('semi-avatar');
|
||||
});
|
||||
|
||||
test('exposes the semantic identity tone without coupling it to the status color', () => {
|
||||
render(<WorkspaceCommandBar
|
||||
ariaLabel="告警处置操作"
|
||||
eyebrow="主动告警"
|
||||
icon={<IconSearch />}
|
||||
tone="warning"
|
||||
title="告警处置工作台"
|
||||
description="核验事件证据"
|
||||
status="通知已读"
|
||||
statusColor="green"
|
||||
/>);
|
||||
|
||||
expect(screen.getByLabelText('告警处置操作')).toHaveClass('has-identity', 'is-warning');
|
||||
expect(screen.getByText('通知已读').closest('.semi-tag')).toHaveClass('semi-tag-green-light');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user