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