Socket
Socket
Sign inDemoInstall

protractor-jasmine2-screenshot-reporter

Package Overview
Dependencies
19
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.1 to 0.5.0

6

docs/CHANGELOG.md

@@ -0,1 +1,7 @@

# 0.5.0
## Features
- [#113](https://github.com/mlison/protractor-jasmine2-screenshot-reporter/issues/113) [#114](https://github.com/mlison/protractor-jasmine2-screenshot-reporter/pull/114) Allow user to include javascript files via 'userJs'
# 0.4.1

@@ -2,0 +8,0 @@

15

index.js

@@ -104,2 +104,3 @@ var DEFAULT_DESTINATION = 'target/screenshots';

'<%= userCss %>' +
'<%= userJs %>' +
'<script type="text/javascript">' +

@@ -307,2 +308,12 @@ 'function showhide(id) {' +

var getJsScripts = function(jsFiles) {
var jsScripts = '';
_.each(jsFiles, function(file) {
jsScripts +='<script src="' + file + '"></script>';
});
return jsScripts;
};
var cleanDestination = function(callback) {

@@ -341,2 +352,3 @@ // if we aren't removing the old report folder then simply return

opts.userCss = Array.isArray(opts.userCss) ? opts.userCss : opts.userCss ? [ opts.userCss ] : [];
opts.userJs = Array.isArray(opts.userJs) ? opts.userJs : opts.userJs ? [ opts.userJs ] : [];
opts.totalSpecsDefined = null;

@@ -473,2 +485,3 @@ opts.showSummary = opts.hasOwnProperty('showSummary') ? opts.showSummary : true;

var cssLinks = getCssLinks(opts.userCss);
var jsScripts = getJsScripts(opts.userJs);
var summaryQuickLinks = opts.showQuickLinks ? addQuickLinks(): '';

@@ -479,3 +492,3 @@ var reportSummary = opts.showSummary ? addReportSummary({ quickLinks: summaryQuickLinks }) : '';

// Now you'll need to build the replacement report text for the file.
var reportContent = openReportTemplate({ userCss: cssLinks});
var reportContent = openReportTemplate({ userCss: cssLinks, userJs: jsScripts });
reportContent += addReportTitle({ title: opts.reportTitle});

@@ -482,0 +495,0 @@ reportContent += reportSummary;

2

package.json
{
"name": "protractor-jasmine2-screenshot-reporter",
"version": "0.4.1",
"version": "0.5.0",
"description": "Use the screenshot reporter to capture screenshots after each executed Protractor test case.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -89,2 +89,13 @@ ## Protractor screenshot reporter for Jasmine2

### Use External JS (optional)
A string or an array of javascript filenames that should be loaded in the html test report.
<pre><code>var reporter = new HtmlScreenshotReporter({
userJs: [ 'script.js', 'other-script.js' ]
// Or
userJs: 'script.js
});</code></pre>
### Ignore pending specs (optional)

@@ -91,0 +102,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc