Fix/adapt after hook to bulk delete change in 5.6.8#363
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the BackWPup E2E cleanup hook to handle the new bulk-delete confirmation modal introduced in BackWPup 5.6.8, preventing storage scenarios from failing during teardown.
Changes:
- Adds an extra UI interaction in the BackWPup “After” cleanup flow to confirm bulk backup deletion via the new modal.
Comment on lines
+95
to
+96
| await page.waitForSelector('button.js-backwpup-bulk-delete-backups', { timeout: 5000 }); | ||
| await page.click('button.js-backwpup-bulk-delete-backups'); |
There was a problem hiding this comment.
page.click() already auto-waits (up to the default timeout) for the element to be visible/enabled. Adding a separate waitForSelector(..., { timeout: 5000 }) can make the cleanup flaky on slower environments: the wait may time out and fail the hook even though the subsequent click would have succeeded. Consider removing the explicit wait or using a timeout aligned with the repo’s usual waits (and/or state: 'visible').
Suggested change
| await page.waitForSelector('button.js-backwpup-bulk-delete-backups', { timeout: 5000 }); | |
| await page.click('button.js-backwpup-bulk-delete-backups'); | |
| const bulkDeleteButton = page.locator('button.js-backwpup-bulk-delete-backups'); | |
| await bulkDeleteButton.click(); |
Mai-Saad
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes Failed tests since BackWpup 5.6.8
On 5.6.8, a modal to confirm backup deletion for bulk deletion was added. This PR added a new click on the modal to make sure the backups are removed.
5.6.8 results:
5.6.6 results:
Type of change
Detailed scenario
What was tested
Ran all storage tests.
How to test
Run
node ./node_modules/@cucumber/cucumber/bin/cucumber-js -p default --tags @bwpupstorageAffected Features & Quality Assurance Scope
Only "after" hook to clear was changed
Technical description
Documentation
Added these:
New dependencies
N/A
Risks
N/A
Mandatory Checklist
Code validation
Code style
Unticked items justification
N/A