mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +00:00
fix: add retry mechanisms to context test helpers for flaky test stability
Update waitForContextFile, selectContextFile, and waitForFileContentToLoad helpers to use Playwright's expect().toPass() with retry intervals, handling race conditions between API calls completing and UI re-rendering. Also add waitForNetworkIdle after dialog closes in context-file-management test.
This commit is contained in:
@@ -50,7 +50,8 @@ test.describe('Context File Management', () => {
|
||||
{ timeout: 5000 }
|
||||
);
|
||||
|
||||
await waitForContextFile(page, 'test-context.md', 10000);
|
||||
await waitForNetworkIdle(page);
|
||||
await waitForContextFile(page, 'test-context.md');
|
||||
|
||||
const fileButton = await getByTestId(page, 'context-file-test-context.md');
|
||||
await expect(fileButton).toBeVisible();
|
||||
|
||||
@@ -53,7 +53,7 @@ test.describe('Delete Context File', () => {
|
||||
);
|
||||
|
||||
// Wait for the file to appear in the list
|
||||
await waitForContextFile(page, fileName, 10000);
|
||||
await waitForContextFile(page, fileName);
|
||||
|
||||
// Select the file
|
||||
await selectContextFile(page, fileName);
|
||||
|
||||
Reference in New Issue
Block a user