mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
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:
@@ -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 });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user