import { newSpecPage } from "@stencil/core/testing";
import { BpSdkRadioDialog } from "./bp-sdk-radio-dialog";
describe('bp-sdk-radio-dialog', () => {
    it('renders', async () => {
        const page = await newSpecPage({
            html: '<bp-sdk-radio-dialog></bp-sdk-radio-dialog>',
            components: [BpSdkRadioDialog],
        });
        await page.waitForChanges();
        const element = page.root.querySelector('div');
        expect(element).toBeTruthy();
        expect(page.root.querySelector('bp-sdk-external-radio-dialog')).toBeFalsy();
    });
    it('renders external component if defined', async () => {
        const whenDefinedMock = jest.spyOn(customElements, 'whenDefined').mockResolvedValueOnce({});
        const page = await newSpecPage({
            html: '<bp-sdk-radio-dialog></bp-sdk-radio-dialog>',
            components: [BpSdkRadioDialog],
        });
        await page.waitForChanges();
        expect(page.root.querySelector('bp-sdk-external-radio-dialog')).toBeTruthy();
        whenDefinedMock.mockRestore();
    });
});
