-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); | ||
|
||
test.describe( 'Bulk Delete wp pages', () => { | ||
test.beforeEach( async ( { page, admin, requestUtils, editor } ) => { | ||
// delete all pages | ||
await requestUtils.deleteAllPages(); | ||
|
||
const pageTitles = ['Bulk edit page 1', 'Bulk edit page 2'] | ||
|
||
// create pages | ||
for (const title of pageTitles) { | ||
await admin.createNewPost( { | ||
Check failure on line 15 in tests/e2e/specs/pages/bulk-delete-pages.test.js GitHub Actions / Test with SCRIPT_DEBUG enabled / Run E2E tests[chromium] › pages/bulk-delete-pages.test.js:25:2 › Bulk Delete wp pages › Should able to delete the pages in bulk
Check failure on line 15 in tests/e2e/specs/pages/bulk-delete-pages.test.js GitHub Actions / Test with SCRIPT_DEBUG enabled / Run E2E tests[chromium] › pages/bulk-delete-pages.test.js:25:2 › Bulk Delete wp pages › Should able to delete the pages in bulk
Check failure on line 15 in tests/e2e/specs/pages/bulk-delete-pages.test.js GitHub Actions / Test with SCRIPT_DEBUG disabled / Run E2E tests[chromium] › pages/bulk-delete-pages.test.js:25:2 › Bulk Delete wp pages › Should able to delete the pages in bulk
Check failure on line 15 in tests/e2e/specs/pages/bulk-delete-pages.test.js GitHub Actions / Test with SCRIPT_DEBUG disabled / Run E2E tests[chromium] › pages/bulk-delete-pages.test.js:25:2 › Bulk Delete wp pages › Should able to delete the pages in bulk
|
||
title: title, | ||
postType: 'page', | ||
} ); | ||
await editor.publishPost(); | ||
|
||
} | ||
|
||
} ); | ||
|
||
test( 'Should able to delete the pages in bulk', async ( { | ||
page, | ||
admin, | ||
} ) => { | ||
|
||
// visit the page list | ||
await admin.visitAdminPage( '/edit.php?post_type=page' ); | ||
|
||
await page.getByRole(' checkbox ', {name: 'Select All'}).first().check(); | ||
|
||
await page.getByRole(' combobox ', {name: "action"}).first().selectOption('trash'); | ||
|
||
await page.getByRole( 'button', {name: 'Apply'}).first().click(); | ||
|
||
await expect( | ||
page.locator( "div[id='message'] p" ).first() | ||
).toHaveText( /moved to the Trash./ ); | ||
} ); | ||
} ); |