This repository was archived by the owner on Sep 21, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +29
-14
lines changed Expand file tree Collapse file tree 4 files changed +29
-14
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ var _ = require('lodash'),
11
11
12
12
absolutePath = _ . partial ( path . resolve , REPORT_OUT_DIR ) ;
13
13
14
-
15
14
/**
16
15
* @param {String } kind - одно из значение 'ref', 'current', 'diff'
17
16
* @param {StateResult } result
Original file line number Diff line number Diff line change 81
81
user-select : none;
82
82
}
83
83
84
+ .section__title_skipped {
85
+ color : # ccc ;
86
+ cursor : default;
87
+
88
+ -moz-user-select : text;
89
+ -webkit-user-select : text;
90
+ -ms-user-select : text;
91
+ user-select : text;
92
+ }
93
+
84
94
.section__title : before , .meta-info__switcher : before {
85
95
display : inline-block;
86
96
margin-right : 2px ;
Original file line number Diff line number Diff line change 13
13
{{ #each browsers }}
14
14
<div class =" section section_collapsed {{ section-status }} {{ has-retries }} " >
15
15
{{ #if result.skipped }}
16
- {{ #if result.reason }}
17
- <div class =" section__title" >[skipped] {{ result.name }} , reason: {{ result.reason }} </div >
18
- {{ /if }}
19
- {{ #unless result.reason }}
20
- <div class =" section__title" >[skipped] {{ result.name }} </div >
21
- {{ /unless }}
16
+ <div class =" section__title section__title_skipped" >
17
+ {{ #if result.reason }}
18
+ [skipped] {{ result.name }} , reason: {{{ result.reason }}}
19
+ {{ /if }}
20
+ {{ #unless result.reason }}
21
+ [skipped] {{ result.name }}
22
+ {{ /unless }}
23
+ </div >
22
24
{{ /if }}
23
25
{{ #unless result.skipped }}
24
26
<div class =" section__title" >
Original file line number Diff line number Diff line change @@ -18,17 +18,15 @@ module.exports = class ViewModel {
18
18
* @param {StateResult } result
19
19
*/
20
20
addSkipped ( result ) {
21
+ const comment = result . suite . skipComment && wrapLinkByTag ( result . suite . skipComment ) ;
22
+
23
+ this . _skips . push ( { suite : result . suite . fullName , browser : result . browserId , comment} ) ;
24
+
21
25
this . _addTestResult ( result , {
22
26
skipped : true ,
23
- reason : result . suite . skipComment
27
+ reason : comment
24
28
} ) ;
25
29
26
- const comment = result . suite . skipComment
27
- && result . suite . skipComment . replace ( / h t t p s ? : \/ \/ [ ^ \s ] * / g, ( url ) => {
28
- return `<a target="_blank" href="${ url } ">${ url } </a>` ;
29
- } ) ;
30
- this . _skips . push ( { suite : result . suite . fullName , browser : result . browserId , comment} ) ;
31
-
32
30
this . _counter . onSkipped ( result ) ;
33
31
}
34
32
@@ -208,3 +206,9 @@ function findOrCreate(node, statePath) {
208
206
209
207
return findOrCreate ( child , statePath ) ;
210
208
}
209
+
210
+ function wrapLinkByTag ( text ) {
211
+ return text . replace ( / h t t p s ? : \/ \/ [ ^ \s ] * / g, ( url ) => {
212
+ return `<a target="_blank" href="${ url } ">${ url } </a>` ;
213
+ } ) ;
214
+ }
You can’t perform that action at this time.
0 commit comments