diff --git a/_tests/custom_tests/tests/RunE2ETest.php b/_tests/custom_tests/tests/RunE2ETest.php index c51e35e8..e5534cc8 100644 --- a/_tests/custom_tests/tests/RunE2ETest.php +++ b/_tests/custom_tests/tests/RunE2ETest.php @@ -163,7 +163,7 @@ public function test_run_with_snapshot() { if ( $return_var === 0 ) { // Modify the image using ImageMagick's convert command $image_path = $scaffolded_dir . '/__snapshots__/activate-theme.spec.js/home.png'; - exec( "magick convert $image_path -gravity southeast -stroke '#000C' -strokewidth 2 -annotate 0 'Watermark' -stroke none -fill white -annotate 0 'Watermark' $image_path" ); + exec( "magick $image_path -gravity southeast -stroke '#000C' -strokewidth 2 -annotate 0 'Watermark' -stroke none -fill white -annotate 0 'Watermark' $image_path" ); // Run the third time to check for snapshot failure. $output = qit( [ diff --git a/_tests/custom_tests/tests/Traits/SnapshotHelpers.php b/_tests/custom_tests/tests/Traits/SnapshotHelpers.php index 1cd9965f..83abf955 100644 --- a/_tests/custom_tests/tests/Traits/SnapshotHelpers.php +++ b/_tests/custom_tests/tests/Traits/SnapshotHelpers.php @@ -42,6 +42,11 @@ public function assertMatchesNormalizedSnapshot( string $actual, ?\Spatie\Snapsh continue; } + // Skip empty lines. + if ( trim( $line ) === '' ) { + continue; + } + /* * Skip docker pull output. */ diff --git a/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_multiple_tags_and_multiple_plugins_with_multiple_tags__1.txt b/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_multiple_tags_and_multiple_plugins_with_multiple_tags__1.txt index 56e8717d..15cf6c63 100644 --- a/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_multiple_tags_and_multiple_plugins_with_multiple_tags__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_multiple_tags_and_multiple_plugins_with_multiple_tags__1.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping woocommerce /qit/tests/e2e/woocommerce/self-test-multiple-test-tags/bootstrap/bootstrap.php Bootstrapping woocommerce /qit/tests/e2e/woocommerce/self-test-multiple-test-tags/bootstrap/bootstrap.sh @@ -30,12 +29,7 @@ Running 7 tests using 1 worker 7 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_activate_additional__1.txt b/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_activate_additional__1.txt index 2715c2bc..166eedee 100644 --- a/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_activate_additional__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_activate_additional__1.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping woocommerce-amazon-s3-storage /qit/tests/e2e/woocommerce-amazon-s3-storage/local/bootstrap/bootstrap.php Bootstrapping woocommerce-amazon-s3-storage /qit/tests/e2e/woocommerce-amazon-s3-storage/local/bootstrap/bootstrap.sh @@ -14,12 +13,7 @@ Running 1 test using 1 worker 1 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_bootstrap_additional__1.txt b/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_bootstrap_additional__1.txt index a078221e..1d9619ae 100644 --- a/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_bootstrap_additional__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_bootstrap_additional__1.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping woocommerce /qit/tests/e2e/woocommerce/self-test-bootstrap-additional/bootstrap/bootstrap.php Bootstrapping woocommerce /qit/tests/e2e/woocommerce/self-test-bootstrap-additional/bootstrap/bootstrap.sh @@ -17,12 +16,7 @@ Running 1 test using 1 worker 1 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_test_additional__1.txt b/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_test_additional__1.txt index e9866898..4d466950 100644 --- a/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_test_additional__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/CompatibilityTest__test_sut_and_test_additional__1.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping woocommerce /qit/tests/e2e/woocommerce/self-test-sut-and-test-additional/bootstrap/bootstrap.php Bootstrapping woocommerce /qit/tests/e2e/woocommerce/self-test-sut-and-test-additional/bootstrap/bootstrap.sh @@ -20,12 +19,7 @@ Running 3 tests using 1 worker 3 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up__1.txt b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up__1.txt index 77c4c95e..6c79f26a 100644 --- a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up__1.txt @@ -1,9 +1,7 @@ -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... - [OK] Temporary test environment created. (ENV_ID) - * URL: http://localhost:PORT * Admin URL: http://localhost:PORT/wp-admin * Admin Credentials: admin/password @@ -11,8 +9,5 @@ Activating plugins... * WordPress Version: NORMALIZED * Redis Object Cache? No * Path: QIT_HOME/temporary-envs/e2e-ENV_ID/ - To see additional info, run with the "--verbose" flag. - http://localhost:PORT - diff --git a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_php_extensions__1.txt b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_php_extensions__1.txt index 48e8c356..3f310cfd 100644 --- a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_php_extensions__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_php_extensions__1.txt @@ -1,2 +1 @@ gd - diff --git a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_themes__1.txt b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_themes__1.txt index 5a815931..d36cfb58 100644 --- a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_themes__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_themes__1.txt @@ -1,8 +1,6 @@ Field Value name Storefront status inactive - Field Value name Twenty Seventeen status inactive - diff --git a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_volumes__1.txt b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_volumes__1.txt index 7b2603df..65210867 100644 --- a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_volumes__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_with_additional_volumes__1.txt @@ -5,4 +5,3 @@ author version 1.0 description A temporary plugin for testing. status active - diff --git a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_woocommerce_stable_version__1.txt b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_woocommerce_stable_version__1.txt index 8ec9371b..b5666e0d 100644 --- a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_woocommerce_stable_version__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_woocommerce_stable_version__1.txt @@ -1,2 +1 @@ Success: Plugin already updated. - diff --git a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_woocommerce_stable_version_alternative_syntax__1.txt b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_woocommerce_stable_version_alternative_syntax__1.txt index 8ec9371b..b5666e0d 100644 --- a/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_woocommerce_stable_version_alternative_syntax__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/EnvTest__test_env_up_woocommerce_stable_version_alternative_syntax__1.txt @@ -1,2 +1 @@ Success: Plugin already updated. - diff --git a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_can_use_equal_signs__1.txt b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_can_use_equal_signs__1.txt index 149474d4..52205e76 100644 --- a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_can_use_equal_signs__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_can_use_equal_signs__1.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping woocommerce /qit/tests/e2e/woocommerce/default/bootstrap/bootstrap.sh Bootstrapping woocommerce-amazon-s3-storage /qit/tests/e2e/woocommerce-amazon-s3-storage/local/bootstrap/bootstrap.php @@ -15,12 +14,7 @@ Running 1 test using 1 worker 1 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_cannot_use_woo_and_plugin_woocommerce__1.txt b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_cannot_use_woo_and_plugin_woocommerce__1.txt index 65e42ddc..893df800 100644 --- a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_cannot_use_woo_and_plugin_woocommerce__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_cannot_use_woo_and_plugin_woocommerce__1.txt @@ -1,2 +1 @@ Both "--woo" and "--plugin woocommerce" cannot be used at the same time. Please use one or another when running the test. - diff --git a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_multiple_tags_and_run_tests__1.txt b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_multiple_tags_and_run_tests__1.txt index 0f5c91b1..659b31f8 100644 --- a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_multiple_tags_and_run_tests__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_multiple_tags_and_run_tests__1.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping woocommerce-amazon-s3-storage /qit/tests/e2e/woocommerce-amazon-s3-storage/self-test-multiple-test-tags/bootstrap/bootstrap.php Bootstrapping woocommerce-amazon-s3-storage /qit/tests/e2e/woocommerce-amazon-s3-storage/self-test-multiple-test-tags/bootstrap/bootstrap.sh @@ -20,12 +19,7 @@ Running 3 tests using 1 worker 3 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_playwright_config_override__1.txt b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_playwright_config_override__1.txt index eecd69b7..1983dfec 100644 --- a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_playwright_config_override__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_playwright_config_override__1.txt @@ -1,11 +1,10 @@ Loading environment config from override parameter /tmp-normalized/qit-env-.json... Warning: Key "config" not found in environment info. Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping woocommerce-amazon-s3-storage /qit/tests/e2e/woocommerce-amazon-s3-storage/local/bootstrap/bootstrap.php Bootstrapping woocommerce-amazon-s3-storage /qit/tests/e2e/woocommerce-amazon-s3-storage/local/bootstrap/bootstrap.sh @@ -18,12 +17,7 @@ Consider splitting slow test files to speed up parallel execution 1 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__1.txt b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__1.txt index 8e9db064..a65f0d48 100644 --- a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__1.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping deli /qit/tests/e2e/deli/local/bootstrap/bootstrap.php Bootstrapping deli /qit/tests/e2e/deli/local/bootstrap/bootstrap.sh @@ -56,12 +55,7 @@ path: '/qit/results/playwright/activate-theme-I-can-activate-Deli-deli-local/hom 2 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__2.txt b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__2.txt index 716fa421..10af8627 100644 --- a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__2.txt +++ b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__2.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping deli /qit/tests/e2e/deli/local/bootstrap/bootstrap.php Bootstrapping deli /qit/tests/e2e/deli/local/bootstrap/bootstrap.sh @@ -15,12 +14,7 @@ Running 2 tests using 1 worker 2 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__3.txt b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__3.txt index a4e1982e..8e4737ab 100644 --- a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__3.txt +++ b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_run_with_snapshot__3.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping deli /qit/tests/e2e/deli/local/bootstrap/bootstrap.php Bootstrapping deli /qit/tests/e2e/deli/local/bootstrap/bootstrap.sh @@ -11,7 +10,6 @@ Moving must-use plugin of deli /qit/tests/e2e/deli/local/bootstrap/mu-plugin.php Running E2E Tests Running 2 tests using 1 worker ✘ 1 [deli-local] › deli/local/activate-theme.spec.js:4:5 › I can activate Deli (TIME) -✘ 2 [deli-local] › deli/local/activate-theme.spec.js:4:5 › I can activate Deli (retry #1) (TIME) could not read file /qit/tests/e2e/deli/local/__snapshots__/activate-theme.spec.js/home.png-actual.png Error: ENOENT: no such file or directory, open '/qit/tests/e2e/deli/local/__snapshots__/activate-theme.spec.js/home.png-actual.png' at open (node:internal/fs/promises:639:25) at readFile (node:internal/fs/promises:1242:14) { @@ -36,56 +34,15 @@ code: 'ENOENT', syscall: 'open', path: '/qit/tests/e2e/deli/local/__snapshots__/activate-theme.spec.js/home.png-diff.png' } +✘ 2 [deli-local] › deli/local/activate-theme.spec.js:4:5 › I can activate Deli (retry #1) (TIME) ✘ 3 [deli-local] › deli/local/activate-theme.spec.js:4:5 › I can activate Deli (retry #2) (TIME) ✓ 4 [deli-local] › deli/local/example.spec.js:9:5 › I can see my plugin menu (TIME) 1) [deli-local] › deli/local/activate-theme.spec.js:4:5 › I can activate Deli ──────────────────── - -TimeoutError: locator.click: Timeout 10000ms exceeded. -Call log: -- waiting for getByRole('link', { name: 'Install Parent Theme' }) - - locator resolved to Install Parent Theme - - attempting click action - - waiting for element to be visible, enabled and stable - - element is visible, enabled and stable - - scrolling into view if needed - - done scrolling - - performing click action - - click action done - - waiting for scheduled navigations to finish - - -6 | await page.getByRole('link', { name: 'Appearance' }).click(); -7 | await expect(page.getByRole('cell', { name: 'Deli' })).toBeVisible(); -> 8 | await page.getByRole('link', { name: 'Install Parent Theme' }).click(); -| ^ -9 | await page.getByRole('link', { name: 'Activate “Storefront”' }).click(); -10 | await page.getByLabel('Activate Deli').click(); -11 | await page.goto('/'); - -at /qit/tests/e2e/deli/local/activate-theme.spec.js:8:68 - -attachment #1: video (video/webm) ────────────────────────────────────────────────────────────── -../../results/playwright/activate-theme-I-can-activate-Deli-deli-local/video.webm -──────────────────────────────────────────────────────────────────────────────────────────────── - -attachment #2: trace (application/zip) ───────────────────────────────────────────────────────── -../../results/playwright/activate-theme-I-can-activate-Deli-deli-local/trace.zip -Usage: - -npx playwright show-trace ../../results/playwright/activate-theme-I-can-activate-Deli-deli-local/trace.zip - -──────────────────────────────────────────────────────────────────────────────────────────────── - -Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── - Error: Screenshot comparison failed: - 363 pixels (ratio 0.01 of all image pixels) are different. - Expected: /qit/tests/e2e/deli/local/__snapshots__/activate-theme.spec.js/home.png -Received: /qit/results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/home-actual.png -Diff: /qit/results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/home-diff.png - +Received: /qit/results/playwright/activate-theme-I-can-activate-Deli-deli-local/home-actual.png +Diff: /qit/results/playwright/activate-theme-I-can-activate-Deli-deli-local/home-diff.png Call log: - expect.toHaveScreenshot(home.png) with timeout 10000ms  - verifying given screenshot expectation @@ -101,56 +58,67 @@ Call log:  - fonts loaded  - captured a stable screenshot  - 363 pixels (ratio 0.01 of all image pixels) are different. - - 10 | await page.getByLabel('Activate Deli').click(); 11 | await page.goto('/'); > 12 | await expect(page).toHaveScreenshot('home.png', { maxDiffPixels: 100 }); | ^ 13 | }); - at /qit/tests/e2e/deli/local/activate-theme.spec.js:12:24 - attachment #1: home-expected.png (image/png) ─────────────────────────────────────────────────── deli/local/__snapshots__/activate-theme.spec.js/home.png ──────────────────────────────────────────────────────────────────────────────────────────────── - attachment #2: home-actual.png (image/png) ───────────────────────────────────────────────────── -../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/home-actual.png +../../results/playwright/activate-theme-I-can-activate-Deli-deli-local/home-actual.png ──────────────────────────────────────────────────────────────────────────────────────────────── - attachment #3: home-diff.png (image/png) ─────────────────────────────────────────────────────── -../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/home-diff.png +../../results/playwright/activate-theme-I-can-activate-Deli-deli-local/home-diff.png ──────────────────────────────────────────────────────────────────────────────────────────────── - attachment #4: screenshot (image/png) ────────────────────────────────────────────────────────── -../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/test-failed-1.png +../../results/playwright/activate-theme-I-can-activate-Deli-deli-local/test-failed-1.png ──────────────────────────────────────────────────────────────────────────────────────────────── - attachment #5: video (video/webm) ────────────────────────────────────────────────────────────── -../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/video.webm +../../results/playwright/activate-theme-I-can-activate-Deli-deli-local/video.webm ──────────────────────────────────────────────────────────────────────────────────────────────── - attachment #6: trace (application/zip) ───────────────────────────────────────────────────────── +../../results/playwright/activate-theme-I-can-activate-Deli-deli-local/trace.zip +Usage: +npx playwright show-trace ../../results/playwright/activate-theme-I-can-activate-Deli-deli-local/trace.zip +──────────────────────────────────────────────────────────────────────────────────────────────── +Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── +Error: Timed out 10000ms waiting for expect(locator).toBeVisible() +Locator: getByRole('cell', { name: 'Deli' }) +Expected: visible +Received: +Call log: +- expect.toBeVisible with timeout 10000ms + - waiting for getByRole('cell', { name: 'Deli' }) +5 | await qit.loginAsAdmin(page); +6 | await page.getByRole('link', { name: 'Appearance' }).click(); +> 7 | await expect(page.getByRole('cell', { name: 'Deli' })).toBeVisible(); +| ^ +8 | await page.getByRole('link', { name: 'Install Parent Theme' }).click(); +9 | await page.getByRole('link', { name: 'Activate “Storefront”' }).click(); +10 | await page.getByLabel('Activate Deli').click(); +at /qit/tests/e2e/deli/local/activate-theme.spec.js:7:60 +attachment #1: screenshot (image/png) ────────────────────────────────────────────────────────── +../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/test-failed-1.png +──────────────────────────────────────────────────────────────────────────────────────────────── +attachment #2: video (video/webm) ────────────────────────────────────────────────────────────── +../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/video.webm +──────────────────────────────────────────────────────────────────────────────────────────────── +attachment #3: trace (application/zip) ───────────────────────────────────────────────────────── ../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/trace.zip Usage: - npx playwright show-trace ../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/trace.zip - ──────────────────────────────────────────────────────────────────────────────────────────────── - Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── - Error: Timed out 10000ms waiting for expect(locator).toBeVisible() - Locator: getByRole('cell', { name: 'Deli' }) Expected: visible Received: Call log: - expect.toBeVisible with timeout 10000ms  - waiting for getByRole('cell', { name: 'Deli' }) - - 5 | await qit.loginAsAdmin(page); 6 | await page.getByRole('link', { name: 'Appearance' }).click(); > 7 | await expect(page.getByRole('cell', { name: 'Deli' })).toBeVisible(); @@ -158,36 +126,24 @@ Call log: 8 | await page.getByRole('link', { name: 'Install Parent Theme' }).click(); 9 | await page.getByRole('link', { name: 'Activate “Storefront”' }).click(); 10 | await page.getByLabel('Activate Deli').click(); - at /qit/tests/e2e/deli/local/activate-theme.spec.js:7:60 - attachment #1: screenshot (image/png) ────────────────────────────────────────────────────────── ../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry2/test-failed-1.png ──────────────────────────────────────────────────────────────────────────────────────────────── - attachment #2: video (video/webm) ────────────────────────────────────────────────────────────── ../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry2/video.webm ──────────────────────────────────────────────────────────────────────────────────────────────── - attachment #3: trace (application/zip) ───────────────────────────────────────────────────────── ../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry2/trace.zip Usage: - npx playwright show-trace ../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry2/trace.zip - ──────────────────────────────────────────────────────────────────────────────────────────────── - 1 failed [deli-local] › deli/local/activate-theme.spec.js:4:5 › I can activate Deli ───────────────────── 1 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [ERROR] Tests failed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_runs_scaffolded_e2e__1.txt b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_runs_scaffolded_e2e__1.txt index 2715c2bc..166eedee 100644 --- a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_runs_scaffolded_e2e__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_runs_scaffolded_e2e__1.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping woocommerce-amazon-s3-storage /qit/tests/e2e/woocommerce-amazon-s3-storage/local/bootstrap/bootstrap.php Bootstrapping woocommerce-amazon-s3-storage /qit/tests/e2e/woocommerce-amazon-s3-storage/local/bootstrap/bootstrap.sh @@ -14,12 +13,7 @@ Running 1 test using 1 worker 1 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_tag_and_run_test__1.txt b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_tag_and_run_test__1.txt index 8b8c54d3..d1777d82 100644 --- a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_tag_and_run_test__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_tag_and_run_test__1.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping woocommerce-amazon-s3-storage /qit/tests/e2e/woocommerce-amazon-s3-storage/self-test-tag-and-run/bootstrap/bootstrap.php Bootstrapping woocommerce-amazon-s3-storage /qit/tests/e2e/woocommerce-amazon-s3-storage/self-test-tag-and-run/bootstrap/bootstrap.sh @@ -14,12 +13,7 @@ Running 1 test using 1 worker 1 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_theme_as_sut__1.txt b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_theme_as_sut__1.txt index 716fa421..10af8627 100644 --- a/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_theme_as_sut__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/RunE2ETest__test_theme_as_sut__1.txt @@ -1,9 +1,8 @@ Downloading plugins and themes... -Setting up Docker... -Setting up WordPress... +Starting Docker Environment... +Installing WordPress... Activating plugins... Environment ready. - Bootstrapping Plugins Bootstrapping deli /qit/tests/e2e/deli/local/bootstrap/bootstrap.php Bootstrapping deli /qit/tests/e2e/deli/local/bootstrap/bootstrap.sh @@ -15,12 +14,7 @@ Running 2 tests using 1 worker 2 passed (TIME) Test artifacts being saved to: /tmp-normalized/qit-results-normalizedid Uploading zip... - -    [OK] Tests passed. Run 'qit e2e-report' to view the report.    - - Shutting down environment... - diff --git a/_tests/custom_tests/tests/__snapshots__/TagsTest__test_runs_scaffolded_e2e__1.txt b/_tests/custom_tests/tests/__snapshots__/TagsTest__test_runs_scaffolded_e2e__1.txt index 6de38711..605172e8 100644 --- a/_tests/custom_tests/tests/__snapshots__/TagsTest__test_runs_scaffolded_e2e__1.txt +++ b/_tests/custom_tests/tests/__snapshots__/TagsTest__test_runs_scaffolded_e2e__1.txt @@ -1,4 +1,2 @@ Uploading zip... - Tests updated for extension 'woocommerce-amazon-s3-storage' successfully. - diff --git a/qit b/qit index 665bf917..e179e7db 100755 Binary files a/qit and b/qit differ diff --git a/src/composer.json b/src/composer.json index 1852b070..d4055480 100644 --- a/src/composer.json +++ b/src/composer.json @@ -31,7 +31,8 @@ "stecman/symfony-console-completion": "^0.11.0", "composer/ca-bundle": "^1.4", "symfony/serializer": "^5", - "symfony/yaml": "^5" + "symfony/yaml": "^5", + "vlucas/phpdotenv": "^5" }, "require-dev": { "phpunit/phpunit": "^8", diff --git a/src/composer.lock b/src/composer.lock index 8a75e5c5..80c7a09b 100644 --- a/src/composer.lock +++ b/src/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f707d09252181a24da2e5b5c0b6825c0", + "content-hash": "9e635ae6113c810bc73c47f103647982", "packages": [ { "name": "composer/ca-bundle", - "version": "1.4.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "3ce240142f6d59b808dd65c1f52f7a1c252e6cfd" + "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/3ce240142f6d59b808dd65c1f52f7a1c252e6cfd", - "reference": "3ce240142f6d59b808dd65c1f52f7a1c252e6cfd", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/48a792895a2b7a6ee65dd5442c299d7b835b6137", + "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137", "shasum": "" }, "require": { "ext-openssl": "*", "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "psr/log": "^1.0", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8 || ^9", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "type": "library", "extra": { @@ -64,7 +64,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.4.1" + "source": "https://github.com/composer/ca-bundle/tree/1.5.2" }, "funding": [ { @@ -80,20 +80,82 @@ "type": "tidelift" } ], - "time": "2024-02-23T10:16:52+00:00" + "time": "2024-09-25T07:49:53+00:00" + }, + { + "name": "graham-campbell/result-type", + "version": "v1.1.3", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:45:45+00:00" }, { "name": "lucatume/di52", - "version": "3.3.5", + "version": "3.3.7", "source": { "type": "git", "url": "https://github.com/lucatume/di52.git", - "reference": "d39d1cbbc57eb41c7aa21fab106e17b6938ec6b3" + "reference": "76c0c2ad0422ce595e2e38138456f3475888e32c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lucatume/di52/zipball/d39d1cbbc57eb41c7aa21fab106e17b6938ec6b3", - "reference": "d39d1cbbc57eb41c7aa21fab106e17b6938ec6b3", + "url": "https://api.github.com/repos/lucatume/di52/zipball/76c0c2ad0422ce595e2e38138456f3475888e32c", + "reference": "76c0c2ad0422ce595e2e38138456f3475888e32c", "shasum": "" }, "require": { @@ -123,9 +185,84 @@ "description": "A PHP 5.6 compatible dependency injection container.", "support": { "issues": "https://github.com/lucatume/di52/issues", - "source": "https://github.com/lucatume/di52/tree/3.3.5" + "source": "https://github.com/lucatume/di52/tree/3.3.7" }, - "time": "2023-09-01T08:49:32+00:00" + "time": "2024-04-26T14:46:26+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.3", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:41:07+00:00" }, { "name": "psr/container", @@ -226,16 +363,16 @@ }, { "name": "symfony/console", - "version": "v5.4.36", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e" + "reference": "108d436c2af470858bdaba3257baab3a74172017" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e", - "reference": "39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e", + "url": "https://api.github.com/repos/symfony/console/zipball/108d436c2af470858bdaba3257baab3a74172017", + "reference": "108d436c2af470858bdaba3257baab3a74172017", "shasum": "" }, "require": { @@ -305,7 +442,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.36" + "source": "https://github.com/symfony/console/tree/v5.4.45" }, "funding": [ { @@ -321,20 +458,20 @@ "type": "tidelift" } ], - "time": "2024-02-20T16:33:57+00:00" + "time": "2024-10-08T07:27:17+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "80d075412b557d41002320b96a096ca65aa2c98d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d", "shasum": "" }, "require": { @@ -372,7 +509,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" }, "funding": [ { @@ -388,20 +525,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2023-01-24T14:02:46+00:00" }, { "name": "symfony/filesystem", - "version": "v5.4.35", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086" + "reference": "57c8294ed37d4a055b77057827c67f9558c95c54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/5a553607d4ffbfa9c0ab62facadea296c9db7086", - "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/57c8294ed37d4a055b77057827c67f9558c95c54", + "reference": "57c8294ed37d4a055b77057827c67f9558c95c54", "shasum": "" }, "require": { @@ -410,6 +547,9 @@ "symfony/polyfill-mbstring": "~1.8", "symfony/polyfill-php80": "^1.16" }, + "require-dev": { + "symfony/process": "^5.4|^6.4" + }, "type": "library", "autoload": { "psr-4": { @@ -436,7 +576,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.35" + "source": "https://github.com/symfony/filesystem/tree/v5.4.45" }, "funding": [ { @@ -452,24 +592,24 @@ "type": "tidelift" } ], - "time": "2024-01-23T13:51:25+00:00" + "time": "2024-10-22T13:05:35+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -515,7 +655,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -531,24 +671,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -593,7 +733,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -609,24 +749,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -674,7 +814,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -690,24 +830,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -754,7 +894,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -770,24 +910,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -830,7 +970,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" }, "funding": [ { @@ -846,24 +986,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -910,7 +1050,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -926,20 +1066,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/process", - "version": "v5.4.36", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "4fdf34004f149cc20b2f51d7d119aa500caad975" + "reference": "95f3f19d0f8f06e4253c66a0828ddb69f8b8ede4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/4fdf34004f149cc20b2f51d7d119aa500caad975", - "reference": "4fdf34004f149cc20b2f51d7d119aa500caad975", + "url": "https://api.github.com/repos/symfony/process/zipball/95f3f19d0f8f06e4253c66a0828ddb69f8b8ede4", + "reference": "95f3f19d0f8f06e4253c66a0828ddb69f8b8ede4", "shasum": "" }, "require": { @@ -972,7 +1112,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.36" + "source": "https://github.com/symfony/process/tree/v5.4.45" }, "funding": [ { @@ -988,20 +1128,20 @@ "type": "tidelift" } ], - "time": "2024-02-12T15:49:53+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/serializer", - "version": "v5.4.36", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "05137a513f4c5a5e56ffbcf53847a93284b49f67" + "reference": "460c5df9fb6c39d10d5b7f386e4feae4b6370221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/05137a513f4c5a5e56ffbcf53847a93284b49f67", - "reference": "05137a513f4c5a5e56ffbcf53847a93284b49f67", + "url": "https://api.github.com/repos/symfony/serializer/zipball/460c5df9fb6c39d10d5b7f386e4feae4b6370221", + "reference": "460c5df9fb6c39d10d5b7f386e4feae4b6370221", "shasum": "" }, "require": { @@ -1075,7 +1215,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v5.4.36" + "source": "https://github.com/symfony/serializer/tree/v5.4.45" }, "funding": [ { @@ -1091,20 +1231,20 @@ "type": "tidelift" } ], - "time": "2024-02-22T18:40:43+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", "shasum": "" }, "require": { @@ -1158,7 +1298,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" }, "funding": [ { @@ -1174,20 +1314,20 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2023-04-21T15:04:16+00:00" }, { "name": "symfony/string", - "version": "v5.4.36", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "4e232c83622bd8cd32b794216aa29d0d266d353b" + "reference": "7f6807add88b1e2635f3c6de5e1ace631ed7cad2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/4e232c83622bd8cd32b794216aa29d0d266d353b", - "reference": "4e232c83622bd8cd32b794216aa29d0d266d353b", + "url": "https://api.github.com/repos/symfony/string/zipball/7f6807add88b1e2635f3c6de5e1ace631ed7cad2", + "reference": "7f6807add88b1e2635f3c6de5e1ace631ed7cad2", "shasum": "" }, "require": { @@ -1244,7 +1384,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.36" + "source": "https://github.com/symfony/string/tree/v5.4.45" }, "funding": [ { @@ -1260,20 +1400,20 @@ "type": "tidelift" } ], - "time": "2024-02-01T08:49:30+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/yaml", - "version": "v5.4.35", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e78db7f5c70a21f0417a31f414c4a95fe76c07e4" + "reference": "a454d47278cc16a5db371fe73ae66a78a633371e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e78db7f5c70a21f0417a31f414c4a95fe76c07e4", - "reference": "e78db7f5c70a21f0417a31f414c4a95fe76c07e4", + "url": "https://api.github.com/repos/symfony/yaml/zipball/a454d47278cc16a5db371fe73ae66a78a633371e", + "reference": "a454d47278cc16a5db371fe73ae66a78a633371e", "shasum": "" }, "require": { @@ -1319,7 +1459,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.35" + "source": "https://github.com/symfony/yaml/tree/v5.4.45" }, "funding": [ { @@ -1335,7 +1475,91 @@ "type": "tidelift" } ], - "time": "2024-01-23T13:51:25+00:00" + "time": "2024-09-25T14:11:13+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.6.1", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.3", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-filter": "*", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:52:34+00:00" } ], "packages-dev": [ @@ -1486,16 +1710,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -1503,11 +1727,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -1533,7 +1758,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, "funding": [ { @@ -1541,7 +1766,7 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "phar-io/manifest", @@ -1803,22 +2028,22 @@ }, { "name": "phpcsstandards/phpcsutils", - "version": "1.0.9", + "version": "1.0.12", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", - "reference": "908247bc65010c7b7541a9551e002db12e9dae70" + "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/908247bc65010c7b7541a9551e002db12e9dae70", - "reference": "908247bc65010c7b7541a9551e002db12e9dae70", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/87b233b00daf83fb70f40c9a28692be017ea7c6c", + "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.8.0 || 4.0.x-dev@dev" + "squizlabs/php_codesniffer": "^3.10.0 || 4.0.x-dev@dev" }, "require-dev": { "ext-filter": "*", @@ -1887,20 +2112,20 @@ "type": "open_collective" } ], - "time": "2023-12-08T14:50:00+00:00" + "time": "2024-05-20T13:34:27+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.62", + "version": "1.12.7", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "cd5c8a1660ed3540b211407c77abf4af193a6af9" + "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cd5c8a1660ed3540b211407c77abf4af193a6af9", - "reference": "cd5c8a1660ed3540b211407c77abf4af193a6af9", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", + "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", "shasum": "" }, "require": { @@ -1943,13 +2168,9 @@ { "url": "https://github.com/phpstan", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2024-03-13T12:27:20+00:00" + "time": "2024-10-18T11:12:07+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2250,42 +2471,42 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.37", + "version": "8.5.40", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fce30f306cee78be33ba00c8f9a853f41db0491b" + "reference": "48ed828b72c35b38cdddcd9059339734cb06b3a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fce30f306cee78be33ba00c8f9a853f41db0491b", - "reference": "fce30f306cee78be33ba00c8f9a853f41db0491b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/48ed828b72c35b38cdddcd9059339734cb06b3a7", + "reference": "48ed828b72c35b38cdddcd9059339734cb06b3a7", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", + "doctrine/instantiator": "^1.5.0", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.0", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=7.2", - "phpunit/php-code-coverage": "^7.0.12", - "phpunit/php-file-iterator": "^2.0.4", + "phpunit/php-code-coverage": "^7.0.17", + "phpunit/php-file-iterator": "^2.0.6", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", + "phpunit/php-timer": "^2.1.4", "sebastian/comparator": "^3.0.5", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.5", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", + "sebastian/diff": "^3.0.6", + "sebastian/environment": "^4.2.5", + "sebastian/exporter": "^3.1.6", + "sebastian/global-state": "^3.0.5", + "sebastian/object-enumerator": "^3.0.5", + "sebastian/resource-operations": "^2.0.3", + "sebastian/type": "^1.1.5", "sebastian/version": "^2.0.1" }, "suggest": { @@ -2328,7 +2549,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.37" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.40" }, "funding": [ { @@ -2344,7 +2565,7 @@ "type": "tidelift" } ], - "time": "2024-03-06T06:27:42+00:00" + "time": "2024-09-19T10:47:04+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -2969,7 +3190,6 @@ "type": "github" } ], - "abandoned": true, "time": "2024-03-01T13:59:09+00:00" }, { @@ -3131,16 +3351,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.0", + "version": "3.10.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b" + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b", - "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", "shasum": "" }, "require": { @@ -3207,7 +3427,7 @@ "type": "open_collective" } ], - "time": "2024-02-16T15:06:51+00:00" + "time": "2024-09-18T10:38:58+00:00" }, { "name": "theseer/tokenizer", @@ -3265,12 +3485,12 @@ "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "8b1a52e046668b7dcea1c3c663c5521b4b1c2a9a" + "reference": "2133137c33fa898df70b5f879a65d83af4dbb97d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/8b1a52e046668b7dcea1c3c663c5521b4b1c2a9a", - "reference": "8b1a52e046668b7dcea1c3c663c5521b4b1c2a9a", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/2133137c33fa898df70b5f879a65d83af4dbb97d", + "reference": "2133137c33fa898df70b5f879a65d83af4dbb97d", "shasum": "" }, "require": { @@ -3280,7 +3500,7 @@ "ext-xmlreader": "*", "php": ">=5.4", "phpcsstandards/phpcsextra": "^1.2.1", - "phpcsstandards/phpcsutils": "^1.0.9", + "phpcsstandards/phpcsutils": "^1.0.10", "squizlabs/php_codesniffer": "^3.9.0" }, "require-dev": { @@ -3324,7 +3544,7 @@ "type": "custom" } ], - "time": "2024-03-05T10:47:01+00:00" + "time": "2024-10-05T00:46:24+00:00" } ], "aliases": [], diff --git a/src/src/Commands/CustomTests/RunE2ECommand.php b/src/src/Commands/CustomTests/RunE2ECommand.php index b7e8d80e..15dfe48c 100644 --- a/src/src/Commands/CustomTests/RunE2ECommand.php +++ b/src/src/Commands/CustomTests/RunE2ECommand.php @@ -118,6 +118,8 @@ protected function configure() { ->reuseOption( UpEnvironmentCommand::getDefaultName(), 'tunnel' ) ->reuseOption( UpEnvironmentCommand::getDefaultName(), 'json' ) ->reuseOption( UpEnvironmentCommand::getDefaultName(), 'volume' ) + ->reuseOption( UpEnvironmentCommand::getDefaultName(), 'env' ) + ->reuseOption( UpEnvironmentCommand::getDefaultName(), 'env_file' ) ->addOption( 'shard', null, InputOption::VALUE_OPTIONAL, 'Playwright Sharding argument.' ) ->addOption( 'no_upload_report', null, InputOption::VALUE_NONE, 'Do not upload the report to QIT Manager.' ) ->addOption( 'update_snapshots', null, InputOption::VALUE_NONE, 'Update snapshots where applicable (eg: Playwright Snapshots).' ) diff --git a/src/src/Commands/Environment/UpEnvironmentCommand.php b/src/src/Commands/Environment/UpEnvironmentCommand.php index 9343dae9..bef43c84 100644 --- a/src/src/Commands/Environment/UpEnvironmentCommand.php +++ b/src/src/Commands/Environment/UpEnvironmentCommand.php @@ -2,6 +2,7 @@ namespace QIT_CLI\Commands\Environment; +use Dotenv\Dotenv; use QIT_CLI\App; use QIT_CLI\Cache; use QIT_CLI\Commands\DynamicCommand; @@ -64,6 +65,8 @@ protected function configure() { ->addOption( 'skip_activating_plugins', 's', InputOption::VALUE_NONE, 'Skip activating plugins in the environment.' ) ->addOption( 'json', 'j', InputOption::VALUE_NEGATABLE, 'Whether to return raw JSON format.', false ) ->addOption( 'tunnel', null, InputOption::VALUE_OPTIONAL, 'Enable tunneling. Optionally specify the tunnel method to use.' ) + ->addOption( 'env', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'Environment variables to pass to the tests.', [] ) + ->addOption( 'env_file', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'Environment variables to pass to the tests from a file.', [] ) ->setAliases( [ 'env:start' ] ); @@ -193,6 +196,7 @@ protected function execute( InputInterface $input, OutputInterface $output ): in $skip_activating_plugins = $input->getOption( 'skip_activating_plugins' ); $input->setOption( 'woo', null ); $input->setOption( 'skip_activating_plugins', null ); + $this->parse_env_vars( $input->getOption( 'env' ), $input->getOption( 'env_file' ) ); $tunnel = TunnelRunner::get_tunnel_value( $input ); @@ -352,4 +356,46 @@ protected function parse_options( InputInterface $input, bool $filter_to_send = return $options_to_env_info; } + + + /** + * We take the "--env" option as "--env FOO=bar" and convert it to ["FOO" => "bar"]. + * We also take "--env_file" option and parse the file content as env vars. + * We store this value as QIT_DOCKER_ENV_VARS and pass it to the test context. + * + * @param array $env_vars + * @param array $env_files + * + * @return void + */ + protected function parse_env_vars( array $env_vars, array $env_files ): void { + $parsed_vars = []; + + foreach ( $env_files as $env_file ) { + if ( ! file_exists( $env_file ) ) { + throw new \RuntimeException( sprintf( 'Environment file "%s" does not exist.', $env_file ) ); + } + + $parsed_vars = array_merge( $parsed_vars, Dotenv::parse( file_get_contents( $env_file ) ) ); + } + + foreach ( $env_vars as $env_var ) { + $env_var = explode( '=', $env_var, 2 ); + + if ( count( $env_var ) !== 2 ) { + throw new \RuntimeException( 'Invalid environment variable format. Should be in the format "--env FOO=bar".' ); + } + + $key = trim( $env_var[0] ); + $value = trim( $env_var[1] ); + + if ( ! preg_match( '/^[A-Za-z0-9_]+$/', $key ) ) { + throw new \RuntimeException( 'Invalid environment variable name. Must contain only letters, numbers, and underscores.' ); + } + + $parsed_vars[ $key ] = $value; + } + + App::setVar( 'QIT_DOCKER_ENV_VARS', $parsed_vars ); + } } diff --git a/src/src/Environment/Environments/E2E/E2EEnvironment.php b/src/src/Environment/Environments/E2E/E2EEnvironment.php index 532b648e..1af04c8d 100644 --- a/src/src/Environment/Environments/E2E/E2EEnvironment.php +++ b/src/src/Environment/Environments/E2E/E2EEnvironment.php @@ -92,7 +92,7 @@ protected function post_up(): void { $this->docker->run_inside_docker( $this->env_info, [ '/bin/bash', '-c', 'cp /qit/mu-plugins/* /var/www/html/wp-content/mu-plugins 2>&1' ] ); // Setup WordPress. - $this->output->writeln( 'Setting up WordPress...' ); + $this->output->writeln( 'Installing WordPress...' ); $this->docker->run_inside_docker( $this->env_info, [ '/bin/bash', '-c', 'bash /qit/bin/wordpress-setup.sh 2>&1' ], [ 'TUNNEL' => $this->env_info->tunnel ? 'yes' : 'no', 'WORDPRESS_VERSION' => $this->env_info->wp, diff --git a/src/src/Environment/Environments/EnvInfo.php b/src/src/Environment/Environments/EnvInfo.php index 3cf8b8d2..dbd4f626 100644 --- a/src/src/Environment/Environments/EnvInfo.php +++ b/src/src/Environment/Environments/EnvInfo.php @@ -134,7 +134,7 @@ public static function from_array( array $env_info_array ): EnvInfo { $env_info->$key = $value; } else { // Boilerplate options added by Symfony Console. - $ignore_keys = [ + $boilerplate_keys = [ 'json', 'help', 'quiet', @@ -143,6 +143,13 @@ public static function from_array( array $env_info_array ): EnvInfo { 'no-interaction', ]; + $non_overridable_keys = [ + 'env', + 'env_file', + ]; + + $ignore_keys = array_merge( $boilerplate_keys, $non_overridable_keys ); + if ( in_array( $key, $ignore_keys, true ) ) { continue; } diff --git a/src/src/Environment/Environments/Environment.php b/src/src/Environment/Environments/Environment.php index d84506cc..c1a72a95 100644 --- a/src/src/Environment/Environments/Environment.php +++ b/src/src/Environment/Environments/Environment.php @@ -139,7 +139,7 @@ public function up( string $type = 'up' ): void { $this->custom_tests_downloader->download( $this->env_info, $this->cache_dir, $this->env_info->plugins, $this->env_info->themes ); } - $this->output->writeln( 'Setting up Docker...' ); + $this->output->writeln( 'Starting Docker Environment...' ); $this->generate_docker_compose(); $this->post_generate_docker_compose(); $this->up_docker_compose(); @@ -246,6 +246,7 @@ protected function generate_docker_compose(): void { 'NORMALIZED_ENV_DIR' => $this->env_info->temporary_env, 'QIT_DOCKER_NGINX' => 'yes', // Default. Might be overridden by the concrete environment. 'QIT_DOCKER_REDIS' => 'no', // Default. Might be overridden by the concrete environment. + 'ENV_VARS' => json_encode( App::getVar( 'QIT_DOCKER_ENV_VARS' ) ), ], $this->get_generate_docker_compose_envs() ) ); if ( $this->output->isVeryVerbose() ) { diff --git a/src/src/LocalTests/E2E/Runner/PlaywrightRunner.php b/src/src/LocalTests/E2E/Runner/PlaywrightRunner.php index b65c3706..a9a345f1 100644 --- a/src/src/LocalTests/E2E/Runner/PlaywrightRunner.php +++ b/src/src/LocalTests/E2E/Runner/PlaywrightRunner.php @@ -156,6 +156,12 @@ public function run_test( E2EEnvInfo $env_info, array $test_infos, TestResult $t $test_result->get_results_dir() . ':/qit/results', ]; + // Pass env vars to the test environment. + foreach ( App::getVar( 'QIT_DOCKER_ENV_VARS' ) ?? [] as $env_key => $env_value ) { + $playwright_args[] = '-e'; + $playwright_args[] = "$env_key=$env_value"; + } + if ( $ci ) { $playwright_args[] = '-e'; $playwright_args[] = 'FORCE_COLOR=false'; @@ -213,7 +219,7 @@ public function run_test( E2EEnvInfo $env_info, array $test_infos, TestResult $t 'sh', '-c', "cd /qit/tests/e2e $dependencies_command" . - "npx playwright test $options --config /qit/tests/e2e/qit-playwright.config.js --output /qit/results/playwright $shard 2>&1", + "npx playwright test $options --config /qit/tests/e2e/qit-playwright.config.js $shard 2>&1", ] ); // Make sure the Playwright image is up-to-date. diff --git a/src/src/Tunnel/Tunnel.php b/src/src/Tunnel/Tunnel.php index f8d1387b..185a3aed 100644 --- a/src/src/Tunnel/Tunnel.php +++ b/src/src/Tunnel/Tunnel.php @@ -16,7 +16,7 @@ abstract class Tunnel { * Takes as input the local URL, and should return the tunnelled URL. * * Example: $local_url = 'http://localhost:1234' - * $env_id = '1234' + * $env_id = '1234' * * Returns: 'https://mytunnel.example.com' *