Skip to content

Commit ae72295

Browse files
committed
set browser headless everywhere
1 parent 2d0f0c1 commit ae72295

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: npx playwright install --with-deps
2828

2929
- name: Run Cucumber tests
30-
run: npx cucumber-js --tags "@addToCart"
30+
run: npx cucumber-js --tags "@registration"
3131

3232
- uses: actions/upload-artifact@v4
3333
if: ${{ !cancelled() }}

playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export default defineConfig({
3030

3131
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
3232
trace: "on-first-retry",
33-
headless: process.env.CI ? true : false,
33+
//headless: process.env.CI ? true : false,
34+
headless: true,
3435
screenshot: "only-on-failure",
3536
// viewport: null,
3637
// launchOptions: {

tests/hooks/hooks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import { CustomWorld } from "../support/world";
66
setDefaultTimeout(60 * 1000);
77

88
Before(async function (this: CustomWorld) {
9-
const isCI = process.env.CI === "true";
9+
//const isCI = process.env.CI === "true";
1010

1111
// Launch a browser and new page for each scenario
12-
const browser = await chromium.launch({ headless: isCI ? true : false }); // Launch browser in headless mode in CI, headed mode locally
12+
//const browser = await chromium.launch({ headless: isCI ? true : false }); // Launch browser in headless mode in CI, headed mode locally
13+
const browser = await chromium.launch({ headless: true });
1314
const page = await browser.newPage();
1415

1516
// Attach to World so step defs can access via this.browser / this.page
@@ -23,4 +24,3 @@ After(async function (this: CustomWorld) {
2324
if (this.page) await this.page.close();
2425
if (this.browser) await this.browser.close();
2526
});
26-

0 commit comments

Comments
 (0)