Reverted bulk trash logic
This commit is contained in:
parent
d74d37ce67
commit
67e7521044
|
@ -19,7 +19,11 @@ async function trashExistingPosts() {
|
|||
|
||||
// If this selector doesn't exist there are no posts for us to delete.
|
||||
const bulkSelector = await page.$( '#bulk-action-selector-top' );
|
||||
if ( bulkSelector ) {
|
||||
if ( ! bulkSelector ) {
|
||||
await merchant.logout();
|
||||
return;
|
||||
}
|
||||
|
||||
// Select all posts.
|
||||
await page.waitForSelector( '#cb-select-all-1' );
|
||||
await page.click( '#cb-select-all-1' );
|
||||
|
@ -30,8 +34,6 @@ async function trashExistingPosts() {
|
|||
await page.waitForXPath(
|
||||
'//*[contains(@class, "updated notice")]/p[contains(text(), "moved to the Trash.")]'
|
||||
);
|
||||
}
|
||||
|
||||
await merchant.logout();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue