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

Css issue with protractor beautiful reporter #197

Open
uvarajgithub opened this issue Mar 5, 2020 · 2 comments
Open

Css issue with protractor beautiful reporter #197

uvarajgithub opened this issue Mar 5, 2020 · 2 comments
Labels

Comments

@uvarajgithub
Copy link

After report .html file generated if i copy the path and paste it to browser and launch i will get report like below

image

but, if i want to mail the report when i open from mail the reports looks like

image

The problem is default report path has support css json files with it.
But if i copy the file to some other place and try to open it its broken design..with out support files
Same thing happen when i sending a mail of the report.html file alone...it is broken with out css and json contetns..

How to resolve this issue

@rebajz
Copy link

rebajz commented Mar 9, 2020

add to mail PDF version ;-)

let exec = require('child_process');
let locateChrome = require('locate-chrome');
let q = require('q');
let reportFolder = '';
let reportName='';
return q.fcall(() => {
locateChrome((where) => {
// Print pdf report from html report
console.log('Converting html report to pdf file');
exec.execSync('"' + where + '"' + ' --headless --disable-gpu --print-to-pdf=' + reportFolder + '/' + reportName + '.pdf --no-margins ' + reportFolder + '/' + reportName + '.html');
});
}).delay(1000);

@miller45
Copy link
Collaborator

The pdf approach from rebajz is good. The other alternative would be to zip all files and then send the zip files as mail.
This report does not work without "support" files. The js and css files are all required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants