mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 23:25:18 +00:00
Replace layout/spacing utility string assertions with stable contract pins (data-slot, data-retracted, exported constant identity, ARIA). Delete cosmetic-only padding/bleed/grid pins per plan remover-pins-classname. Closes #240 Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
25 lines
947 B
TypeScript
25 lines
947 B
TypeScript
import { createElement } from 'react'
|
|
import { renderToStaticMarkup } from 'react-dom/server'
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
import { CampaignSearchInput } from '@/components/campaign/shared/CampaignSearchInput'
|
|
|
|
describe('CampaignSearchInput', () => {
|
|
it('renders the shared accessible campaign search composition', () => {
|
|
const html = renderToStaticMarkup(
|
|
createElement(CampaignSearchInput, {
|
|
id: 'leadership-search',
|
|
label: 'Buscar liderança',
|
|
placeholder: 'Buscar liderança ou celular',
|
|
}),
|
|
)
|
|
|
|
expect(html).toContain('for="leadership-search"')
|
|
expect(html).toContain('id="leadership-search"')
|
|
expect(html).toContain('data-slot="input-group"')
|
|
expect(html).toContain('data-slot="input-group-addon"')
|
|
expect(html).toContain('data-slot="input-group-control"')
|
|
expect(html).toContain('aria-hidden="true"')
|
|
expect(html).not.toContain('absolute')
|
|
})
|
|
})
|