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:
dayuan.jiang
2026-01-04 23:05:31 +09:00
parent d517268dbe
commit 948cc4666d
3 changed files with 34 additions and 17 deletions

View File

@@ -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