Browse Source

feat(testing): Improved dev support for webstorm

pull/3848/head
Muhammed Mustafa 2 years ago
parent
commit
8cbc3b2584
  1. 2
      scripts/playwright/package.json
  2. 11
      scripts/playwright/startPlayWrightServer.sh

2
scripts/playwright/package.json

@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "npx playwright test --workers=4",
"test-debug": "PWDEBUG=console npx playwright test -c playwright.config.ts test --headed --project=chromium --repeat-each 1 --retries 0 --timeout 0 --workers 1 --max-failures=1",
"test-debug": "./startPlayWrightServer.sh; PW_TEST_REUSE_CONTEXT=1 PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:3010/ npx playwright test -c playwright.config.ts --headed --project=chromium --repeat-each 1 --retries 0 --timeout 0 --workers 1 --max-failures=1",
"ci-test-mysql": "E2E_TYPE=mysql npx playwright test --workers=2"
},
"keywords": [],

11
scripts/playwright/startPlayWrightServer.sh

@ -0,0 +1,11 @@
# Run server if its not running
if ! curl --output /dev/null --silent --head --fail http://localhost:3010
then
echo "Starting PlayWright Server"
npx playwright run-server --reuse-browser --port 3010 &
# Wait for server to start
while ! curl --output /dev/null --silent --head --fail http://localhost:3010; do
sleep 0.2
done
fi
Loading…
Cancel
Save