Socket
Socket
Sign inDemoInstall

html-reporter

Package Overview
Dependencies
Maintainers
7
Versions
310
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.7.0 to 2.7.1

lib/static/components/controls/run-button.js

14

CHANGELOG.md

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

<a name="2.7.1"></a>
## [2.7.1](https://github.com/gemini-testing/html-reporter/compare/v2.7.0...v2.7.1) (2018-03-21)
### Bug Fixes
* accept errored tests ([9a11125](https://github.com/gemini-testing/html-reporter/commit/9a11125))
* gui option 'auto-run' ([90bbddd](https://github.com/gemini-testing/html-reporter/commit/90bbddd))
* inline diff images in one row ([3967fe2](https://github.com/gemini-testing/html-reporter/commit/3967fe2))
* retry failed button ([01db91e](https://github.com/gemini-testing/html-reporter/commit/01db91e))
* status of retried test should not change root status ([297c717](https://github.com/gemini-testing/html-reporter/commit/297c717))
<a name="2.7.0"></a>

@@ -7,0 +21,0 @@ # [2.7.0](https://github.com/gemini-testing/html-reporter/compare/v2.6.3...v2.7.0) (2018-03-19)

7

lib/gui/tool-runner-factory/gemini/index.js

@@ -16,6 +16,7 @@ 'use strict';

constructor(paths, tool, {program: globalOpts, pluginConfig}) {
constructor(paths, tool, {program: globalOpts, pluginConfig, options: guiOpts}) {
super(paths);
this._globalOpts = globalOpts;
this._guiOpts = guiOpts;
this._reportPath = pluginConfig.path;

@@ -70,2 +71,4 @@ this._gemini = tool;

const {grep, set, browser} = this._globalOpts;
const {autoRun} = this._guiOpts;
return this._gemini.readTests(this._testFiles, {grep, sets: set})

@@ -90,3 +93,3 @@ .then((collection) => {

this.tree = Object.assign(this.reportBuilder.getResult(), {gui: true});
this.tree = Object.assign(this.reportBuilder.getResult(), {gui: true, autoRun});
this.tree.suites = this._applyReuseData(this.tree.suites);

@@ -93,0 +96,0 @@ });

'use strict';
const _ = require('lodash');
const {NO_REF_IMAGE_ERROR} = require('../../../constants/errors');
const {RUNNING} = require('../../../constants/test-statuses');

@@ -53,16 +52,8 @@ const {findNode} = require('../../../../lib/static/modules/utils');

gemini.on(gemini.events.ERROR, (error) => {
let event;
reportBuilder.addError(error);
if (error.name === NO_REF_IMAGE_ERROR) {
event = gemini.events.TEST_RESULT;
reportBuilder.addFail(error, {reason: 'No reference image available'});
} else {
event = gemini.events.ERROR;
reportBuilder.addError(error);
}
const testResult = prepareTestResult(error);
saveTestCurrentImage(reportBuilder.format(error), reportPath)
.then(() => client.emit(event, testResult));
.then(() => client.emit(gemini.events.ERROR, testResult));
});

@@ -89,3 +80,3 @@

gemini.on(gemini.events.END, () => reportBuilder.save());
gemini.on(gemini.events.END_RUNNER, () => reportBuilder.save());

@@ -92,0 +83,0 @@ proxy(gemini.events.SKIP_STATE);

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

const {getCurrentPath, getReferencePath, getDiffPath, logger} = require('../server-utils');
const {isSuccessStatus, isFailStatus, isErroredStatus, isIdleStatus} = require('../common-utils');
const {setStatusForBranch} = require('../static/modules/utils');

@@ -115,3 +115,3 @@ const NO_STATE = 'NO_STATE';

_createTestResult(result, status) {
_createTestResult(result, props) {
const {browserId, suite, sessionId, description} = result;

@@ -122,3 +122,3 @@ const {baseHost} = this._pluginConfig;

return Object.assign({suiteUrl, name: browserId, metaInfo, status, description});
return Object.assign({suiteUrl, name: browserId, metaInfo, description}, props);
}

@@ -128,3 +128,3 @@

result = this.format(result);
const testResult = _.assign(this._createTestResult(result), props);
const testResult = this._createTestResult(result, props);
const {browserId, suite} = result;

@@ -136,3 +136,2 @@ const {status} = props;

node.browsers = Array.isArray(node.browsers) ? node.browsers : [];
const existing = _.findIndex(node.browsers, {name: browserId});

@@ -142,2 +141,3 @@

node.browsers.push({name: browserId, result: testResult, retries: []});
setStatusForBranch(this._tree, node.suitePath, status);

@@ -157,2 +157,3 @@ return;

stateInBrowser.result = testResult;
setStatusForBranch(this._tree, node.suitePath, status);
}

@@ -209,18 +210,3 @@

function shouldUpdateStatus(prevStatus, status) {
const isFailedStatus = (status) => isFailStatus(status) || isErroredStatus(status);
const isForcedStatus = isFailedStatus(status) || isIdleStatus(status);
if (!prevStatus || isForcedStatus || (!isFailedStatus(prevStatus) && isSuccessStatus(status))) {
return true;
}
return false;
}
function findOrCreate(node, statePath, status) {
if (shouldUpdateStatus(node.status, status)) {
node.status = status;
}
function findOrCreate(node, statePath) {
if (statePath.length === 0) {

@@ -249,3 +235,3 @@ return node;

return findOrCreate(child, statePath, status);
return findOrCreate(child, statePath);
}

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

import ControlButton from './button';
import RunButton from './run-button';

@@ -25,11 +26,10 @@ class ControlButtons extends Component {

render() {
const {actions, failed, running} = this.props;
const {actions, failed, running, autoRun} = this.props;
return (
<div className="control-buttons">
<ControlButton
label="Run"
isAction={true}
<RunButton
autoRun={autoRun}
isDisabled={running}
handler={actions.runAllTests}
isDisabled={running}
/>

@@ -45,3 +45,2 @@ <ControlButton

handler={this._acceptAll}
isDisabled={running || !failed.length}
/>

@@ -58,5 +57,6 @@ <CommonControls/>

failed: state.suites.failed,
running: state.running
running: state.running,
autoRun: state.autoRun
}),
(dispatch) => ({actions: bindActionCreators(actions, dispatch)})
)(ControlButtons);
'use strict';
import React, {Component, Fragment} from 'react';
import {connect} from 'react-redux';
import {initial} from '../modules/actions';
import ControlButtons from './controls/gui-controls';

@@ -8,3 +10,7 @@ import SkippedList from './skipped-list';

export default class Gui extends Component {
class Gui extends Component {
componentDidMount() {
this.props.gui && this.props.initial();
}
render() {

@@ -20,1 +26,3 @@ return (

}
export default connect(({gui}) => ({gui}), {initial})(Gui);

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

import {isSuccessStatus, isFailStatus, isErroredStatus} from '../../../common-utils';
import {NO_REF_IMAGE_ERROR} from '../../../constants/errors';

@@ -60,3 +61,5 @@ class SectionBrowserBody extends Component {

_addExtraButtons() {
const {result: {status}, gui, running} = this.props;
const {result: {status, reason}, gui, running} = this.props;
const stack = reason && reason.stack;
const acceptDisabled = !(isErroredStatus(status) && stack.startsWith(NO_REF_IMAGE_ERROR) || isFailStatus(status));
const retryDisabled = running || isSuccessStatus(status) || (!isFailStatus(status) && !isErroredStatus(status));

@@ -70,3 +73,3 @@

isSuiteControl={true}
isDisabled={!isFailStatus(status)}
isDisabled={acceptDisabled}
handler={this.onSuiteAccept}

@@ -73,0 +76,0 @@ />

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

import {bindActionCreators} from 'redux';
import {initial, suiteBegin, testBegin, testResult, updateResult, testsEnd} from '../modules/actions';
import {suiteBegin, testBegin, testResult, updateResult, testsEnd} from '../modules/actions';

@@ -19,7 +19,3 @@ class Suites extends Component {

componentDidMount() {
const {gui, actions} = this.props;
if (gui) {
actions.initial();
this._subscribeToEvents();
}
this.props.gui && this._subscribeToEvents();
}

@@ -76,3 +72,3 @@

const actions = {initial, testBegin, suiteBegin, testResult, updateResult, testsEnd};
const actions = {testBegin, suiteBegin, testResult, updateResult, testsEnd};

@@ -79,0 +75,0 @@ export default connect(

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

running: false,
autoRun: false,
skips: [],

@@ -8,0 +9,0 @@ suites: {

@@ -34,2 +34,13 @@ 'use strict';

switch (action.type) {
case actionNames.VIEW_INITIAL: {
const {gui, autoRun, suites, skips} = action.payload;
const failed = filterFailedSuites(cloneDeep(suites));
return merge({}, state, {
gui,
autoRun,
skips,
suites: {all: suites, failed}
});
}
case actionNames.RUN_ALL_TESTS: {

@@ -44,11 +55,2 @@ const suites = cloneDeep(state.suites.all);

}
case actionNames.VIEW_INITIAL: {
const {gui, suites, skips} = action.payload;
return merge({}, state, {
gui,
skips,
suites: {all: suites}
});
}
case actionNames.SUITE_BEGIN: {

@@ -55,0 +57,0 @@ const suites = cloneDeep(state.suites.all);

@@ -82,11 +82,13 @@ 'use strict';

const node = findNode(nodes, suitePath);
if (node) {
if ((isSuccessStatus(status) || isUpdatedStatus(status)) && hasFails(node)) {
return;
}
if (!node) {
return;
}
node.status = status;
suitePath = suitePath.slice(0, -1);
setStatusForBranch(nodes, suitePath, status);
if ((isSuccessStatus(status) || isUpdatedStatus(status)) && hasFails(node)) {
return;
}
node.status = status;
suitePath = suitePath.slice(0, -1);
setStatusForBranch(nodes, suitePath, status);
}

@@ -93,0 +95,0 @@

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

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc