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`
`;
}
},
);
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}
${tag}>
`);
properlyInstantiated = true;
} catch (e) {
throw new Error(e);
}
expect(properlyInstantiated).to.be.true;
});
});