From 806c79cf52897b9fa58ed6119d698d5a390b3659 Mon Sep 17 00:00:00 2001 From: Marc Dumais Date: Wed, 31 Jan 2024 18:52:40 -0500 Subject: [PATCH 1/2] [CI] Use 'list' Playwright reporter When running the tests locally, the current 'html' reporter is fine. But I've been confused with it in CI logs where there was a failure, presumably a silent retry and finally a report of the tests passing. I think in CI we would have more clarity with an alternate reporter. Let's try 'list'. If it does not work well we can fall-back on the simple 'dot'. Signed-off-by: Marc Dumais --- playwright.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright.config.ts b/playwright.config.ts index c37c20e5..6f02050a 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -14,7 +14,7 @@ export default defineConfig({ /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'html', + reporter: process.env.CI ? 'list' : 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ From cbc61fdb61dfb209b0412841cd4907636d81ebcd Mon Sep 17 00:00:00 2001 From: Marc Dumais Date: Thu, 1 Feb 2024 09:27:36 -0500 Subject: [PATCH 2/2] [CI] Use a slightly longer timeout for UI tests Timeouts with the default, rather short 5000ms timeout can be observed semi-regularly. Signed-off-by: Marc Dumais --- vscode-trace-extension/src/test/extension-test.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vscode-trace-extension/src/test/extension-test.spec.ts b/vscode-trace-extension/src/test/extension-test.spec.ts index df2d714d..d39ea7f8 100644 --- a/vscode-trace-extension/src/test/extension-test.spec.ts +++ b/vscode-trace-extension/src/test/extension-test.spec.ts @@ -1,6 +1,9 @@ import { test, expect } from '@playwright/test'; -test.beforeEach(async ({ page }) => { +const timeout = 10000; + +test.beforeEach(async ({ page }, testInfo) => { + testInfo.timeout = timeout; await page.goto('http://localhost:3000'); await page.getByRole('tab', { name: 'Welcome, preview' }).getByRole('button', { name: /Close/ }).click(); await page.getByRole('button', { name: 'Never' }).click();