Files
react-navigation/example/e2e/__integration_tests__/index.test.tsx
2020-06-24 20:07:32 +02:00

15 lines
407 B
TypeScript

import { page } from '../config/setup-playwright';
it('loads the example app', async () => {
const snapshot = await page.accessibility.snapshot();
expect(
(snapshot?.children as Record<string, unknown>[])?.find(
(it) => it.role === 'heading'
)?.name
).toBe('Examples');
const title = await page.$eval('[role=heading]', (el) => el.textContent);
expect(title).toBe('Examples');
});