mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-10 02:02:31 +08:00
27 lines
851 B
TypeScript
27 lines
851 B
TypeScript
|
|
import { expect, test } from "@playwright/test"
|
||
|
|
|
||
|
|
test.describe("Chat Panel", () => {
|
||
|
|
test.beforeEach(async ({ page }) => {
|
||
|
|
await page.goto("/", { waitUntil: "networkidle" })
|
||
|
|
await page
|
||
|
|
.locator("iframe")
|
||
|
|
.waitFor({ state: "visible", timeout: 30000 })
|
||
|
|
})
|
||
|
|
|
||
|
|
test("page has interactive elements", async ({ page }) => {
|
||
|
|
// Verify buttons exist (settings, etc.)
|
||
|
|
const buttons = page.locator("button")
|
||
|
|
const count = await buttons.count()
|
||
|
|
expect(count).toBeGreaterThan(0)
|
||
|
|
})
|
||
|
|
|
||
|
|
test("draw.io iframe is interactive", async ({ page }) => {
|
||
|
|
const iframe = page.locator("iframe")
|
||
|
|
await expect(iframe).toBeVisible()
|
||
|
|
|
||
|
|
// Iframe should have loaded draw.io
|
||
|
|
const src = await iframe.getAttribute("src")
|
||
|
|
expect(src).toBeTruthy()
|
||
|
|
})
|
||
|
|
})
|