Skip to content

Commit

Permalink
ci: enable e2e headless when ci
Browse files Browse the repository at this point in the history
  • Loading branch information
enpitsuLin committed Apr 21, 2024
1 parent 28fe39d commit 07aa804
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions e2e/fixtures.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import path from 'node:path'
import type { BrowserContext, Page } from '@playwright/test'
import type { BrowserContext } from '@playwright/test'
import { test as base, chromium } from '@playwright/test'
import { PopupPage } from './pages/popup'
import { OptionsPage } from './pages/options'
import { PopupPage } from './pages/popup'

const pathToExtension = path.resolve('.output/chrome-mv3')

Expand All @@ -16,7 +16,8 @@ export const test = base.extend<{
// eslint-disable-next-line no-empty-pattern
context: async ({ }, use) => {
const context = await chromium.launchPersistentContext('', {
headless: false,
// eslint-disable-next-line node/prefer-global/process
headless: !!process.env.CI,
args: [
`--disable-extensions-except=${pathToExtension}`,
`--load-extension=${pathToExtension}`,
Expand Down

0 comments on commit 07aa804

Please sign in to comment.