Skip to content

Commit c458480

Browse files
committed
added test for headline styling
1 parent ccc7c2f commit c458480

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { html, fixture, expect } from '@open-wc/testing';
1+
import { html, fixture, expect, elementUpdated } from '@open-wc/testing';
22
import { UUIDialogLayoutElement } from './uui-dialog-layout.element';
33
import '.';
44

@@ -33,4 +33,20 @@ describe('UUIDialogLayoutElement', () => {
3333
expect(slot).to.exist;
3434
});
3535
});
36+
37+
describe('styling', () => {
38+
it('set display none when no headline is provided', () => {
39+
const display = element.shadowRoot!.querySelector('h3')!.style.display;
40+
41+
expect(display).to.equal('none');
42+
});
43+
it('set resets display when a headline is provided', async () => {
44+
element.headline = 'headline';
45+
46+
await elementUpdated(element);
47+
const display = element.shadowRoot!.querySelector('h3')!.style.display;
48+
49+
expect(display).to.equal('');
50+
});
51+
});
3652
});

0 commit comments

Comments
 (0)