From 1b8138ade00571972c0e9bce77846e8fe4a3446a Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Thu, 16 May 2024 17:55:56 +0200 Subject: [PATCH] Add test screenshot to troubleshoot e2e test --- test/mongo/container.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/mongo/container.spec.ts b/test/mongo/container.spec.ts index baafefbbe..543d64bc7 100644 --- a/test/mongo/container.spec.ts +++ b/test/mongo/container.spec.ts @@ -12,7 +12,7 @@ test("Mongo CRUD", async () => { const token = await getAzureCLICredentialsToken(); page.setDefaultTimeout(50000); - await page.goto(`https://localhost:1234/testExplorer.html?accountName=portal-mongo-runner&token=${token}`); + await page.goto(`https://localhost:1234/testExplorer.html?accountName=languye-mongo&token=${token}`); const explorer = await waitForExplorer(); // Create new database and collection @@ -40,7 +40,9 @@ test("Mongo CRUD", async () => { await explorer.fill('text=* Confirm by typing the collection id >> input[type="text"]', containerId); await explorer.click('[aria-label="OK"]'); await explorer.click(`[data-test="${databaseId}"] [aria-label="More options"]`); + await page.screenshot({ path: "beforeDeleteDatabase.png" }); await explorer.click('button[role="menuitem"]:has-text("Delete Database")'); + await page.screenshot({ path: "afterDeleteDatabase.png" }); await explorer.click('text=* Confirm by typing the database id >> input[type="text"]'); await explorer.fill('text=* Confirm by typing the database id >> input[type="text"]', databaseId); await explorer.click("#sidePanelOkButton");