Socket
Socket
Sign inDemoInstall

html-reporter

Package Overview
Dependencies
Maintainers
7
Versions
309
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-reporter - npm Package Compare versions

Comparing version 2.15.0 to 2.16.0

10

CHANGELOG.md

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

<a name="2.16.0"></a>
# [2.16.0](https://github.com/gemini-testing/html-reporter/compare/v2.15.0...v2.16.0) (2018-05-17)
### Features
* **hermione:** show the first 'assertView' command result ([873c002](https://github.com/gemini-testing/html-reporter/commit/873c002))
<a name="2.15.0"></a>

@@ -7,0 +17,0 @@ # [2.15.0](https://github.com/gemini-testing/html-reporter/compare/v2.14.0...v2.15.0) (2018-04-22)

2

lib/gui/tool-runner-factory/base-tool-runner.js

@@ -31,3 +31,3 @@ 'use strict';

this._eventSource = new EventSource();
this._reportBuilder = ReportBuilderFactory.create(toolName, tool.config, pluginConfig);
this._reportBuilder = ReportBuilderFactory.create(toolName, tool, pluginConfig);
}

@@ -34,0 +34,0 @@

@@ -46,3 +46,3 @@ 'use strict';

_run(prepareData, prepareImages) {
const reportBuilder = ReportBuilderFactory.create(this._toolName, this._tool.config, this._config);
const reportBuilder = ReportBuilderFactory.create(this._toolName, this._tool, this._config);
const generateReport = Promise

@@ -49,0 +49,0 @@ .all([

@@ -10,5 +10,5 @@ 'use strict';

module.exports = {
create: (toolName, toolConfig, pluginConfig) => {
return ReportBuilder.create(toolConfig, pluginConfig, adapters[toolName]);
create: (toolName, tool, pluginConfig) => {
return ReportBuilder.create(tool, pluginConfig, adapters[toolName]);
}
};

@@ -14,10 +14,10 @@ 'use strict';

module.exports = class ReportBuilder {
static create(toolConfig, pluginConfig, TestAdapter) {
return new ReportBuilder(toolConfig, pluginConfig, TestAdapter);
static create(tool, pluginConfig, TestAdapter) {
return new ReportBuilder(tool, pluginConfig, TestAdapter);
}
constructor(toolConfig, pluginConfig, TestAdapter) {
constructor(tool, pluginConfig, TestAdapter) {
this._tree = {name: 'root'};
this._skips = [];
this._toolConfig = toolConfig;
this._tool = tool;
this._pluginConfig = pluginConfig;

@@ -28,3 +28,3 @@ this._TestAdapter = TestAdapter;

format(result) {
return this._TestAdapter.create(result, this._toolConfig);
return this._TestAdapter.create(result, this._tool);
}

@@ -31,0 +31,0 @@

@@ -9,6 +9,6 @@ 'use strict';

module.exports = class GeminiTestResultAdapter extends TestAdapter {
constructor(testResult, config) {
constructor(testResult, tool = {}) {
super(testResult);
this._suite = GeminiSuiteAdapter.create(this._testResult.suite, config);
this._suite = GeminiSuiteAdapter.create(this._testResult.suite, tool.config);
}

@@ -15,0 +15,0 @@

@@ -10,5 +10,5 @@ 'use strict';

module.exports = class HermioneTestResultAdapter extends TestAdapter {
constructor(testResult, config = {}) {
constructor(testResult, tool) {
super(testResult);
this._config = config;
this._tool = tool;

@@ -19,11 +19,18 @@ this._suite = HermioneSuiteAdapter.create(this._testResult);

saveDiffTo(...args) {
return this._testResult.err.saveDiffTo(...args);
return (this._firstAssertViewFail || this._testResult.err).saveDiffTo(...args);
}
hasDiff() {
return _.get(this._testResult, 'err.type') === IMAGE_DIFF_ERROR;
return this._firstAssertViewFail
? this._firstAssertViewFail instanceof this._tool.errors.ImageDiffError
: _.get(this._testResult, 'err.type') === IMAGE_DIFF_ERROR;
}
// hack which should be removed when html-reporter is able to show all assert view fails for one test
get _firstAssertViewFail() {
return _.find(this._testResult.assertViewResults, (result) => result instanceof Error);
}
get error() {
return _.pick(this._testResult.err, ['message', 'stack', 'stateName']);
return _.pick(this._firstAssertViewFail || this._testResult.err, ['message', 'stack', 'stateName']);
}

@@ -44,3 +51,3 @@

const {retry} = this._config.forBrowser(this._testResult.browserId);
const {retry} = this._tool.config.forBrowser(this._testResult.browserId);
return this._testResult.retriesLeft >= 0

@@ -57,7 +64,11 @@ ? retry - this._testResult.retriesLeft - 1

get referencePath() {
return _.get(this._testResult, 'err.refImagePath');
return this._firstAssertViewFail
? _.get(this._firstAssertViewFail, 'refImagePath')
: _.get(this._testResult, 'err.refImagePath');
}
get currentPath() {
return _.get(this._testResult, 'err.currentImagePath');
return this._firstAssertViewFail
? _.get(this._firstAssertViewFail, 'currentImagePath')
: _.get(this._testResult, 'err.currentImagePath');
}

@@ -70,3 +81,5 @@

get assertViewState() {
return _.get(this._testResult, 'err.stateName');
return this._firstAssertViewFail
? _.get(this._firstAssertViewFail, 'stateName')
: _.get(this._testResult, 'err.stateName');
}

@@ -73,0 +86,0 @@

'use strict';
module.exports = class TestAdapter {
static create(testResult = {}, config = {}) {
return new this(testResult, config);
static create(testResult = {}, tool) {
return new this(testResult, tool);
}

@@ -7,0 +7,0 @@

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

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc