From 9dadab7ba54966986c9fc96bc23ea17d3cf4caaa Mon Sep 17 00:00:00 2001 From: Anton Lykhoyda Date: Tue, 10 Jan 2023 20:28:31 +0800 Subject: [PATCH] test headless mode --- .github/workflows/main.yml | 2 +- src/setup/playwright.ts | 3 ++- src/setup/puppeteer.ts | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3c915518..958322aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: - name: Install run: yarn --prefer-offline --frozen-lockfile - name: Tests - run: 'xvfb-run --auto-servernum --server-args="-screen 0, 1920x1080x24" yarn run test:${{matrix.automation}}:${{ matrix.mm-version }} --timeout 50000' + run: 'yarn run test:${{matrix.automation}}:${{ matrix.mm-version }} --timeout 50000' - uses: actions/upload-artifact@v3 if: always() with: diff --git a/src/setup/playwright.ts b/src/setup/playwright.ts index fcec21a1..127ce860 100644 --- a/src/setup/playwright.ts +++ b/src/setup/playwright.ts @@ -18,11 +18,12 @@ export async function launchPlaywright( browser = await ( await import("playwright") ).chromium.launchPersistentContext(tmpdir, { - headless: false, + headless: true, args: [ `--disable-extensions-except=${metamaskPath}`, `--load-extension=${metamaskPath}`, ...(options.playwrightOptions?.args || []), + `--headless=chrome`, ], ...(options.playwrightOptions ?? {}), }); diff --git a/src/setup/puppeteer.ts b/src/setup/puppeteer.ts index 80f7520c..acc3a6f3 100644 --- a/src/setup/puppeteer.ts +++ b/src/setup/puppeteer.ts @@ -8,11 +8,12 @@ export async function launchPuppeteer( const pBrowser = await ( await import("puppeteer") ).default.launch({ - headless: false, + headless: true, args: [ `--disable-extensions-except=${metamaskPath}`, `--load-extension=${metamaskPath}`, ...(options.puppeteerOptions?.args || []), + `--headless=chrome`, ], ...(options.puppeteerOptions ?? {}), });