Skip to content

Commit

Permalink
Make test result labels more stylable
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph committed Apr 1, 2024
1 parent 1513bb8 commit 76b6717
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 33 deletions.
6 changes: 6 additions & 0 deletions allure-generator/src/main/javascript/blocks/pane/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,11 @@

&__section-title {
margin: 0 0 $gap-size;

@at-root #{selector-append('span', &)} {
&::after {
content: ':';
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{#if categories}}
{{t 'testResult.categories.name'}}:
{{#each categories}}
<span>{{name}} </span>
{{/each}}
{{/if}}
<span class="pane__section-title">{{t 'testResult.categories.name'}}</span>
<span class="pane__section-content">
{{#each categories}}
<span>{{name}} </span>
{{/each}}
</span>
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#if descriptionHtml}}
<h3 class="pane__section-title">{{t 'testResult.description.name'}}</h3>
<div class="description__text">{{{descriptionHtml}}}</div>
<div class="pane__section-content description__text">{{{descriptionHtml}}}</div>
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{#if time}}
<span data-tooltip="{{date time.start}} {{time time.start}}&nbsp;&ndash;&nbsp;{{time time.stop}}">
{{t 'testResult.duration.name'}}:
<span class="fa fa-clock-o"></span>
{{duration time.duration 2}}
</span>
{{/if}}
<div data-tooltip="{{date time.start}} {{time time.start}}&nbsp;&ndash;&nbsp;{{time time.stop}}">
<span class="pane__section-title">{{t 'testResult.duration.name'}}</span>
<span class="pane__section-content">
<span class="fa fa-clock-o"></span>
{{duration time.duration 2}}
</span>
</div>
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{{#if links}}
<h3 class="pane__section-title">{{t 'testResult.links.name'}}</h3>
{{#each links}}
<span class="testresult-link">
{{#if (eq type "issue")}}
<span class="fa fa-bug"></span>
{{/if}}
{{#if (eq type "tms")}}
<span class="fa fa-database"></span>
{{/if}}
<a class="link" href="{{default url name}}" target="_blank">{{default name url 'link'}}</a>
</span>
{{/each}}
<div class="pane__section-content">
{{#each links}}
<span class="testresult-link">
{{#if (eq type "issue")}}
<span class="fa fa-bug"></span>
{{/if}}
{{#if (eq type "tms")}}
<span class="fa fa-database"></span>
{{/if}}
<a class="link" href="{{default url name}}" target="_blank">{{default name url 'link'}}</a>
</span>
{{/each}}
</div>
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#if owner}}
<h3 class="pane__section-title">{{t 'testResult.owner.name'}}</h3>
<div>{{owner}}</div>
{{/if}}
<div class="pane__section-content">{{owner}}</div>
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{#if parameters.length}}
<h3>{{t 'testResult.parameters.name'}}</h3>
<h3 class="pane__section-title">{{t 'testResult.parameters.name'}}</h3>
<div class="pane__section-content">
{{#each parameters}}
<div class="environment long-line line-ellipsis">
<span class="environment__key">{{#if name}}{{name}}{{else}}&lt;null&gt;{{/if}}</span>:
Expand All @@ -10,4 +11,5 @@
{{/if}}
</div>
{{/each}}
{{/if}}
</div>
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{#if severity}}
{{t 'testResult.severity.name'}}:
{{t (concat 'testResult.severity.' severity)}}
<span class="pane__section-title">{{t 'testResult.severity.name'}}</span>
<span class="pane__section-content" data-severity="{{severity}}">
{{t (concat 'testResult.severity.' severity)}}
</span>
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{{#if tags}}
{{t 'testResult.tags.name'}}: {{#each tags}}
<span class="label label__info">{{#if this}}{{this}}{{else}}null{{/if}}</span>
{{/each}}
{{/if}}
<span class="pane__section-title">{{t 'testResult.tags.name'}}</span>
<span class="pane__section-content">
{{#each tags}}
<span class="label label__info">{{#if this}}{{this}}{{else}}null{{/if}}</span>
{{/each}}
</span>
{{/if}}

0 comments on commit 76b6717

Please sign in to comment.