1
0
resumarkdown/tests/general.test.ts

18 lines
509 B
TypeScript
Raw Normal View History

2024-10-10 21:02:54 -05:00
import { expect, test } from '@playwright/test';
2024-10-11 00:03:49 -05:00
test('page has headline', async ({ page }) => {
2024-10-10 21:02:54 -05:00
await page.goto('/');
2024-10-11 00:03:49 -05:00
const headline = page.locator('header h1');
await expect(headline).toBeVisible();
await expect(headline).toHaveText('resumarkdown');
2024-10-10 21:02:54 -05:00
});
2024-10-11 00:23:32 -05:00
2024-10-11 21:25:58 -05:00
test('nav items work', async ({ page }) => {
await page.goto('/');
2024-10-12 01:50:08 -05:00
for (const tab of await page.getByRole('tab').all()) {
await tab.click();
await expect(page.getByTestId(`${await tab.textContent()}-pane`)).toBeVisible();
2024-10-11 21:25:58 -05:00
}
});