diff --git a/lib/reporters/html/lib.js b/lib/reporters/html/lib.js index 2033c1eb0..b5be0900c 100644 --- a/lib/reporters/html/lib.js +++ b/lib/reporters/html/lib.js @@ -11,7 +11,6 @@ var _ = require('lodash'), absolutePath = _.partial(path.resolve, REPORT_OUT_DIR); - /** * @param {String} kind - одно из значение 'ref', 'current', 'diff' * @param {StateResult} result diff --git a/lib/reporters/html/static/report.css b/lib/reporters/html/static/report.css index 8ec508f10..49fff088f 100644 --- a/lib/reporters/html/static/report.css +++ b/lib/reporters/html/static/report.css @@ -81,6 +81,16 @@ user-select: none; } +.section__title_skipped { + color: #ccc; + cursor: default; + + -moz-user-select: text; + -webkit-user-select: text; + -ms-user-select: text; + user-select: text; +} + .section__title:before, .meta-info__switcher:before { display: inline-block; margin-right: 2px; diff --git a/lib/reporters/html/templates/suite.hbs b/lib/reporters/html/templates/suite.hbs index 3843bf4ae..52717b72a 100644 --- a/lib/reporters/html/templates/suite.hbs +++ b/lib/reporters/html/templates/suite.hbs @@ -13,12 +13,14 @@ {{#each browsers}}
{{#if result.skipped}} - {{#if result.reason}} -
[skipped] {{result.name}}, reason: {{result.reason}}
- {{/if}} - {{#unless result.reason}} -
[skipped] {{result.name}}
- {{/unless}} +
+ {{#if result.reason}} + [skipped] {{result.name}}, reason: {{{result.reason}}} + {{/if}} + {{#unless result.reason}} + [skipped] {{result.name}} + {{/unless}} +
{{/if}} {{#unless result.skipped}}
diff --git a/lib/reporters/html/view-model.js b/lib/reporters/html/view-model.js index 1f05f54e7..04481018c 100644 --- a/lib/reporters/html/view-model.js +++ b/lib/reporters/html/view-model.js @@ -18,17 +18,15 @@ module.exports = class ViewModel { * @param {StateResult} result */ addSkipped(result) { + const comment = result.suite.skipComment && wrapLinkByTag(result.suite.skipComment); + + this._skips.push({suite: result.suite.fullName, browser: result.browserId, comment}); + this._addTestResult(result, { skipped: true, - reason: result.suite.skipComment + reason: comment }); - const comment = result.suite.skipComment - && result.suite.skipComment.replace(/https?:\/\/[^\s]*/g, (url) => { - return `${url}`; - }); - this._skips.push({suite: result.suite.fullName, browser: result.browserId, comment}); - this._counter.onSkipped(result); } @@ -208,3 +206,9 @@ function findOrCreate(node, statePath) { return findOrCreate(child, statePath); } + +function wrapLinkByTag(text) { + return text.replace(/https?:\/\/[^\s]*/g, (url) => { + return `${url}`; + }); +}