mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-10 02:02:31 +08:00
fix: improve E2E test assertions and remove silent skips
- Replace silent test.skip() with explicit conditional skips - Add actual persistence assertion after page reload - Use data-testid selector for new chat button test
This commit is contained in:
@@ -73,8 +73,13 @@ test.describe("File Upload", () => {
|
||||
const removeButton = page.locator(
|
||||
'[data-testid="remove-file-button"], button[aria-label*="Remove"], button:has(svg.lucide-x)',
|
||||
)
|
||||
|
||||
// Remove button feature may not exist in all versions - skip if not available
|
||||
const removeButtonCount = await removeButton.count()
|
||||
test.skip(removeButtonCount === 0, "Remove file button not available")
|
||||
if (removeButtonCount === 0) {
|
||||
test.skip()
|
||||
return
|
||||
}
|
||||
|
||||
await removeButton.first().click()
|
||||
// Verify button is gone or file preview is removed
|
||||
|
||||
Reference in New Issue
Block a user