修复泥点弹窗透明问题
为泥点消耗确认弹窗补齐平台主题作用域和模态面板样式 让平台状态弹窗合并默认主题遮罩,避免自定义遮罩覆盖主题变量 补充弹窗默认样式测试和团队排障记录
This commit is contained in:
@@ -51,3 +51,27 @@ test('supports extra detail copy and close button override', () => {
|
||||
expect(within(dialog).getByText('本次会覆盖当前待确认素材。')).toBeTruthy();
|
||||
expect(screen.queryByRole('button', { name: '关闭' })).toBeNull();
|
||||
});
|
||||
|
||||
test('applies the stronger default overlay and panel chrome', () => {
|
||||
render(
|
||||
<PlatformMudPointConfirmDialog
|
||||
open
|
||||
points={10}
|
||||
onClose={() => {}}
|
||||
onConfirm={() => {}}
|
||||
portal={false}
|
||||
/>,
|
||||
);
|
||||
|
||||
const dialog = screen.getByRole('dialog', { name: '确认消耗泥点' });
|
||||
const overlay = dialog.parentElement as HTMLElement;
|
||||
|
||||
expect(overlay.className).toContain('platform-modal-backdrop');
|
||||
expect(overlay.className).toContain('platform-theme--light');
|
||||
expect(overlay.className).toContain('!bg-black/45');
|
||||
expect(dialog.className).toContain('platform-modal-shell');
|
||||
expect(dialog.className).toContain('max-w-xs');
|
||||
expect(dialog.className).toContain(
|
||||
'shadow-[0_24px_70px_rgba(15,23,42,0.22)]',
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user