Socket
Socket
Sign inDemoInstall

protractor-jasmine2-screenshot-reporter

Package Overview
Dependencies
5
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.7 to 0.1.8

CHANGELOG.md

16

index.js

@@ -0,1 +1,3 @@

var DEFAULT_DESTINATION = 'target/screenshots';
var fs = require('fs'),

@@ -153,5 +155,14 @@ mkdirp = require('mkdirp'),

var getDestination = function(){
return (opts.dest || DEFAULT_DESTINATION) + '/';
};
var getDestinationWithUniqueDirectory = function(){
return getDestination() + hat() + '/';
};
// TODO: more options
opts = opts || {};
opts.dest = (opts.dest || 'target/screenshots') + '/';
opts.preserveDirectory = opts.preserveDirectory || false;
opts.dest = opts.preserveDirectory ? getDestinationWithUniqueDirectory() : getDestination();
opts.filename = opts.filename || 'report.html';

@@ -164,3 +175,2 @@ opts.ignoreSkippedSpecs = opts.ignoreSkippedSpecs || false;

this.jasmineStarted = function() {

@@ -305,3 +315,3 @@ mkdirp(opts.dest, function(err) {

reason: printReasonsForFailure(spec),
filename: encodeURIComponent(spec.filename),
filename: encodeURI(spec.filename),
duration: getDuration(spec),

@@ -308,0 +318,0 @@ });

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

@@ -43,2 +43,6 @@ "main": "index.js",

"name": "Sandeep Adinarayana"
},
{
"name": "Ievgenii Vdovenko",
"email": "yevgenys2008@gmail.com"
}

@@ -45,0 +49,0 @@ ],

@@ -104,1 +104,11 @@ ## Protractor screenshot reporter for Jasmine2

By default, the runner builder will not save any metadata except the actual html report.
### Preserve Directory (optional)
This option is __disabled by default__. When this option is enabled, than for each report will be
created separate directory with unique name. Directory unique name will be generated randomly.
<pre><code>jasmine.getEnv().addReporter(new HtmlScreenshotReporter({
preserveDirectory: true
}));</code></pre>
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