Skip to content

fixed problem when tests are not failing when backup fails (form 5.6.8)#373

Merged
sandyfzu merged 2 commits intodevelopfrom
fix/372-fail-tests-when-backup-fails
Apr 17, 2026
Merged

fixed problem when tests are not failing when backup fails (form 5.6.8)#373
sandyfzu merged 2 commits intodevelopfrom
fix/372-fail-tests-when-backup-fails

Conversation

@sandyfzu
Copy link
Copy Markdown
Member

@sandyfzu sandyfzu commented Apr 13, 2026

This PR checks if any backup failed before checking if the number of expected backups matches.

In case any backup failed, it will mark the test as failed as well, fixing the original issue.

Description

Fixes #372

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 tests with failed backups and ran the whole suite of tests to guarantee no regressions.

When a failed backup is found in the result:

image

All tests ran (no failed backups):
image

How to test

Simulate an scenario in which a backup would fail and run a test with this step: 'x' backup is generated and added to history

Affected Features & Quality Assurance Scope

Tests that check if the backup number matches with the expected number.

Technical description

Documentation

Checking for the word "failed" in the 4th column (the one in which text Backup failed is displayed), and if the text is found, then the backup is marked as failed and then simply throws an error (fails the test) if any backup is marked as failed.

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.

…8 failed backups are added to the history list)
@sandyfzu sandyfzu self-assigned this Apr 13, 2026
@sandyfzu sandyfzu added the bug Something isn't working label Apr 13, 2026
@sandyfzu sandyfzu marked this pull request as ready for review April 14, 2026 20:45
Copilot AI review requested due to automatic review settings April 14, 2026 20:45
@sandyfzu sandyfzu requested review from a team April 14, 2026 20:45
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

Fixes BackWPup E2E assertions so scenarios fail when any backup in history is marked as failed (behavior introduced in BackWPup 5.6.8), instead of only validating the backup count.

Changes:

  • Extend captured backup-history row data with a failed flag and fail the scenario when any failed backup is detected.
  • Improve backup-history table parsing by normalizing multi-line cell text and extracting the meaningful value from responsive/hidden text.
  • Add Node version/tooling metadata (engines, .nvmrc) and update BackWPup feature tags.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/backwpup/utils/types.ts Adds failed to BackupRowData for richer backup-history assertions.
src/backwpup/utils/helpers.ts Adds text-normalization helpers used to parse responsive BackWPup table cells reliably.
src/backwpup/steps/general.ts Detects failed backups from the history table and fails the test before validating row-count expectations.
src/backwpup/features/backup.feature Adds an additional tag for the backup feature.
package.json Declares a Node engine constraint.
.vscode/settings.json Adds a workspace TypeScript SDK setting (currently using an invalid key).
.nvmrc Pins a Node version for local development.

Comment thread package.json
Comment thread src/backwpup/steps/general.ts
Comment thread .vscode/settings.json
Comment thread .nvmrc
@sandyfzu sandyfzu merged commit 56fcff2 into develop Apr 17, 2026
6 checks passed
@sandyfzu sandyfzu deleted the fix/372-fail-tests-when-backup-fails branch April 17, 2026 13:36
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.

Test does not fail when a backup fails from 5.6.8

3 participants