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