Socket
Socket
Sign inDemoInstall

protractor-jasmine2-html-reporter

Package Overview
Dependencies
5
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.0.4

2

index.js

@@ -78,3 +78,3 @@ var fs = require('fs'),

self.savePath = options.savePath || '';
self.screenshotsFolder = (options.screenshotsFolder || 'screenshots') + '/';
self.screenshotsFolder = (options.screenshotsFolder || 'screenshots').replace(/^\//, '') + '/';
self.useDotNotation = options.useDotNotation === UNDEFINED ? true : options.useDotNotation;

@@ -81,0 +81,0 @@ self.consolidate = options.consolidate === UNDEFINED ? true : options.consolidate;

{
"name": "protractor-jasmine2-html-reporter",
"version": "0.0.3",
"version": "0.0.4",
"description": "HTML reporter for Jasmine2 and Protractor",

@@ -19,2 +19,3 @@ "main": "index.js",

"test",
"functional testing",
"screenshots",

@@ -21,0 +22,0 @@ "end2end",

# protractor-jasmine2-html-reporter
[![npm version](https://badge.fury.io/js/protractor-jasmine2-html-reporter.svg)](http://badge.fury.io/js/protractor-jasmine2-html-reporter)
HTML reporter for Jasmine2 and Protractor that will include screenshoots of each test if you want.
HTML reporter for Jasmine2 and Protractor that will include screenshots of each test if you want.
This work is inspired by:

@@ -20,3 +20,2 @@ * [Protractor Jasmine 2 Screenshot Reporter](https://github.com/mlison/protractor-jasmine2-screenshot-reporter) from [@mslison](https://github.com/mlison)

// ...
onPrepare: function() {

@@ -44,6 +43,5 @@ jasmine.getEnv().addReporter(

## Options
### Screenshoots folder (optional)
### Screenshots folder (optional)
By default the screenshoots are stored in a folder inside the default path
By default the screenshots are stored in a folder inside the default path

@@ -59,23 +57,35 @@ If the directory doesn't exist, it will be created automatically or otherwise cleaned before running the test suite.

### FilePrefix (optional)
### Take screenshots (optional)
Filename for html report.
When this option is enabled, reporter will create screenshots for specs.
<pre><code>jasmine.getEnv().addReporter(new Jasmine2HtmlReporter({
savePath: './test/reports/',
filePrefix: 'index'
takeScreenshots: false
}));</code></pre>
Default is <code>htmlReport.html</code>
Default is <code>true</code>
### Take screenshoots (optional)
### Take screenshots only on failure (optional) - (NEW)
When this option is enabled, reporter will create screenshots for specs.
This option allows you to choose if create screenshots always or only when failures.
If you disable screenshots, obviously this option will not be taken into account.
<pre><code>jasmine.getEnv().addReporter(new Jasmine2HtmlReporter({
takeScreenshots: false
takeScreenshots: true,
takeScreenshotsOnlyOnFailures: true
}));</code></pre>
Default is <code>true</code>
Default is <code>false</code> (So screenshots are always generated)
### FilePrefix (optional)
Filename for html report.
<pre><code>jasmine.getEnv().addReporter(new Jasmine2HtmlReporter({
savePath: './test/reports/',
filePrefix: 'index'
}));</code></pre>
Default is <code>htmlReport.html</code>
### Consolidate and ConsolidateAll (optional)

@@ -82,0 +92,0 @@

@@ -5,6 +5,6 @@ describe('SPEC 2', function() {

element(by.model('todoText')).sendKeys('write a protractor test');
element(by.model('todoList.todoText')).sendKeys('write a protractor test');
element(by.css('[value="add"]')).click();
var todoList = element.all(by.repeater('todo in todos'));
var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);

@@ -15,9 +15,9 @@ expect(todoList.count()).toEqual(6); //Failure

it('2 segundo it', function() {
it('2 second it', function() {
browser.get('http://www.angularjs.org');
element(by.model('todoText')).sendKeys('write a protractor test');
element(by.model('todoList.todoText')).sendKeys('write a protractor test');
element(by.css('[value="add"]')).click();
var todoList = element.all(by.repeater('todo in todos'));
var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);

@@ -24,0 +24,0 @@ expect(todoList.count()).toEqual(3);

@@ -5,6 +5,6 @@ describe('SPEC 1', function() {

element(by.model('todoText')).sendKeys('write a protractor test');
element(by.model('todoList.todoText')).sendKeys('write a protractor test');
element(by.css('[value="add"]')).click();
var todoList = element.all(by.repeater('todo in todos'));
var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);

@@ -15,9 +15,9 @@ expect(todoList.count()).toEqual(6); //Failure

it('segundo it', function() {
it('second it', function() {
browser.get('http://www.angularjs.org');
element(by.model('todoText')).sendKeys('write a protractor test');
element(by.model('todoList.todoText')).sendKeys('write a protractor test');
element(by.css('[value="add"]')).click();
var todoList = element.all(by.repeater('todo in todos'));
var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);

@@ -24,0 +24,0 @@ expect(todoList.count()).toEqual(3);

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