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 1.2.0 to 1.3.0

15

CHANGELOG.md

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

<a name="1.3.0"></a>
# [1.3.0](https://github.com/gemini-testing/html-reporter/compare/v1.2.0...v1.3.0) (2018-01-22)
### Bug Fixes
* change metaInfo in data.js from html-string to object ([2ea8301](https://github.com/gemini-testing/html-reporter/commit/2ea8301))
### Features
* suites colored in grey if all children are skipped ([b8f784b](https://github.com/gemini-testing/html-reporter/commit/b8f784b))
<a name="1.2.0"></a>

@@ -7,0 +22,0 @@ # [1.2.0](https://github.com/gemini-testing/html-reporter/compare/v1.1.0...v1.2.0) (2017-12-25)

5

lib/static/components/section/section-common.js

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

import {SectionBrowser} from './section-browser';
import {hasFails, hasRetries} from '../../modules/utils';
import {allSkipped, hasFails, hasRetries} from '../../modules/utils';
import Title from './title/simple';

@@ -28,2 +28,3 @@

const retried = hasRetries(suite);
const skipped = allSkipped(suite);

@@ -33,3 +34,3 @@ this.setState({

retried,
skipped: suite.skipped,
skipped,
collapsed: this._shouldBeCollapsed(failed, retried)

@@ -36,0 +37,0 @@ });

7

lib/static/components/state/index.js

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

state: PropTypes.shape({
metaInfo: PropTypes.string.isRequired,
suiteUrl: PropTypes.string.isRequired,
metaInfo: PropTypes.object.isRequired,
error: PropTypes.bool,

@@ -27,3 +28,3 @@ success: PropTypes.bool,

render() {
const {metaInfo, error, success, fail, reason, image,
const {suiteUrl, metaInfo, error, success, fail, reason, image,
expectedPath, actualPath, diffPath} = this.props.state;

@@ -43,3 +44,3 @@

<Fragment>
<MetaInfo metaInfo={metaInfo}/>
<MetaInfo metaInfo={metaInfo} suiteUrl={suiteUrl}/>
{elem}

@@ -46,0 +47,0 @@ </Fragment>

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

import classNames from 'classnames';
import Parser from 'html-react-parser';
import map from 'lodash';
const mkLinkToUrl = (url, text) => {
return <a data-suite-view-link={url} className="section__icon_view-local" target="_blank" href={url}>{text}</a>;
};
const metaToElements = (metaInfo) => {
return map(metaInfo, (value, key) => {
return <div className="meta-info__item"><span className="meta-info__item-key">{key}</span>: {value}</div>;
});
};
export default class MetaInfo extends Component {
static propTypes = {
metaInfo: PropTypes.string.isRequired
metaInfo: PropTypes.object.isRequired,
suiteUrl: PropTypes.string.isRequired
}

@@ -26,2 +37,10 @@

const {url, file, sessionId} = this.props.metaInfo;
const {suiteUrl} = this.props;
const metaElements = metaToElements({
url: mkLinkToUrl(suiteUrl, url),
file,
sessionId
});
return (

@@ -31,3 +50,3 @@ <div className={className}>

<div className="meta-info__content">
{Parser(this.props.metaInfo)}
{metaElements}
</div>

@@ -34,0 +53,0 @@ </div>

'use strict';
import {some} from 'lodash';
export function hasFails(node) {

@@ -15,4 +13,9 @@ const isFailed = node.result && (node.result.error || node.result.fail);

function walk(node, cb) {
return some(node.browsers, cb) || some(node.children, cb);
export function allSkipped(node) {
const isSkipped = node.result && node.result.skipped;
return Boolean(isSkipped || walk(node, allSkipped, Array.prototype.every));
}
function walk(node, cb, fn = Array.prototype.some) {
return node.browsers && fn.call(node.browsers, cb) || node.children && fn.call(node.children, cb);
}

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

const metaInfo = {
url: mkLinkToUrl(suiteUrl, suite.fullUrl),
url: suite.fullUrl,
file: suite.file,

@@ -114,3 +114,3 @@ sessionId: result.sessionId || 'unknown session id'

name: browserId,
metaInfo: stringifyMeta(metaInfo) || 'Meta info is not available'
metaInfo
}, props);

@@ -177,6 +177,2 @@

function mkLinkToUrl(url, text) {
return `<a data-suite-view-link="${url}" class="section__icon_view-local" target="_blank" href="${url}">${text}</a>`;
}
function wrapLinkByTag(text) {

@@ -187,7 +183,1 @@ return text.replace(/https?:\/\/[^\s]*/g, (url) => {

}
function stringifyMeta(obj) {
return _(obj)
.map((value, key) => `<div class="meta-info__item"><span class="meta-info__item-key">${key}</span>: ${value}</div>`)
.join('');
}
{
"name": "html-reporter",
"version": "1.2.0",
"version": "1.3.0",
"description": "Plugin for gemini which is intended to aggregate the results of tests running into html report",

@@ -5,0 +5,0 @@ "main": "index.js",

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