import { beforeEach, describe, expect, it } from 'vitest' import { fixture, html } from '@open-wc/testing-helpers' import './UsFormWrap' import '../input/UsInput' describe('UsFormWrap', () => { let el: any const getMainElement = () => { return el.querySelector('div') as HTMLElement } beforeEach(async () => { el = await fixture(html` `) }) it('should have default classes and props', () => { expect(el.dataTestId).toBe('form_wrap_component') }) it('should have a working slot', () => { const innerItem = el.querySelector('us-input') expect(innerItem).not.toBeNull() }) it('should have a listener function', () => { const listenerFunc = el.inputListener expect(listenerFunc).not.toBeUndefined() }) it('should not have a shadowRoot', () => { const shadowRoot = el.shadowRoot expect(shadowRoot).toBeNull() }) })