fix: enhance test stability and error handling for worktree operations

- Updated feature lifecycle tests to ensure the correct modal close button is selected, improving test reliability.
- Refactored worktree integration tests for better readability and maintainability by formatting function calls and assertions.
- Introduced error handling improvements in the server routes to suppress unnecessary ENOENT logs for optional files, reducing noise in test outputs.
- Enhanced logging for worktree errors to conditionally suppress expected errors in test environments, improving clarity in error reporting.
This commit is contained in:
Cody Seibert
2025-12-16 18:44:52 -05:00
parent ebc99d06eb
commit 360b7ebe08
6 changed files with 320 additions and 80 deletions

View File

@@ -250,8 +250,8 @@ test.describe("Feature Lifecycle Tests", () => {
// Wait for the restore action to complete
await page.waitForTimeout(1000);
// Close the modal
const closeButton = completedModal.locator('button:has-text("Close")');
// Close the modal - use first() to select the footer Close button, not the X button
const closeButton = completedModal.locator('button:has-text("Close")').first();
await closeButton.click();
await expect(completedModal).not.toBeVisible({ timeout: 5000 });