Releases: abhishekswain/jasmine2-protractor-utils
35Degree
30Degree
Bug Fixes.
25Degree
Issue fixes :
Cleans screenshots when clearFoldersBeforeTest flag set to true.
If screenshots path is specified without ending , then screenshots are generated in incorrect location.
Other minor Fixes.
20Degree
Added feature to generate HTML reports.
10Degree
Added feature to fail a spec/test , if browser console log has errors.
Added configurations:
failTestOnErrorLog: {
failTestOnErrorLogLevel: {Number}, (Default - 900)
excludeKeywords: {A JSON Array}
}
0Degree
Initial Release:
jasmine2-protractor-utils
Utilities for Protractor with jasmine2 [Screenshot, Browser Console log]
- This plugin can take a screenshot for each Jasmine2 expect failure
- It can take screenshot for each spec failure as well
- TODO: It can fail your spec/test if browser console has errors
- TODO: It can output browser console logs on failure or always :)
Usage
How to install
npm install jasmine2-protractor-utils -g
To install a particular version: npm install jasmine2-protractor-utils@version
Add this plugin to the protractor config file:
exports.config = {
plugins: [{
package: 'jasmine2-protractor-utils',
screenshotOnExpectFailure: {Boolean} (Default - false),
screenshotOnSpecFailure: {Boolean} (Default - false),
screenshotPath: {String} (Default - 'reports/screenshots')
}]
};
package
This is the plugin package name , same as of npm module name for the plugin , 'jasmine2-protractor-utils' usually and preferably
screenshotOnExpectFailure
Takes a screenshot for each Jasmine2 expect failure, is set true.
Screenshot will be taken in 'png' format and file name would be: description+spec description+index.png
Default: false
screenshotOnSpecFailure
Take screenshot for each spec failure , if set to true.
Screenshot will be taken in 'png' format and file name would be: description+spec description.png
Default: false
screenshotPath
Path where screenshots will be saved. If path does not exist , will be created.
e.g './reports/something/savehere/' , please take care of './' and '/' at the beginning and end.
Default: 'reports/screenshots'
TODO
It can fail your spec/test if browser console has errors.
It can output browser console logs on failure or always :)