import { render } from '@stencil/vitest'; import { mutationObserverMock } from '../../../utils/tests/mutation-observer.mock'; global.MutationObserver = mutationObserverMock; it('should render a default button', async () => { const page = await render(`Element Content`); expect(page.root).toEqualHtml(` Element Content `); }); it('should render a primary submit button', async () => { const page = await render(`Element Content`); expect(page.root).toEqualHtml(` Element Content `); }); it('should render a default button with label overriding the element content', async () => { const page = await render(`Element Content`); expect(page.root).toEqualHtml(` Element Content `); }); it('should render a default button with the aria-label-text attribute being overwritten', async () => { const page = await render(`Element Content`); expect(page.root).toEqualHtml(` Element Content `); }); it('should render a default button with an id being explicity specified', async () => { const page = await render(`Element Content`); expect(page.root).toEqualHtml(` Element Content `); }); it('should render as a link when href is provided', async () => { const page = await render( `Browse services`, ); expect(page.root).toEqualHtml(` Browse services Browse services `); }); it('should ignore submit htmlType when rendering as a link', async () => { const page = await render( `Browse services`, ); expect(page.root).toEqualHtml(` Browse services Browse services `); });