Skip to content

Commit

Permalink
utils.js: try different approach to running WebKit
Browse files Browse the repository at this point in the history
... and removed unused `device` definition, should've been removed in the previous commit
  • Loading branch information
mrienstra committed May 14, 2022
1 parent 89a7462 commit 0f66814
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions packages/kit/test/utils.js
@@ -1,7 +1,7 @@
import fs from 'fs';
import http from 'http';
import * as ports from 'port-authority';
import { test as base, devices } from '@playwright/test';
import { test as base } from '@playwright/test';

export const test = base.extend({
// @ts-expect-error
Expand Down Expand Up @@ -136,13 +136,6 @@ export const test = base.extend({
}
});

const useDesktopChrome = {
browserName: 'chromium',
// use stable chrome from host OS instead of downloading one
// see https://playwright.dev/docs/browsers#google-chrome--microsoft-edge
channel: 'chrome'
};

/** @type {import('@playwright/test').PlaywrightTestConfig} */
export const config = {
forbidOnly: !!process.env.CI,
Expand All @@ -157,14 +150,12 @@ export const config = {
{
name: `${process.env.DEV ? 'dev' : 'build'}+js_chrome`,
use: {
use: useDesktopChrome,
javaScriptEnabled: true
}
},
{
name: `${process.env.DEV ? 'dev' : 'build'}-js_chrome`,
use: {
use: useDesktopChrome,
javaScriptEnabled: false
}
},
Expand All @@ -185,6 +176,9 @@ export const config = {
],
use: {
screenshot: 'only-on-failure',
// use stable chrome from host OS instead of downloading one
// see https://playwright.dev/docs/browsers#google-chrome--microsoft-edge
channel: 'chrome',
trace: 'retain-on-failure'
},
workers: process.env.CI ? 2 : undefined
Expand Down

0 comments on commit 0f66814

Please sign in to comment.