Skip to content

Commit bffe9b2

Browse files
committed
added tests and fixed uui-dialog test
1 parent 73641fd commit bffe9b2

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

packages/uui-dialog-layout/lib/uui-dialog-layout.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,25 @@ describe('UUIDialogLayoutElement', () => {
1212
it('passes the a11y audit', async () => {
1313
await expect(element).shadowDom.to.be.accessible();
1414
});
15+
16+
describe('properties', () => {
17+
it('headline', () => {
18+
expect(element).to.have.property('headline');
19+
});
20+
});
21+
22+
describe('template', () => {
23+
it('renders a default slot', () => {
24+
const slot = element.shadowRoot!.querySelector('slot')!;
25+
expect(slot).to.exist;
26+
});
27+
it('renders a headline slot', () => {
28+
const slot = element.shadowRoot!.querySelector('slot[name="headline"]')!;
29+
expect(slot).to.exist;
30+
});
31+
it('renders a actions slot', () => {
32+
const slot = element.shadowRoot!.querySelector('slot[name="actions"]')!;
33+
expect(slot).to.exist;
34+
});
35+
});
1536
});

packages/uui-dialog/lib/uui-dialog.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,5 @@ describe('UUIDialogElement', () => {
1818
const slot = element.shadowRoot!.querySelector('slot')!;
1919
expect(slot).to.exist;
2020
});
21-
22-
it('renders an action slot', () => {
23-
const slot = element.shadowRoot!.querySelector('slot[name=actions]')!;
24-
expect(slot).to.exist;
25-
});
2621
});
2722
});

0 commit comments

Comments
 (0)