Socket
Socket
Sign inDemoInstall

html-reporter

Package Overview
Dependencies
19
Maintainers
7
Versions
295
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.1 to 1.0.0

lib/static/report.min.js

8

CHANGELOG.md

@@ -5,2 +5,10 @@ # Change Log

<a name="1.0.0"></a>
# [1.0.0](https://github.com/gemini-testing/html-reporter/compare/v0.5.0...v1.0.0) (2017-10-19)
### Features
* Implement view mode switcher ([6237582](https://github.com/gemini-testing/html-reporter/commit/6237582))
* Remove "errorsOnly" option
<a name="0.7.1"></a>

@@ -7,0 +15,0 @@ ## [0.7.1](https://github.com/gemini-testing/html-reporter/compare/v0.7.0...v0.7.1) (2017-10-18)

4

index.js

@@ -76,6 +76,2 @@ 'use strict';

function handleTestResultEvent_(testResult) {
if (pluginConfig.errorsOnly && testResult.equal) {
return Promise.resolve();
}
const actions = [

@@ -82,0 +78,0 @@ copyImage(testResult.referencePath, utils.getReferenceAbsolutePath(testResult, reportDir))

@@ -11,2 +11,3 @@ 'use strict';

const ENV_PREFIX = 'html_reporter_';
const CLI_PREFIX = '--html-reporter-';

@@ -24,6 +25,5 @@ const getParser = () => {

}),
errorsOnly: option({
defaultValue: false,
parseEnv: JSON.parse,
validate: _.isBoolean
defaultView: option({
defaultValue: 'all',
validate: _.isString
}),

@@ -34,3 +34,3 @@ baseHost: option({

})
}), {envPrefix: ENV_PREFIX});
}), {envPrefix: ENV_PREFIX, cliPrefix: CLI_PREFIX});
};

@@ -37,0 +37,0 @@

@@ -49,1 +49,15 @@ /* global Handlebars */

});
Handlebars.registerHelper('view-mode-select', function(defaultValue) {
const selectData = [
{value: 'all', text: 'Show all'},
{value: 'failed', text: 'Show only failed'}
];
const selectOptions = selectData.map((d) => {
const selected = d.value === defaultValue ? 'selected="selected"' : '';
return `<option value="${d.value}" ${selected}>${d.text}</option>`;
}).join('');
return `<select id="viewMode">${selectOptions}</select>`;
});

@@ -21,6 +21,2 @@ 'use strict';

addSkipped(result) {
if (this._pluginConfig.errorsOnly) {
return;
}
const comment = result.suite.skipComment && wrapLinkByTag(result.suite.skipComment);

@@ -40,6 +36,2 @@

addSuccess(result) {
if (this._pluginConfig.errorsOnly) {
return;
}
this._addTestResult(result, {

@@ -99,7 +91,8 @@ success: true,

getResult(stats) {
const {defaultView, baseHost} = this._pluginConfig;
return _.extend({
skips: _.uniq(this._skips, JSON.stringify),
suites: this._tree.children,
errorsOnly: this._pluginConfig.errorsOnly,
baseHost: this._pluginConfig.baseHost
config: {defaultView, baseHost}
}, stats);

@@ -106,0 +99,0 @@ }

{
"name": "html-reporter",
"version": "0.7.1",
"version": "1.0.0",
"description": "Plugin for gemini which is intended to aggregate the results of tests running into html report",

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

"prepublish": "webpack",
"start": "webpack --watch",
"commitmsg": "conventional-changelog-lint -e",

@@ -38,3 +39,3 @@ "release": "standard-version"

"fs-extra": "^2.0.0",
"gemini-configparser": "^0.4.0",
"gemini-configparser": "^1.0.0",
"lodash": "^4.17.4",

@@ -41,0 +42,0 @@ "urijs": "^1.18.12"

@@ -22,3 +22,5 @@ # html-reporter

directory.
* **errorsOnly** (optional) `Boolean` - report with only failed tests; by default `false`
* **defaultView** (optional) `String` - default view mode. Available values are:
* `all` - show all tests. Default value.
* `failed` - show only failed tests.
* **baseHost** (optional) - `String` - it changes original host for view in the browser; by default original host does not change

@@ -28,3 +30,10 @@

(see [configparser](https://github.com/gemini-testing/configparser)).
Use `html_reporter_` prefix for the environment variables and `--html-reporter-` for the cli options.
For example you can override `path` option like so:
```bash
$ html_reporter_path=custom/dir gemini test
$ gemini test --html-reporter-path custom/dir
```
### Usage

@@ -42,3 +51,3 @@

path: 'my/gemini-reports',
errorsOnly: false,
defaultView: 'all',
baseHost: 'test.com'

@@ -45,0 +54,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc