guanghu/e2e/app.spec.ts
冰朔 8739805f99
Some checks failed
Auto-update PR branches / Update open PR branches (push) Has been cancelled
CI / Frontend Static Quality Checks (push) Has been cancelled
CI / Frontend Tests & Coverage (push) Has been cancelled
CI / Rust Tests & Quality Checks (push) Has been cancelled
CI / Linux build verification (push) Has been cancelled
Release (Alpha) / Compute alpha version (push) Has been cancelled
Release (Alpha) / Build release artifacts (push) Has been cancelled
Release (Alpha) / GitHub Release (alpha) (push) Has been cancelled
Release (Alpha) / Update docs and release pages (push) Has been cancelled
Deploy docs / Build VitePress site (push) Has been cancelled
Deploy docs / Deploy to GitHub Pages (push) Has been cancelled
光湖开源源码快照 · Tolaria AGPL 分叉基线 · 独立更新链
2026-07-05 17:45:16 +08:00

28 lines
1.4 KiB
TypeScript

import { test, expect } from '@playwright/test'
test('app loads with four-panel layout', async ({ page }) => {
await page.goto('/')
// Verify the four panels are present
await expect(page.locator('.sidebar')).toBeVisible()
await expect(page.locator('.note-list')).toBeVisible()
await expect(page.locator('.editor')).toBeVisible()
await expect(page.locator('.inspector')).toBeVisible()
})
test('sidebar shows filters and section groups', async ({ page }) => {
await page.goto('/')
await page.waitForTimeout(500) // Wait for mock data
await expect(page.getByRole('heading', { name: 'Laputa' })).toBeVisible()
// Filters
await expect(page.locator('.sidebar__filter-item').filter({ hasText: 'All Notes' })).toBeVisible()
await expect(page.locator('.sidebar__filter-item').filter({ hasText: 'People' })).toBeVisible()
await expect(page.locator('.sidebar__filter-item').filter({ hasText: 'Events' })).toBeVisible()
// Section groups (use exact match to avoid collision with note list pills)
await expect(page.locator('.sidebar__section-label', { hasText: 'PROJECTS' })).toBeVisible()
await expect(page.locator('.sidebar__section-label', { hasText: 'EXPERIMENTS' })).toBeVisible()
await expect(page.locator('.sidebar__section-label', { hasText: 'RESPONSIBILITIES' })).toBeVisible()
await expect(page.locator('.sidebar__section-label', { hasText: 'PROCEDURES' })).toBeVisible()
})