import '../../../../../dist/zn.min.js'; import {expect, fixture, html} from '@open-wc/testing'; import type ZnCollapsible from '../../../collapsible/collapsible.component'; import type ZnFlowStepGroup from './flow-step-group.component'; async function collapsibleOf(el: ZnFlowStepGroup): Promise { const collapsible = el.shadowRoot!.querySelector('zn-collapsible')!; await collapsible.updateComplete; return collapsible; } describe('', () => { it('should render a collapsible with its caption', async () => { const el = await fixture(html` `); const collapsible = await collapsibleOf(el); expect(collapsible.caption).to.equal('Contacts'); expect(collapsible.expanded).to.equal(true); }); it('should start closed when collapsed', async () => { const el = await fixture(html` `); expect((await collapsibleOf(el)).expanded).to.equal(false); }); });