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