mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-08 09:12:29 +08:00
- Chat panel tests (interactive elements, iframe) - Settings tests (dark mode, language, draw.io theme) - Save dialog tests (buttons exist) - History dialog tests - Model config tests - Keyboard interaction tests - Upload area tests Total: 15 E2E tests, all passing
21 lines
695 B
TypeScript
21 lines
695 B
TypeScript
import { expect, test } from "@playwright/test"
|
|
|
|
test.describe("History Dialog", () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto("/", { waitUntil: "networkidle" })
|
|
await page
|
|
.locator("iframe")
|
|
.waitFor({ state: "visible", timeout: 30000 })
|
|
})
|
|
|
|
test("history button exists in UI", async ({ page }) => {
|
|
// History button may be disabled initially (no history)
|
|
// Just verify it exists in the DOM
|
|
const historyButton = page
|
|
.locator("button")
|
|
.filter({ has: page.locator("svg") })
|
|
const count = await historyButton.count()
|
|
expect(count).toBeGreaterThan(0)
|
|
})
|
|
})
|