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: copy issues, compile target, trace app, add overwrite and debug option #6

Merged
merged 6 commits into from
Jul 3, 2022

Conversation

nickofthyme
Copy link
Contributor

@nickofthyme nickofthyme commented Jun 16, 2022

This adds the following:

  • Set transpilation target to node12
  • Copies the trace/ app to the final merged report only if any of the original reports contain it. All trace .zip test files were already being copied correctly.
  • Adds debug option to allow user to control verbosity. (default: false)
  • Adds overwriteExisting option to control overwriting existing report. (default: true)
  • Fixes error with contentFolderPath when copying data/, it was not joining the src and filename path correctly. See code line diff here.

⚠️ Waiting on confirmation of other issues to remove merged report and dist files from PR.

@nickofthyme
Copy link
Contributor Author

@mrmckeb could you please test this to see if you get the same error?

// package.json
{
  "dependencies": {
    "@playwright/test": "^1.21.1",
    "playwright-merge-html-reports": "nickofthyme/playwright-merge-html-reports#fix-index-issue"
  } 
}

@nickofthyme
Copy link
Contributor Author

@mstepin regarding #3 (comment) I changed the target to node12. You can test this out with the same link defined in #6 (comment). Note the changes to dist/ files in 3f86cc4 now transpile the ?? syntax.

@mstepin
Copy link

mstepin commented Jun 21, 2022

Thanks. Works in my tests. Will this be merged to the master version soon?

@nickofthyme
Copy link
Contributor Author

Not sure, @mrmckeb have you had a chance to test this?

@mrmckeb
Copy link
Contributor

mrmckeb commented Jun 22, 2022

Thanks, I've tested this today and it's working well for us too - we have two different sets of reports, and I've tested with both.

@nickofthyme
Copy link
Contributor Author

Nice! @anooprav7 Could you test this and merge when you get a chance? I removed the build files but you should be able to still test it pointing to 3f86cc4, something like...

// package.json
{
  "dependencies": {
    "@playwright/test": "^1.21.1",
    "playwright-merge-html-reports": "nickofthyme/playwright-merge-html-reports#3f86cc47cb2b9bc03159c280763233c29ca1cf3c"
  } 
}

@nickofthyme nickofthyme changed the title feat: include trace app in merge, add overwrite and debug options fix: copy issues, compile target, trace app, add overwrite and debug option Jun 22, 2022
@anooprav7 anooprav7 merged commit 0e82dc6 into anooprav7:main Jul 3, 2022
@anooprav7
Copy link
Owner

Release log - /~https://github.com/anooprav7/playwright-merge-html-reports/releases/tag/v0.2.4
Published - https://www.npmjs.com/package/playwright-merge-html-reports/v/0.2.4

@mrmckeb
Copy link
Contributor

mrmckeb commented Jul 5, 2022

I'm not sure what happened, but I'm now able to reproduce the index.html issue again with 0.2.4.

@anooprav7 @nickofthyme to reproduce:

  1. I have two reports in two folders.
  2. I run:
const { mergeHTMLReports } = require("playwright-merge-html-reports");

const inputReportPaths = [
  process.cwd() + "/playwright-report-1",
  process.cwd() + "/playwright-report-2",
];

const config = {
  outputFolderName: "merged-html-report",
};

mergeHTMLReports(inputReportPaths, config);
  1. I get error: [Error: ENOENT: no such file or directory, open '[...dir]/merged-html-report/index.html']

@nickofthyme nickofthyme deleted the fix-index-issue branch July 5, 2022 15:00
@nickofthyme
Copy link
Contributor Author

@mrmckeb can you share these two reports so I can test against them directly? Cuz I cannot reproduce this issue on the current example reports.

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.

4 participants