add mobile nav toggle

This commit is contained in:
2024-10-12 00:53:39 -05:00
parent a5780c2f67
commit 5acb6af50a
7 changed files with 86 additions and 7 deletions

20
tests/general.test.ts Normal file
View File

@@ -0,0 +1,20 @@
import { expect, test } from '@playwright/test';
test('page has headline', async ({ page }) => {
await page.goto('/');
const headline = page.locator('header h1');
await expect(headline).toBeVisible();
await expect(headline).toHaveText('resumarkdown');
});
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}`;
}
});