mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-10 10:12:31 +08:00
fix: improve test infrastructure based on PR review
- Fix double build in CI: remove redundant build from playwright webServer - Export chat helpers from shared module for proper unit testing - Replace waitForTimeout with explicit waits in E2E tests - Add data-testid attributes to settings and new chat buttons - Add list reporter for CI to show failures in logs - Add Playwright browser caching to speed up CI - Add vitest coverage configuration - Fix conditional test assertions to use test.skip() instead of silent pass - Remove unused variables flagged by linter
This commit is contained in:
@@ -9,9 +9,7 @@ test.describe("Settings", () => {
|
||||
})
|
||||
|
||||
test("settings dialog opens", async ({ page }) => {
|
||||
const settingsButton = page.locator(
|
||||
'button[aria-label*="settings"], button:has(svg[class*="settings"])',
|
||||
)
|
||||
const settingsButton = page.locator('[data-testid="settings-button"]')
|
||||
await expect(settingsButton).toBeVisible()
|
||||
await settingsButton.click()
|
||||
|
||||
@@ -20,9 +18,7 @@ test.describe("Settings", () => {
|
||||
})
|
||||
|
||||
test("language selection is available", async ({ page }) => {
|
||||
const settingsButton = page.locator(
|
||||
'button[aria-label*="settings"], button:has(svg[class*="settings"])',
|
||||
)
|
||||
const settingsButton = page.locator('[data-testid="settings-button"]')
|
||||
await settingsButton.click()
|
||||
|
||||
const dialog = page.locator('[role="dialog"]')
|
||||
@@ -33,9 +29,7 @@ test.describe("Settings", () => {
|
||||
})
|
||||
|
||||
test("draw.io theme toggle exists", async ({ page }) => {
|
||||
const settingsButton = page.locator(
|
||||
'button[aria-label*="settings"], button:has(svg[class*="settings"])',
|
||||
)
|
||||
const settingsButton = page.locator('[data-testid="settings-button"]')
|
||||
await settingsButton.click()
|
||||
|
||||
const dialog = page.locator('[role="dialog"]')
|
||||
|
||||
Reference in New Issue
Block a user