Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make test result labels more stylable #2460

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}}
Loading