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