Skip to content

Commit

Permalink
Update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Oct 23, 2024
1 parent 0ba0ca3 commit c4cf121
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
}
],
"themes": [],
"tunnel": false,
"site_url": null,
"wp": "latest",
"object_cache": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
}
],
"themes": [],
"tunnel": false,
"site_url": "http:\/\/qitenvnginxENV_ID_NORMALIZED",
"wp": "latest",
"object_cache": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ 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) {
Expand All @@ -35,18 +36,55 @@ 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 <a class="button install-theme" href="http://qitenvnginx6718426de3611/wp-admin/update.php?action=install-theme&theme=storefront&_wpnonce=6c2878c017">Install Parent Theme</a>
 - 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/home-actual.png
Diff: /qit/results/playwright/activate-theme-I-can-activate-Deli-deli-local/home-diff.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

Call log:
- expect.toHaveScreenshot(home.png) with timeout 10000ms
Expand Down Expand Up @@ -78,60 +116,22 @@ 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/home-actual.png
../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/home-actual.png
────────────────────────────────────────────────────────────────────────────────────────────────

attachment #3: home-diff.png (image/png) ───────────────────────────────────────────────────────
../../results/playwright/activate-theme-I-can-activate-Deli-deli-local/home-diff.png
../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/home-diff.png
────────────────────────────────────────────────────────────────────────────────────────────────

attachment #4: screenshot (image/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/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: <element(s) not found>
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) ──────────────────────────────────────────────────────────────
attachment #5: video (video/webm) ──────────────────────────────────────────────────────────────
../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/video.webm
────────────────────────────────────────────────────────────────────────────────────────────────

attachment #3: trace (application/zip) ─────────────────────────────────────────────────────────
attachment #6: trace (application/zip) ─────────────────────────────────────────────────────────
../../results/playwright/activate-theme-I-can-activate-Deli-deli-local-retry1/trace.zip
Usage:

Expand Down Expand Up @@ -176,6 +176,7 @@ 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)
Expand Down
Binary file modified qit
Binary file not shown.
8 changes: 6 additions & 2 deletions src/src/Environment/Environments/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,15 @@ public static function down( EnvInfo $env_info, ?OutputInterface $output = null
$down_process->setPty( use_tty() );

$down_process->run( static function ( $type, $buffer ) use ( $output ) {
$output->write( $buffer );
if ( $output->isVeryVerbose() ) {
$output->write( $buffer );
}
} );

if ( $down_process->isSuccessful() ) {
$output->writeln( 'Removing temporary environment: ' . $env_info->temporary_env );
if ( $output->isVeryVerbose() ) {
$output->writeln( 'Removing temporary environment: ' . $env_info->temporary_env );
}
SafeRemove::delete_dir( $env_info->temporary_env, static::get_temp_envs_dir() );
} else {
$output->writeln( 'Failed to remove temporary environment: ' . $env_info->temporary_env );
Expand Down

0 comments on commit c4cf121

Please sign in to comment.