import { newSpecPage } from "@stencil/core/testing";
import { BpSdkStepperGroupButton } from "./bp-sdk-stepper-group-button";
const setupPage = async () => {
    return await newSpecPage({
        html: '<bp-sdk-stepper-group-button></bp-sdk-stepper-group-button>',
        components: [BpSdkStepperGroupButton],
    });
};
const setupInstance = (page) => {
    const instance = page.rootInstance;
    return instance;
};
describe('bp-sdk-stepper-group-button', () => {
    it('renders', async () => {
        const page = await setupPage();
        await page.waitForChanges();
        const element = page.root.querySelector('div');
        expect(element).toBeTruthy();
        expect(page.root.querySelector('bp-sdk-external-stepper-group-button')).toBeFalsy();
    });
    it('renders external component if defined', async () => {
        jest.spyOn(customElements, 'whenDefined').mockReturnValueOnce(Promise.resolve());
        const page = await setupPage();
        await page.waitForChanges();
        expect(page.root.querySelector('bp-sdk-external-stepper-group-button')).toBeTruthy();
    });
});
