Socket
Socket
Sign inDemoInstall

protractor-jasmine2-screenshot-reporter

Package Overview
Dependencies
6
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.1.2

42

index.js

@@ -7,15 +7,17 @@ var fs = require('fs'),

require('string.prototype.startsWith');
function Jasmine2ScreenShotReporter(opts) {
'use strict';
var suites = {}, // suite clones
specs = {}, // tes spec clones
runningSuite = null, // currently running suite
var suites = {}, // suite clones
specs = {}, // tes spec clones
runningSuite = null, // currently running suite
// report marks
marks = {
pending:'<span style="padding:0 1em;color:orange;">~</span>',
failed: '<span style="padding:0 1em;color:red;">&#10007;</span>',
passed: '<span style="padding:0 1em;color:green;">&#10003;</span>'
};
// report marks
marks = {
pending:'<span style="padding:0 1em;color:orange;">~</span>',
failed: '<span style="padding:0 1em;color:red;">&#10007;</span>',
passed: '<span style="padding:0 1em;color:green;">&#10003;</span>'
};

@@ -128,2 +130,3 @@ // write data into opts.dest as filename

this.specDone = function(spec) {
var file;
spec = getSpecClone(spec);

@@ -142,2 +145,5 @@ spec._finished = Date.now();

file = opts.pathBuilder(spec, suites);
spec.filename = file + '.png';
browser.takeScreenshot().then(function (png) {

@@ -147,7 +153,4 @@ browser.getCapabilities().then(function (capabilities) {

metadataPath,
metadata,
file;
metadata;
file = opts.pathBuilder(spec, suites, capabilities);
spec.filename = file + '.png';
screenshotPath = path.join(opts.dest, spec.filename);

@@ -190,2 +193,7 @@ metadata = opts.metadataBuilder(spec, suites, capabilities);

_.each(suite._specs, function(spec) {
spec = specs[spec.id];
output += '<li>' + marks[spec.status] + '<a href="' + spec.filename + '">' + spec.fullName.replace(suite.fullName, '').trim() + '</a> (' + getDuration(spec) + ' s)</li>';
});
if (suite._suites.length) {

@@ -195,10 +203,6 @@ _.each(suite._suites, function(childSuite) {

});
} else {
_.each(suite._specs, function(spec) {
spec = specs[spec.id];
output += '<li>' + marks[spec.status] + '<a href="' + spec.filename + '">' + spec.fullName.replace(suite.fullName, '').trim() + '</a> (' + getDuration(spec) + ' s)</li>';
});
output += '</ul>';
}
output += '</ul>';
return output;

@@ -205,0 +209,0 @@ }

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

@@ -14,3 +14,4 @@ "main": "index.js",

"mkdirp": "^0.5.0",
"path": "^0.11.14"
"path": "^0.11.14",
"string.prototype.startswith": "^0.2.0"
},

@@ -31,3 +32,14 @@ "keywords": [

},
"homepage": "https://github.com/mlison/protractor-jasmine2-screenshot-reporter"
"homepage": "https://github.com/mlison/protractor-jasmine2-screenshot-reporter",
"contributors": [
{
"name": "Antti Arponen",
"email": "antti.arponen@rovio.com"
},
{
"name": "Alex Novikov",
"email": "alex@asnovikov.ru",
"url": "http://www.asnovikov.ru/"
}
]
}
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