Skip to content

Commit

Permalink
updated the way playwright server started
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik committed Sep 18, 2024
1 parent 97be52c commit 90e650d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/webdriver-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install NPM dependencies
- name: Install dependencies
run: npm i

- name: Install Playwright Browsers
Expand All @@ -42,6 +42,8 @@ jobs:
- name: Start dev server
run: php -S 127.0.0.1:8000 -t tests/data/app >/dev/null 2>&1 &

- name: Start playwright proxy server
run: node server.js >/dev/null 2>&1 &
- name: Tests
run: php ./vendor/bin/codecept run

Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"post-install-cmd": [
"npm install codeception-module-playwright"
],
"post-update-cmd": [
"npm install codeception-module-playwright"
]
},
"bin": {
"codeception-module-playwright": "./server.js"
},

"keywords": [],
"author": "",
"license": "ISC",
Expand Down
2 changes: 1 addition & 1 deletion src/Playwright.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Playwright extends Module
public function _initialize()
{
if ($this->config['pw_start']) {
$process = new Process(['npx', self::NPM_PACKAGE]);
$process = new Process(['npx', '-y', self::NPM_PACKAGE]);
$process->start();

sleep(2);
Expand Down

0 comments on commit 90e650d

Please sign in to comment.