import { describe, it, expect, afterEach } from 'vitest';
import { cleanup, render } from 'vitest-browser-svelte';
import { page } from 'vitest/browser';
import PersonsEmptyState from './PersonsEmptyState.svelte';

afterEach(cleanup);

describe('PersonsEmptyState', () => {
	it('renders the empty heading and explanation text', async () => {
		render(PersonsEmptyState, { props: {} });

		await expect.element(page.getByText('Keine Personen gefunden.')).toBeVisible();
		await expect.element(page.getByText('Versuchen Sie einen anderen Suchbegriff.')).toBeVisible();
	});
});
