From 0f7ce5c5be5cc9cf1b584200ffb00cfaf6a517ab Mon Sep 17 00:00:00 2001 From: nohwnd Date: Fri, 23 Sep 2016 09:05:15 +0200 Subject: [PATCH 1/2] Fix quotes in HTML --- Invoke-SuiteReport.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Invoke-SuiteReport.ps1 b/Invoke-SuiteReport.ps1 index 952c98c..0b4b772 100644 --- a/Invoke-SuiteReport.ps1 +++ b/Invoke-SuiteReport.ps1 @@ -54,7 +54,7 @@ foreach ($UnitTest in $NUnitHtml) { #Find the exact url formatted path of the current CSS/JS file $urlTypePath = $regex.matches($content) | foreach {$_.groups['url'].value} - $content = $regex.Replace($content,$path) + $content = $regex.Replace($content,"'$path'") $content = ($content -replace 'ReportUnit TestRunner Report',"$ApplicationSuiteTitle") ` -replace 'Executive Summary',"Infrastrcture Test Suite for $ApplicationSuiteTitle" ` From 65b3289fc4b18db2dbe8fdd8219ee4ebd9d0ad81 Mon Sep 17 00:00:00 2001 From: nohwnd Date: Fri, 23 Sep 2016 09:09:05 +0200 Subject: [PATCH 2/2] Fix encoding when saving HTML files Be default the encoding of the files is not UTF8 which forces Chrome to read linked scripts and css incorrectly, which in turn means that we get only plain-text web page without any styling. So this makes the scripts usable in chrome as well. (did not test on firefox) --- Invoke-SuiteReport.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Invoke-SuiteReport.ps1 b/Invoke-SuiteReport.ps1 index 0b4b772..a42e81f 100644 --- a/Invoke-SuiteReport.ps1 +++ b/Invoke-SuiteReport.ps1 @@ -63,6 +63,6 @@ foreach ($UnitTest in $NUnitHtml) { # Change url format to file format relative to script location } # end foreach URL replace - Out-File -InputObject $content -FilePath "$OutputFolder\$OutputHTML" -Force + Out-File -InputObject $content -FilePath "$OutputFolder\$OutputHTML" -Force -Encoding 'utf8' } # end Foreach unittests \ No newline at end of file