From 024f26c5e725c5a8c59f41110f01e212b7872285 Mon Sep 17 00:00:00 2001 From: Benny Daon Date: Tue, 10 Sep 2024 10:53:56 +0300 Subject: [PATCH] Adding a screenshot to a failing test --- aatp/common/utils.ts | 2 +- aatp/ui/ui.spec.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/aatp/common/utils.ts b/aatp/common/utils.ts index 31872897..3e031d47 100644 --- a/aatp/common/utils.ts +++ b/aatp/common/utils.ts @@ -36,7 +36,7 @@ export async function getTWRBuffer(page) { return ret.trimEnd() }) ret = ret.substring(checkedC) - console.log("TWR: ", ret) + console.log(`TWR.substring(${checkedC}):`, ret) checkedC = ret.length return ret } diff --git a/aatp/ui/ui.spec.ts b/aatp/ui/ui.spec.ts index fc23f611..f19ff2d2 100644 --- a/aatp/ui/ui.spec.ts +++ b/aatp/ui/ui.spec.ts @@ -232,6 +232,8 @@ insecure=true`) await expect(page.locator('#t0')).toBeHidden() await expect(page.locator('.pane')).toHaveCount(1) await expect(page.locator('.windows-container')).toBeVisible() + await sleep(100) + await page.screenshot({path: '/result/connection_reseted.png'}) await waitForTWROutput(page, /foo:.* over WebRTC/, 2000) }) test('how a gate handles disconnect', async() => {