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