From 7bfad0a14f47df5435076c7678d2e3f58f851f17 Mon Sep 17 00:00:00 2001 From: Frank Thomsen Date: Thu, 30 Nov 2023 19:07:31 +0100 Subject: [PATCH] change playwright tests --- .github/workflows/playwright.yml | 4 +++- playwright.config.js | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index fd7fec3..384e7fd 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,4 +1,6 @@ name: Playwright Tests +on: + workflow_dispatch jobs: test: timeout-minutes: 60 @@ -19,4 +21,4 @@ jobs: with: name: playwright-report path: playwright-report/ - retention-days: 30 + retention-days: 10 diff --git a/playwright.config.js b/playwright.config.js index 7725f94..43e50c7 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -32,13 +32,13 @@ const config = { /* 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 ? 'dot' : 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ actionTimeout: 0, /* Base URL to use in actions like `await page.goto('/')`. */ - // baseURL: 'http://localhost:3000', + baseURL: process.env.CI ? 'https://sdfidk.github.io/okapi/' : 'localhost:7777', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', @@ -100,10 +100,12 @@ const config = { // outputDir: 'test-results/', /* Run your local dev server before starting the tests */ + /* webServer: { command: 'npm run start', port: 7777, } + */ }; module.exports = config;