Files
next-ai-draw-io/tests/e2e/model-config.spec.ts
dayuan.jiang f415d457d8 test: fix E2E test issues from review
Fixes based on Gemini and Codex review:
- Remove brittle nth(1) selector in keyboard tests
- Remove waitForTimeout(500) race condition
- Remove if(isVisible) silent skip patterns
- Add proper assertions instead of no-op checks
- Remove expect(count >= 0) that always passes
- Remove unused hasProviderUI variable

All 14 E2E tests and 39 unit tests pass.
2026-01-04 19:58:48 +09:00

30 lines
997 B
TypeScript

import { expect, test } from "@playwright/test"
test.describe("Model Configuration", () => {
test.beforeEach(async ({ page }) => {
await page.goto("/", { waitUntil: "networkidle" })
await page
.locator("iframe")
.waitFor({ state: "visible", timeout: 30000 })
})
test("settings dialog opens and shows configuration options", async ({
page,
}) => {
// Open settings
const settingsButton = page.locator(
'button[aria-label*="settings"], button:has(svg[class*="settings"])',
)
await expect(settingsButton).toBeVisible()
await settingsButton.click()
const dialog = page.locator('[role="dialog"]')
await expect(dialog).toBeVisible({ timeout: 5000 })
// Settings dialog should have some configuration UI
const buttons = dialog.locator("button")
const buttonCount = await buttons.count()
expect(buttonCount).toBeGreaterThan(0)
})
})