protractor-beautiful-reporter icon indicating copy to clipboard operation
protractor-beautiful-reporter copied to clipboard

Css issue with protractor beautiful reporter

Open uvarajgithub opened this issue 4 years ago • 2 comments

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

uvarajgithub avatar Mar 05 '20 09:03 uvarajgithub

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

rebajz avatar Mar 09 '20 09:03 rebajz

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.

miller45 avatar Aug 24 '22 15:08 miller45