// @vitest-environment jsdom import { cleanup, render, screen } from '@testing-library/react'; import { afterEach, expect, it } from 'vitest'; import { PhotoGuide } from './PhotoGuide'; import { en } from '../i18n/en'; import { it as italian } from '../i18n/it'; afterEach(cleanup); it.each([en, italian])('shows every localized check, bad example and timer tip', translations => { const t = translations.upload.guide; const { container } = render(); expect(screen.getAllByRole('listitem')).toHaveLength(5); for (const check of t.checks) { expect(screen.getByText(check.title)).toBeDefined(); expect(screen.getByText(check.detail)).toBeDefined(); } for (const label of t.avoid) expect(screen.getByText(label)).toBeDefined(); expect(screen.getByText(t.tip)).toBeDefined(); expect(container.querySelectorAll('.aisthetix-guide-grid .aisthetix-guide-scene')).toHaveLength(5); expect(container.querySelector('img, video, [class*="outline"]')).toBeNull(); });