import { newSpecPage } from "@stencil/core/testing";
import { BpSdkCreateAppForm } from "./bp-sdk-create-app-form";
describe('bp-sdk-send-to-exchange', () => {
    it('renders', async () => {
        const page = await newSpecPage({
            html: '<bp-sdk-create-app-form></bp-sdk-create-app-form>',
            components: [BpSdkCreateAppForm],
        });
        await page.waitForChanges();
        const element = page.root.querySelector('.bp-sdk-create-app-form__container');
        expect(element).toBeTruthy();
        expect(page.root.querySelector('bp-sdk-external-create-app-form')).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></bp-sdk-create-app-form>',
            components: [BpSdkCreateAppForm],
        });
        await page.waitForChanges();
        expect(page.root.querySelector('bp-sdk-external-create-app-form')).toBeTruthy();
        whenDefinedMock.mockRestore();
    });
});
