mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-27 06:13:06 +00:00
Clarify that new Issues track work and do not fence closed-ticket code, and replace brittle className layout assertions with structure/data-slot contracts.
24 lines
936 B
TypeScript
24 lines
936 B
TypeScript
import { createElement } from 'react'
|
|
import { renderToStaticMarkup } from 'react-dom/server'
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
import { CampaignListPageHeader } from '@/components/campaign/shared/CampaignListPageHeader'
|
|
import { CampaignScopeBadge } from '@/components/campaign/shared/CampaignScopeBadge'
|
|
|
|
describe('CampaignListPageHeader (B118)', () => {
|
|
it('keeps h1 in the DOM with sr-only chrome on mobile (B118)', () => {
|
|
const html = renderToStaticMarkup(
|
|
createElement(CampaignListPageHeader, {
|
|
title: 'Municípios',
|
|
description: 'Os 435 municípios da campanha.',
|
|
scope: createElement(CampaignScopeBadge, null, '435 municípios'),
|
|
}),
|
|
)
|
|
|
|
expect(html).toContain('<h1')
|
|
expect(html).toContain('sr-only')
|
|
expect(html).toContain('Municípios')
|
|
expect(html).toContain('Os 435 municípios da campanha.')
|
|
expect(html).toContain('435 municípios')
|
|
})
|
|
})
|