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
|
|
|
|
|
|
|
test('page has nav tree', async ({ page }) => {
|
|
|
|
await page.goto('/');
|
|
|
|
await expect(page.locator('nav')).toBeVisible();
|
|
|
|
});
|
2024-10-11 21:25:58 -05:00
|
|
|
|
|
|
|
test('nav items work', async ({ page }) => {
|
|
|
|
await page.goto('/');
|
|
|
|
let lastPane = '#pane-preview';
|
|
|
|
for (const pane of ['content', 'style', 'preview']) {
|
|
|
|
const currentPaneId = `pane-${pane}`;
|
|
|
|
await page.locator(`nav li[aria-controls="${currentPaneId}"]`).click();
|
|
|
|
await expect(page.locator(`#${currentPaneId}`)).toBeVisible();
|
|
|
|
await expect(page.locator(lastPane)).toBeHidden();
|
|
|
|
lastPane = `#${currentPaneId}`;
|
|
|
|
}
|
|
|
|
});
|