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