From 7eecfa28c5e19ce66db6419f86b6d3548447f9da Mon Sep 17 00:00:00 2001 From: Asier Isayas Date: Fri, 23 Jan 2026 13:25:35 -0800 Subject: [PATCH] wait for results to attach --- test/mongo/document.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/mongo/document.spec.ts b/test/mongo/document.spec.ts index 956eb747f..9643ca868 100644 --- a/test/mongo/document.spec.ts +++ b/test/mongo/document.spec.ts @@ -56,7 +56,8 @@ for (const { name, databaseId, containerId, documents } of documentTestCases) { await expect(span).toBeVisible(); await span.click(); - await page.waitForTimeout(5000); // wait for 5 seconds to ensure document is fully loaded + await expect(documentsTab.resultsEditor.locator).toBeAttached({ timeout: 60 * 1000 }); + // await page.waitForTimeout(5000); // wait for 5 seconds to ensure document is fully loaded. waitforTimeout is not recommended generally but here we are working around flakiness in the test env let newDocumentId; let retryCount = 0; await retry(async () => {