You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ExtentHtmlReporter doesn't seem to respect JS config setting on 4.1.0 #105
Previously when using 4.0.3, we were loading our custom JS to the config on the ExtentHtmlReporter via the "Config" property. When upgrading to 4.1.0 in an effort to take advantage of using .NetCore, it appears that something changed that prevents that from being properly set to use on the templates. I've tried the SPA and default views and both the Xml and in memory config options and they don't work. I have isolated the issue in the following repo where you can run the tests to see that the "Framework" tests (using 4.0.3) correctly load the custom JS regardless of input, while the "Core" tests (using 4.1.0) don't correctly load the custom JS.
I believe the culprit could be on "extentreports-dotnet-core/Reporter/BasicFileReporter.cs". It looks like there is a previously existing loop that was commented out on this release (lines 61-69) that previously handled some of the "ExtentHtmlReporterSettings"-specific properties, so that could explain why "DocumentTitle" and "ReportTitle" are still being respected, but the non-BasicFileConfiguration properties are not being included.
changed the title [-]ExtentHtmlReporter doesn't seem to respect CSS/JS config setting on 4.1.0[/-][+]ExtentHtmlReporter doesn't seem to respect JS config setting on 4.1.0[/+]on Sep 29, 2020
Adjusted title because CSS actually does appear to import. This kinda ruins my theory about the "BasicFileReporter" changes since both CSS and JS are on the same configuration object (RichViewReporterConfiguration), so it's just the JS content that is being dropped.
I 100% see the issue. The "Scripts" partial view that you have is pulling "JS" from MasterConfig, but the "RichViewReporterConfiguration" class is storing the value as "js". Since keys are case sensitive, either the "Scripts" partial view needs to switch to "js" or the "RichViewReporterConfiguration" class needs to store that key as "JS".
@btvanhooser This has been fixed in version 5 (currently in alpha). The default reporter is ExtentSparkReporter and ExtentHtmlReporter and `ExtentV3HtmlReporter' are no longer available.
Activity
[-]ExtentHtmlReporter doesn't seem to respect CSS/JS config setting on 4.1.0[/-][+]ExtentHtmlReporter doesn't seem to respect JS config setting on 4.1.0[/+]btvanhooser commentedon Sep 29, 2020
Adjusted title because CSS actually does appear to import. This kinda ruins my theory about the "BasicFileReporter" changes since both CSS and JS are on the same configuration object (RichViewReporterConfiguration), so it's just the JS content that is being dropped.
btvanhooser commentedon Sep 29, 2020
I 100% see the issue. The "Scripts" partial view that you have is pulling "JS" from MasterConfig, but the "RichViewReporterConfiguration" class is storing the value as "js". Since keys are case sensitive, either the "Scripts" partial view needs to switch to "js" or the "RichViewReporterConfiguration" class needs to store that key as "JS".
btvanhooser commentedon Oct 2, 2020
@anshooarora tagging since it has been 3 days
anshooarora commentedon Mar 7, 2021
@btvanhooser This has been fixed in version 5 (currently in alpha). The default reporter is
ExtentSparkReporterandExtentHtmlReporterand `ExtentV3HtmlReporter' are no longer available.