Skip to content

Fix/adapt after hook to bulk delete change in 5.6.8#363

Merged
Mai-Saad merged 5 commits intodevelopfrom
fix/adapt-after-hook-to-bulk-delete-change-in-5.6.8
Apr 10, 2026
Merged

Fix/adapt after hook to bulk delete change in 5.6.8#363
Mai-Saad merged 5 commits intodevelopfrom
fix/adapt-after-hook-to-bulk-delete-change-in-5.6.8

Conversation

@sandyfzu
Copy link
Copy Markdown
Member

@sandyfzu sandyfzu commented Apr 1, 2026

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:

image

5.6.6 results:

image

Type of change

  • New feature (non-breaking change which adds functionality).
  • Bug fix (non-breaking change which fixes an issue).
  • Enhancement (non-breaking change which improves an existing functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as before).
  • Sub-task of #(issue number)
  • Chore
  • Release

Detailed scenario

What was tested

Ran all storage tests.

How to test

Run node ./node_modules/@cucumber/cucumber/bin/cucumber-js -p default --tags @bwpupstorage

Affected Features & Quality Assurance Scope

Only "after" hook to clear was changed

Technical description

Documentation

Added these:

    await page.waitForSelector('button.js-backwpup-bulk-delete-backups', { timeout: 5000 });
    await page.click('button.js-backwpup-bulk-delete-backups');

New dependencies

N/A

Risks

N/A

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.
  • Output messages (errors, notices, logs) are explicit enough for users to understand the issue and are actionnable.

Unticked items justification

N/A

@sandyfzu sandyfzu self-assigned this Apr 1, 2026
@sandyfzu sandyfzu added the bug Something isn't working label Apr 1, 2026
Copilot AI review requested due to automatic review settings April 1, 2026 21:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread src/backwpup/support/hooks.ts Outdated
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');
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();

Copilot uses AI. Check for mistakes.
@Mai-Saad Mai-Saad added this to the 1.2.3 milestone Apr 10, 2026
@Mai-Saad Mai-Saad merged commit ed6a85d into develop Apr 10, 2026
2 checks passed
@Mai-Saad Mai-Saad deleted the fix/adapt-after-hook-to-bulk-delete-change-in-5.6.8 branch April 10, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants