Files
react-navigation/example/e2e/__integration_tests__/index.test.tsx
2020-04-27 17:45:20 +02:00

14 lines
380 B
TypeScript

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