From 697a5e4f0147d90903f08c87203df3f9b4b64d1f Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 24 Sep 2024 13:48:20 +0200 Subject: [PATCH] DRY out WP_BASE_URL definition into package.json --- .github/workflows/wordpress-org-screenshots.yml | 6 ++---- package.json | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/wordpress-org-screenshots.yml b/.github/workflows/wordpress-org-screenshots.yml index 3a7fed2a2..c0b7b2000 100644 --- a/.github/workflows/wordpress-org-screenshots.yml +++ b/.github/workflows/wordpress-org-screenshots.yml @@ -146,8 +146,7 @@ jobs: npm run playground -- --blueprint=./localized_blueprint.json & \ sleep 60 && \ echo 'Playground is ready now, lets take some pictures.' && \ - WP_BASE_URL='http://127.0.0.1:9400/' \ - DEBUG=pw:api,pw:webserver \ + # DEBUG=pw:api,pw:webserver \ npm run screenshots:wporg - name: Updating the Screenshots @@ -166,8 +165,7 @@ jobs: npm run playground -- --blueprint=./localized_blueprint.json & \ sleep 60 && \ echo 'Playground is ready now, lets take some pictures.' && \ - WP_BASE_URL='http://127.0.0.1:9400/' \ - DEBUG=pw:api,pw:webserver \ + # DEBUG=pw:api,pw:webserver \ npm run screenshots:wporg -- --update-snapshots - name: Commit updated screenshots diff --git a/package.json b/package.json index d26830733..824b52dc6 100644 --- a/package.json +++ b/package.json @@ -84,9 +84,9 @@ "packages-update": "wp-scripts packages-update", "plugin-zip": "wp-scripts plugin-zip", "start": "wp-scripts start", - "screenshots:wporg": "wp-scripts test-playwright --config .github/scripts/wordpress-org-screenshots/playwright.config.ts", - "screenshots:wporg:debug": "wp-scripts test-playwright --config .github/scripts/wordpress-org-screenshots/playwright.config.ts --debug", - "screenshots:wporg:ui": "wp-scripts test-playwright --config .github/scripts/wordpress-org-screenshots/playwright.config.ts --ui", + "screenshots:wporg": "WP_BASE_URL='http://127.0.0.1:9400/' wp-scripts test-playwright --config .github/scripts/wordpress-org-screenshots/playwright.config.ts", + "screenshots:wporg:debug": "npm run screenshots:wporg -- --debug", + "screenshots:wporg:ui": "npm run screenshots:wporg -- --ui", "test:e2e": "playwright test --config=playwright.config.js", "test:unit:js": "wp-scripts test-unit-js --coverage --testResultsProcessor=jest-sonar-reporter", "pretest:unit:php": "wp-env start --xdebug",