Skip to content

Commit c85b664

Browse files
committed
test: add rudimentary test for tiptap property editor ui
1 parent 09b0233 commit c85b664

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { UmbPropertyEditorUiTiptapElement } from './property-editor-ui-tiptap.element.js';
2+
import { expect, fixture, html } from '@open-wc/testing';
3+
import { type UmbTestRunnerWindow, defaultA11yConfig } from '@umbraco-cms/internal/test-utils';
4+
5+
describe('UmbPropertyEditorUITiptapElement', () => {
6+
let element: UmbPropertyEditorUiTiptapElement;
7+
8+
beforeEach(async () => {
9+
element = await fixture(html` <umb-property-editor-ui-tiptap></umb-property-editor-ui-tiptap> `);
10+
});
11+
12+
it('is defined with its own instance', () => {
13+
expect(element).to.be.instanceOf(UmbPropertyEditorUiTiptapElement);
14+
});
15+
16+
if ((window as UmbTestRunnerWindow).__UMBRACO_TEST_RUN_A11Y_TEST) {
17+
it('passes the a11y audit', async () => {
18+
await expect(element).shadowDom.to.be.accessible(defaultA11yConfig);
19+
});
20+
}
21+
});

0 commit comments

Comments
 (0)