import { newSpecPage } from "@stencil/core/testing";
import { BpSdkQuoteRequestFees } from "./bp-sdk-quote-request-fees";
const setupPage = async () => {
    return await newSpecPage({
        html: '<bp-sdk-quote-request-fees></bp-sdk-quote-request-fees>',
        components: [BpSdkQuoteRequestFees],
    });
};
const setupInstance = (page) => {
    const instance = page.rootInstance;
    return instance;
};
describe('bp-sdk-quote-request-fee', () => {
    it('renders', async () => {
        const page = await setupPage();
        await page.waitForChanges();
        const element = page.root.querySelector('section');
        expect(element).toBeTruthy();
        expect(page.root.querySelector('bp-sdk-external-quote-request-fees')).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-fees')).toBeTruthy();
        whenDefinedMock.mockRestore();
    });
});
