From 01412b7f9b9ee58d375c3a9bcefb4d8610923867 Mon Sep 17 00:00:00 2001 From: Samuel SAINT-OMER Date: 2025年8月28日 10:50:29 +0200 Subject: [PATCH 1/2] fix: Reset browser context and state on close --- lib/helper/Playwright.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index dd75a21e3..70b4f6c14 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -1031,7 +1031,10 @@ class Playwright extends Helper { this.frame = null popupStore.clear() if (this.options.recordHar) await this.browserContext.close() + this.browserContext = null await this.browser.close() + this.browser = null + this.isRunning = false } async _evaluateHandeInContext(...args) { From 5fe2b51db208e80fb7b6983e5ba229fb1f216a9f Mon Sep 17 00:00:00 2001 From: Samuel SAINT-OMER Date: 2025年8月28日 14:10:28 +0200 Subject: [PATCH 2/2] test: add acceptance tests --- .github/workflows/playwright.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index de1a0fdf9..77df0d4a8 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -48,7 +48,9 @@ jobs: run: './bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug' - name: run chromium with restart==browser tests run: 'BROWSER_RESTART=browser ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug' - - name: run chromium with restart==session tests + - name: run chromium with restart==session tests on 2 workers split by pool + run: 'BROWSER_RESTART=session ./bin/codecept.js run-workers 2 -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug --by=pool' + - name: run chromium with restart==session tests and run: 'BROWSER_RESTART=session ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug' - name: run firefox tests run: 'BROWSER=firefox node ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug'

AltStyle によって変換されたページ (->オリジナル) /