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