-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathfile-table.hbs
More file actions
56 lines (56 loc) · 3.24 KB
/
Copy pathfile-table.hbs
File metadata and controls
56 lines (56 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<p><strong>{{ctrf.summary.passed}} passed</strong>, <strong>{{ctrf.summary.failed}} failed</strong>, and <strong>{{addAll ctrf.summary.skipped ctrf.summary.pending ctrf.summary.other}} skipped</strong> in <strong>{{formatDurationFromTimes ctrf.summary.start ctrf.summary.stop}}</strong> across <strong>{{ctrf.extra.files.length}} files</strong></p>
<table>
<thead>
<tr>
<th>File Path</th>
<th>Passed</th>
<th>Failed</th>
<th>Flaky</th>
<th>Skipped</th>
<th>Duration</th>
</tr>
</thead>
<tbody>
{{#each ctrf.extra.files}}
<tr>
<td>
<details>
<summary>
{{#if (eq this.results.extra.groupKey "ungrouped")}}
{{#gt this.results.summary.failed 0}}{{getCtrfEmoji "failed"}}{{else}}{{getCtrfEmoji "passed"}}{{/gt}} filepath not provided
{{else}}
{{#if ../github.repository.htmlUrl}}
<a href="{{../github.repository.htmlUrl}}/blob/{{#if ../github.context.pull_request.head.sha}}{{../github.context.pull_request.head.sha}}{{else}}{{#if ../ctrf.environment.branchName}}{{../ctrf.environment.branchName}}{{else}}{{../github.context.ref}}{{/if}}{{/if}}/{{this.results.extra.groupKey}}">{{#gt this.results.summary.failed 0}}{{getCtrfEmoji "failed"}}{{else}}{{getCtrfEmoji "passed"}}{{/gt}} {{this.results.extra.groupKey}}</a>
{{else}}
{{#gt this.results.summary.failed 0}}{{getCtrfEmoji "failed"}}{{else}}{{getCtrfEmoji "passed"}}{{/gt}} {{this.results.extra.groupKey}}
{{/if}}
{{/if}}
</summary>
{{#each this.results.tests}}
<div> {{getCtrfEmoji this.status}}
{{#unless (eq ../results.extra.groupKey "ungrouped")}}
{{#if this.line}}
{{#if ../../github.repository.htmlUrl}}
<a href="{{../../github.repository.htmlUrl}}/blob/{{#if ../../github.context.pull_request.head.sha}}{{../../github.context.pull_request.head.sha}}{{else}}{{#if ../../ctrf.environment.branchName}}{{../../ctrf.environment.branchName}}{{else}}{{../../github.context.ref}}{{/if}}{{/if}}/{{../results.extra.groupKey}}#L{{this.line}}">{{this.name}}</a>
{{else}}
{{this.name}}
{{/if}}
{{else}}
{{this.name}}
{{/if}}
{{else}}
{{this.name}}
{{/unless}}
{{#if this.flaky}} {{getCtrfEmoji "flaky"}}{{/if}} <em>({{formatDuration this.duration}})</em></div>
{{/each}}
</details>
</td>
<td>{{#if this.results.summary.passed}}{{getCtrfEmoji "passed"}} {{this.results.summary.passed}}{{/if}}</td>
<td>{{#if this.results.summary.failed}}{{getCtrfEmoji "failed"}} {{this.results.summary.failed}}{{/if}}</td>
<td>{{#if (countFlakyTests this.results.tests)}}{{getCtrfEmoji "flaky"}} {{countFlakyTests this.results.tests}}{{/if}}</td>
<td>{{#if (addAll this.results.summary.skipped this.results.summary.pending this.results.summary.other)}}{{getCtrfEmoji "skipped"}} {{addAll this.results.summary.skipped this.results.summary.pending this.results.summary.other}}{{/if}}</td>
<td>{{formatDurationFromTimes 0 this.results.summary.extra.duration}}</td>
</tr>
{{/each}}
</tbody>
</table>