Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Append Without Report Already Present #145

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

MuckT
Copy link
Contributor

@MuckT MuckT commented Apr 26, 2022

Description

If the index.html was not already present appending was failing to create it. This pull request should fix that behavior.

Issues

When I attempt to run with my local version of the reporter I am getting the same issue seen in: #142

How others should test

Append Enabled - No Existing Report

  1. Delete your report specified in your output path e.g. report.html file if present.
  2. Run your tests.
  3. Observe report should be correctly created.

Append Enabled - Existing Report

  1. Have an existing report in the location specified in your output path.
  2. Run your tests.
  3. Observe report should have new results appended to the existing report.

Append Disabled - No Existing Report

  1. Delete your report specified in your output path e.g. report.html file if present.
  2. Run your tests.
  3. Observe report should be correctly created.

Append Disabled - Existing Report

  1. Have an existing report in the location specified in your output path.
  2. Run your tests.
  3. Observe the existing report should be overwritten with the new run.

Video - Example appended report

Screen.Recording.2022-04-26.at.12.17.56.PM.mov

Copy link
Owner

@Hargne Hargne left a comment

Choose a reason for hiding this comment

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

👍

@Hargne Hargne merged commit f954ac7 into Hargne:master Apr 27, 2022
mergify bot pushed a commit to valora-inc/wallet that referenced this pull request Apr 29, 2022
### Description

Appends test results to index.html instead of overwriting on retries using the [append option in the config](https://github.com/Hargne/jest-html-reporter#configuration).

Update - 1: There were some issues with using the append option in [jest-html-reporter](https://github.com/Hargne/jest-html-reporter#readme); hopefully, Hargne/jest-html-reporter#145 is approved and we can update to the latest version to resolve these issues.

Update - 2: The PR to jest-html-reporter was merged and the new version is used in this PR.

### Other changes

N/A

### Tested

Tested in CI.

### How others should test

Does not need to be tested by QA. Reviewers should view the [e2e test reports](https://github.com/valora-inc/wallet/actions/runs/2234203686) and check that all tests are present.

### Related issues

N/A

### Backwards compatibility

Yes
ptabor pushed a commit to ptabor/jest-html-reporter that referenced this pull request Sep 1, 2023
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants