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:
Tony Nekola
2025-12-27 13:08:47 +02:00
parent b60e8f0392
commit b65fccbcf7
3 changed files with 27 additions and 22 deletions

View File

@@ -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();