富文本单测

This commit is contained in:
miaoxinyu01 2023-10-24 19:33:49 +08:00
parent 6389a43f67
commit a6bbee1281

View File

@ -55,12 +55,14 @@ test('2. change event', async () => {
)
);
const rich = container.querySelector('.cxd-RichTextControl')!;
const frame = container
.querySelector('.cxd-RichTextControl')
?.querySelector('.tox-edit-area__iframe')!;
fireEvent.change(
rich
.querySelector('.tox-edit-area__iframe')
?.contentWindow.document.body.querySelector('p'),
(frame as HTMLIFrameElement)?.contentWindow?.document.body.querySelector(
'p'
)!,
{
target: {value: 9}
}