add mobile nav toggle
This commit is contained in:
20
tests/general.test.ts
Normal file
20
tests/general.test.ts
Normal 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}`;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user