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:
@@ -1185,6 +1185,7 @@ export default function ChatPanel({
|
||||
status === "streaming" || status === "submitted"
|
||||
}
|
||||
className="hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
data-testid="new-chat-button"
|
||||
>
|
||||
<MessageSquarePlus
|
||||
className={`${isMobile ? "h-4 w-4" : "h-5 w-5"} text-muted-foreground`}
|
||||
@@ -1197,6 +1198,7 @@ export default function ChatPanel({
|
||||
size="icon"
|
||||
onClick={() => setShowSettingsDialog(true)}
|
||||
className="hover:bg-accent"
|
||||
data-testid="settings-button"
|
||||
>
|
||||
<Settings
|
||||
className={`${isMobile ? "h-4 w-4" : "h-5 w-5"} text-muted-foreground`}
|
||||
|
||||
Reference in New Issue
Block a user