html-reporter
Advanced tools
Comparing version 2.16.0 to 2.17.0
@@ -5,2 +5,13 @@ # Change Log | ||
<a name="2.17.0"></a> | ||
# [2.17.0](https://github.com/gemini-testing/html-reporter/compare/v2.16.0...v2.17.0) (2018-05-29) | ||
### Features | ||
* enable retry button for passed tests ([#115](https://github.com/gemini-testing/html-reporter/issues/115)) ([b11661c](https://github.com/gemini-testing/html-reporter/commit/b11661c)) | ||
* show all meta info from test in report ([#114](https://github.com/gemini-testing/html-reporter/issues/114)) ([894b954](https://github.com/gemini-testing/html-reporter/commit/894b954)) | ||
<a name="2.16.0"></a> | ||
@@ -7,0 +18,0 @@ # [2.16.0](https://github.com/gemini-testing/html-reporter/compare/v2.15.0...v2.16.0) (2018-05-17) |
@@ -107,4 +107,5 @@ 'use strict'; | ||
const suiteUrl = suite.getUrl({browserId, baseHost}); | ||
const metaInfo = {url: suite.fullUrl, file: suite.file, sessionId}; | ||
const metaInfo = _.merge(result.meta, {url: suite.fullUrl, file: suite.file, sessionId}); | ||
return Object.assign({suiteUrl, name: browserId, metaInfo, description}, props); | ||
@@ -111,0 +112,0 @@ } |
@@ -12,3 +12,2 @@ 'use strict'; | ||
import * as actions from '../../modules/actions'; | ||
import {isSuccessStatus, isFailStatus, isErroredStatus} from '../../../common-utils'; | ||
import {isAcceptable} from '../../modules/utils'; | ||
@@ -57,5 +56,3 @@ | ||
const {gui, running} = this.props; | ||
const {status} = activeResult; | ||
const acceptDisabled = !isAcceptable(activeResult); | ||
const retryDisabled = running || isSuccessStatus(status) || (!isFailStatus(status) && !isErroredStatus(status)); | ||
@@ -74,3 +71,3 @@ return gui | ||
isSuiteControl={true} | ||
isDisabled={retryDisabled} | ||
isDisabled={running} | ||
handler={this.onTestRetry} | ||
@@ -77,0 +74,0 @@ /> |
'use strict'; | ||
import url from 'url'; | ||
import React, {Component, Fragment} from 'react'; | ||
@@ -8,8 +9,22 @@ import PropTypes from 'prop-types'; | ||
const mkLinkToUrl = (url, text) => { | ||
const mkLinkToUrl = (url, text = url) => { | ||
return <a data-suite-view-link={url} className="section__icon_view-local" target="_blank" href={url}>{text}</a>; | ||
}; | ||
const isUrl = (str) => { | ||
if (typeof str !== 'string') { | ||
return false; | ||
} | ||
const parsedUrl = url.parse(str); | ||
return parsedUrl.host && parsedUrl.protocol; | ||
}; | ||
const metaToElements = (metaInfo) => { | ||
return map(metaInfo, (value, key) => { | ||
if (isUrl(value)) { | ||
value = mkLinkToUrl(value); | ||
} | ||
return <div key = {key} className="toggle-open__item"><span className="toggle-open__item-key">{key}</span>: {value}</div>; | ||
@@ -26,8 +41,5 @@ }); | ||
render() { | ||
const {metaInfo: {url, file, sessionId}, suiteUrl} = this.props; | ||
const metaElements = metaToElements({ | ||
url: mkLinkToUrl(suiteUrl, url), | ||
file, | ||
sessionId | ||
}); | ||
const {metaInfo, suiteUrl} = this.props; | ||
const formattedMetaInfo = Object.assign(metaInfo, {url: mkLinkToUrl(suiteUrl, metaInfo.url)}); | ||
const metaElements = metaToElements(formattedMetaInfo); | ||
@@ -34,0 +46,0 @@ return ( |
@@ -86,2 +86,6 @@ 'use strict'; | ||
get meta() { | ||
return this._testResult.meta; | ||
} | ||
prepareTestResult() { | ||
@@ -88,0 +92,0 @@ const {title: name, browserId} = this._testResult; |
{ | ||
"name": "html-reporter", | ||
"version": "2.16.0", | ||
"version": "2.17.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": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1381286
94
7140
0