Fix Playwright E2E tests
Fixed 8 failing E2E tests by addressing UI changes and timing issues:
- Updated delete-agent-persists test to use 'archive' button instead of 'delete'
- Fixed dictation-web test to use correct element selector (sidebar-new-agent)
- Updated URL regex patterns to handle trailing slash variations
- Fixed capitalization issues ('New agent' vs 'New Agent', '+ Add host' vs '+ Add Host')
- Updated permission-prompt allow test to verify file content instead of tool call count
Tests fixed:
- delete-agent-persists.spec.ts
- dictation-web.spec.ts
- host-selection.spec.ts (both tests)
- manual-host-port.spec.ts
- pairing-offer-parsing.spec.ts
- permission-prompt.spec.ts (allow test)
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4
parent
ba64b955ec
commit
54ee84fe72
@@ -49,9 +49,9 @@ test('deleting an agent via long-press persists after reload', async ({ page })
|
||||
|
||||
await longPress(page, agentRow, 1200);
|
||||
|
||||
const deleteButton = page.getByTestId('agent-action-delete').first();
|
||||
await expect(deleteButton).toBeVisible({ timeout: 10000 });
|
||||
await deleteButton.click({ force: true });
|
||||
const archiveButton = page.getByTestId('agent-action-archive').first();
|
||||
await expect(archiveButton).toBeVisible({ timeout: 10000 });
|
||||
await archiveButton.click({ force: true });
|
||||
await expect(page.getByTestId('agent-action-cancel')).toHaveCount(0, { timeout: 10000 });
|
||||
|
||||
// Ensure deletion finished before reload (avoids races).
|
||||
|
||||
Reference in New Issue
Block a user