Files
jinhojang6 2771e99d32 refactor: promote reusable home sections into sections/shared
Move the hero and choose-your-path card sections out of sections/home so
pages other than the homepage can compose them, extract the two-line
statement heading, and lift CenterCtaSection out of the Movement page's
private atoms module.

The hero now takes an optional `background` node, defaulting to the same
Logos background video the homepage has always rendered.

Rendered output is unchanged: the homepage's hero, social proof, and
choose-your-path markup and the Movement page body are byte-identical to
develop, and the generated stylesheet loses no rules.
2026-08-10 20:38:46 +09:00

32 lines
1.1 KiB
TypeScript

import { createElement } from 'react'
import { renderToStaticMarkup } from 'react-dom/server'
import { describe, expect, test } from 'vitest'
import StatementHeading from '../statement-heading'
const render = (props: Parameters<typeof StatementHeading>[0]) =>
renderToStaticMarkup(createElement(StatementHeading, props))
describe('StatementHeading', () => {
test('renders both statement lines with the muted continuation', () => {
const html = render({
headline: 'Logos is not for everyone.',
headlineMuted: 'Logos is for people who are done waiting for permission.',
})
expect(html).toContain('Logos is not for everyone.')
expect(html).toContain(
'Logos is for people who are done waiting for permission.'
)
// The continuation line is the only one that carries the muted colour.
expect(html.match(/#848e88/g)).toHaveLength(1)
})
test('renders a single h2 so callers own their own wrapper and spacing', () => {
const html = render({ headline: 'A', headlineMuted: 'B' })
expect(html.startsWith('<h2')).toBe(true)
expect(html.endsWith('</h2>')).toBe(true)
})
})