Skip to content

Commit

Permalink
fix: browser type detection (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
devpow112 authored Feb 2, 2024
1 parent 0f00b2b commit c587849
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/reporters/playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ const getRootParent = (test) => {
const getBrowserType = (project) => {
// won't work for merge-reports workflow, all information under `use` will be undefined
// hopefully get something included as part of https://github.com/microsoft/playwright/issues/29174
const { use: { browserName, defaultBrowserType }, metadata: { browserType } } = project;
const {
use: { browserName, defaultBrowserType } = {},
metadata: { browserType } = {}
} = project;

if (browserType) {
return browserType;
Expand Down
7 changes: 2 additions & 5 deletions test/integration/data/config/playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ export default defineConfig({
fullyParallel: true,
testDir: '../',
testMatch: 'playwright-*.test.js',
use: deviceTypeChrome,
projects: [{
name: 'chromium',
use: deviceTypeChrome,
metadata: {
browserType: deviceTypeChrome.defaultBrowserType
}
name: 'chromium'
}, {
name: 'firefox',
testMatch: 'playwright-2.test.js',
Expand Down

0 comments on commit c587849

Please sign in to comment.