import { newSpecPage } from "@stencil/core/testing";
import { BpSdkVehicleVinInput } from "./bp-sdk-vehicle-vin-input";
describe('bp-sdk-vehicle-vin-input', () => {
    it('renders', async () => {
        const page = await newSpecPage({
            html: '<bp-sdk-vehicle-vin-input></bp-sdk-vehicle-vin-input>',
            components: [BpSdkVehicleVinInput],
        });
        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-vehicle-vin-input></bp-sdk-vehicle-vin-input>',
            components: [BpSdkVehicleVinInput],
        });
        await page.waitForChanges();
        const element = page.root.querySelector('div');
        expect(element).toBeFalsy();
        whenDefinedMock.mockRestore();
    });
});
