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