RelationshipPill: label render, empty-string handling. OverflowPillDisplay: +N rendering, +0 edge case, aria-hidden marker. TimelineYAxis: max/0 labels, barAreaHeight inline style, zero handling. TranscriptionSection: heading + textarea, initial-value hydration, empty default. 11 tests across four small primitives. Refs #496. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
658 B
TypeScript
22 lines
658 B
TypeScript
import { describe, it, expect, afterEach } from 'vitest';
|
|
import { cleanup, render } from 'vitest-browser-svelte';
|
|
import { page } from 'vitest/browser';
|
|
import RelationshipPill from './RelationshipPill.svelte';
|
|
|
|
afterEach(cleanup);
|
|
|
|
describe('RelationshipPill', () => {
|
|
it('renders the supplied label', async () => {
|
|
render(RelationshipPill, { props: { label: 'Vater' } });
|
|
|
|
await expect.element(page.getByText('Vater')).toBeVisible();
|
|
});
|
|
|
|
it('renders an empty string label without crashing', async () => {
|
|
render(RelationshipPill, { props: { label: '' } });
|
|
|
|
const span = document.querySelector('span');
|
|
expect(span).not.toBeNull();
|
|
});
|
|
});
|