import { OverlayMixin } from '@lion/overlays'; import { LitElement } from 'lit-element'; import { defineCE, fixture, html, expect, unsafeStatic } from '@open-wc/testing'; import '../lion-select-rich.js'; import '../lion-options.js'; import '../lion-option.js'; const tagString = defineCE( class extends OverlayMixin(LitElement) { render() { return html`
content of the overlay
`; } }, ); const tag = unsafeStatic(tagString); describe('Select Rich Integration tests', () => { it('works inside a dialog', async () => { let properlyInstantiated = false; try { const nestedEl = await fixture(html` Item 1 Item 2 `); await nestedEl.registrationComplete; await fixture(html` <${tag} id="main">
open nested overlay: ${nestedEl}
`); properlyInstantiated = true; } catch (e) { throw new Error(e); } expect(properlyInstantiated).to.be.true; }); });