protractor-jasmine2-screenshot-reporter
Advanced tools
Comparing version 0.1.4 to 0.1.5
22
index.js
@@ -12,3 +12,4 @@ var fs = require('fs'), | ||
var suites = {}, // suite clones | ||
var self = this, | ||
suites = {}, // suite clones | ||
specs = {}, // tes spec clones | ||
@@ -22,2 +23,8 @@ runningSuite = null, // currently running suite | ||
passed: '<span class="passed">✓</span>' | ||
}, | ||
// when use use fit, jasmine never calls suiteStarted / suiteDone, so make a fake one to use | ||
fakeFocusedSuite = { | ||
id: 'focused', | ||
description: 'focused specs', | ||
fullName: 'focused specs' | ||
}; | ||
@@ -147,2 +154,6 @@ | ||
suite = getSuiteClone(suite); | ||
if (suite._parent === undefined) { | ||
// disabled suite (xdescribe) -- suiteStarted was never called | ||
self.suiteStarted(suite); | ||
} | ||
suite._finished = Date.now(); | ||
@@ -153,2 +164,6 @@ runningSuite = suite._parent; | ||
this.specStarted = function(spec) { | ||
if (!runningSuite) { | ||
// focused spec (fit) -- suiteStarted was never called | ||
self.suiteStarted(fakeFocusedSuite); | ||
} | ||
spec = getSpecClone(spec); | ||
@@ -204,3 +219,6 @@ spec._started = Date.now(); | ||
var output = '<html><head><meta charset="utf-8"><style>body{font-family:Arial;}ul{list-style-position: inside;}.passed{padding: 0 1em;color:green;}.failed{padding: 0 1em;color:red;}.pending{padding: 0 1em;color:red;}</style></head><body>'; | ||
if (runningSuite) { | ||
// focused spec (fit) -- suiteDone was never called | ||
self.suiteDone(fakeFocusedSuite); | ||
} | ||
_.each(suites, function(suite) { | ||
@@ -207,0 +225,0 @@ output += printResults(suite); |
{ | ||
"name": "protractor-jasmine2-screenshot-reporter", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Use the screenshot reporter to capture screenshots after each executed Protractor test case.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -36,3 +36,3 @@ ## Protractor screenshot reporter for Jasmine2 | ||
<pre><code>jasmine.getEnv().addReporter(new ScreenShotReporter({ | ||
<pre><code>jasmine.getEnv().addReporter(new HtmlScreenshotReporter({ | ||
dest: '/project/test/screenshots' | ||
@@ -45,3 +45,3 @@ }));</code></pre> | ||
<pre><code>jasmine.getEnv().addReporter(new ScreenShotReporter({ | ||
<pre><code>jasmine.getEnv().addReporter(new HtmlScreenshotReporter({ | ||
filename: 'my-report.html' | ||
@@ -56,3 +56,3 @@ }));</code></pre> | ||
<pre><code>jasmine.getEnv().addReporter(new ScreenShotReporter({ | ||
<pre><code>jasmine.getEnv().addReporter(new HtmlScreenshotReporter({ | ||
ignoreSkippedSpecs: true | ||
@@ -67,3 +67,3 @@ }));</code></pre> | ||
<pre><code>jasmine.getEnv().addReporter(new ScreenShotReporter({ | ||
<pre><code>jasmine.getEnv().addReporter(new HtmlScreenshotReporter({ | ||
captureOnlyFailedSpecs: true | ||
@@ -78,3 +78,3 @@ }));</code></pre> | ||
<pre><code>jasmine.getEnv().addReporter(new ScreenShotReporter({ | ||
<pre><code>jasmine.getEnv().addReporter(new HtmlScreenshotReporter({ | ||
pathBuilder: function(currentSpec, suites, browserCapabilities) { | ||
@@ -81,0 +81,0 @@ // will return chrome/your-spec-name.png |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13667
239