Add Playwright e2e test for undo trashed post and delete posts permanently #38414
end-to-end-tests.yml
on: pull_request
Matrix: e2e-tests
Slack Notifications
/
Cancelled notifications
Slack Notifications
/
Failure notifications
Slack Notifications
/
Fixed notifications
Slack Notifications
/
Success notifications
Failed workflow tasks
0s
Annotations
8 errors, 2 warnings, and 2 notices
[chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post:
tests/e2e/specs/posts/restore-from-trash-empty-trash.test.js#L11
1) [chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post
Error: Not logged in
9 | test.beforeEach( async ( { requestUtils, editor, admin } ) => {
10 | await requestUtils.deleteAllPosts();
> 11 | await admin.createNewPost( { postType: 'post', title: POST_TITLE } );
| ^
12 | await editor.publishPost();
13 | } );
14 |
at Admin.visitAdminPage (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/admin/visit-admin-page.ts:36:9)
at Admin.createNewPost (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/admin/create-new-post.ts:41:2)
at /home/runner/work/wordpress-develop/wordpress-develop/tests/e2e/specs/posts/restore-from-trash-empty-trash.test.js:11:3
|
[chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post:
tests/e2e/specs/posts/restore-from-trash-empty-trash.test.js#L12
1) [chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
TimeoutError: locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for getByRole('button', { name: 'Dismiss this notice' }).filter({ hasText: 'published' }) to be visible
10 | await requestUtils.deleteAllPosts();
11 | await admin.createNewPost( { postType: 'post', title: POST_TITLE } );
> 12 | await editor.publishPost();
| ^
13 | } );
14 |
15 | test( 'Restore trash post', async ( { page, admin, editor } ) => {
at Editor.publishPost (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/editor/publish-post.ts:44:4)
at /home/runner/work/wordpress-develop/wordpress-develop/tests/e2e/specs/posts/restore-from-trash-empty-trash.test.js:12:3
|
[chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post:
tests/e2e/specs/posts/restore-from-trash-empty-trash.test.js#L11
1) [chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: Not logged in
9 | test.beforeEach( async ( { requestUtils, editor, admin } ) => {
10 | await requestUtils.deleteAllPosts();
> 11 | await admin.createNewPost( { postType: 'post', title: POST_TITLE } );
| ^
12 | await editor.publishPost();
13 | } );
14 |
at Admin.visitAdminPage (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/admin/visit-admin-page.ts:36:9)
at Admin.createNewPost (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/admin/create-new-post.ts:41:2)
at /home/runner/work/wordpress-develop/wordpress-develop/tests/e2e/specs/posts/restore-from-trash-empty-trash.test.js:11:3
|
[chromium] › install.test.js:34:6 › WordPress installation process › should install WordPress with pre-existing database credentials:
tests/e2e/specs/install.test.js#L40
2) [chromium] › install.test.js:34:6 › WordPress installation process › should install WordPress with pre-existing database credentials
Error: should redirect to the installation page
Timed out 5000ms waiting for expect(locator).toHaveURL(expected)
Locator: locator(':root')
Expected pattern: /wp-admin\/install\.php$/
Received string: "http://localhost:8889/"
Call log:
- should redirect to the installation page with timeout 5000ms
- waiting for locator(':root')
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
38 | page,
39 | 'should redirect to the installation page'
> 40 | ).toHaveURL( /wp-admin\/install\.php$/ );
| ^
41 |
42 | await expect(
43 | page.getByText( /WordPress database error/ ),
at /home/runner/work/wordpress-develop/wordpress-develop/tests/e2e/specs/install.test.js:40:5
|
Test with SCRIPT_DEBUG disabled / Run E2E tests
Process completed with exit code 1.
|
[chromium] › install.test.js:34:6 › WordPress installation process › should install WordPress with pre-existing database credentials:
tests/e2e/specs/install.test.js#L40
1) [chromium] › install.test.js:34:6 › WordPress installation process › should install WordPress with pre-existing database credentials
Error: should redirect to the installation page
Timed out 5000ms waiting for expect(locator).toHaveURL(expected)
Locator: locator(':root')
Expected pattern: /wp-admin\/install\.php$/
Received string: "http://localhost:8889/"
Call log:
- should redirect to the installation page with timeout 5000ms
- waiting for locator(':root')
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
- locator resolved to <html lang="en-US">…</html>
- unexpected value "http://localhost:8889/"
38 | page,
39 | 'should redirect to the installation page'
> 40 | ).toHaveURL( /wp-admin\/install\.php$/ );
| ^
41 |
42 | await expect(
43 | page.getByText( /WordPress database error/ ),
at /home/runner/work/wordpress-develop/wordpress-develop/tests/e2e/specs/install.test.js:40:5
|
[chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post:
tests/e2e/specs/posts/restore-from-trash-empty-trash.test.js#L11
2) [chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post
Error: Not logged in
9 | test.beforeEach( async ( { requestUtils, editor, admin } ) => {
10 | await requestUtils.deleteAllPosts();
> 11 | await admin.createNewPost( { postType: 'post', title: POST_TITLE } );
| ^
12 | await editor.publishPost();
13 | } );
14 |
at Admin.visitAdminPage (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/admin/visit-admin-page.ts:36:9)
at Admin.createNewPost (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/admin/create-new-post.ts:41:2)
at /home/runner/work/wordpress-develop/wordpress-develop/tests/e2e/specs/posts/restore-from-trash-empty-trash.test.js:11:3
|
[chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post:
tests/e2e/specs/posts/restore-from-trash-empty-trash.test.js#L11
2) [chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Not logged in
9 | test.beforeEach( async ( { requestUtils, editor, admin } ) => {
10 | await requestUtils.deleteAllPosts();
> 11 | await admin.createNewPost( { postType: 'post', title: POST_TITLE } );
| ^
12 | await editor.publishPost();
13 | } );
14 |
at Admin.visitAdminPage (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/admin/visit-admin-page.ts:36:9)
at Admin.createNewPost (/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/e2e-test-utils-playwright/src/admin/create-new-post.ts:41:2)
at /home/runner/work/wordpress-develop/wordpress-develop/tests/e2e/specs/posts/restore-from-trash-empty-trash.test.js:11:3
|
Test with SCRIPT_DEBUG disabled / Run E2E tests
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Test with SCRIPT_DEBUG enabled / Run E2E tests
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
🎭 Playwright Run Summary
1 failed
[chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post
1 flaky
[chromium] › install.test.js:34:6 › WordPress installation process › should install WordPress with pre-existing database credentials
23 passed (1.0m)
|
🎭 Playwright Run Summary
2 flaky
[chromium] › install.test.js:34:6 › WordPress installation process › should install WordPress with pre-existing database credentials
[chromium] › posts/restore-from-trash-empty-trash.test.js:15:2 › Undo trashed & delete posts permanantly from Trash › Restore trash post
23 passed (1.0m)
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
failures-artifacts-12275919258
|
2.34 MB |
|
failures-artifacts-SCRIPT_DEBUG-12275919258
|
719 KB |
|