From 76b6717cba770f316847ad9dbf05361457d4ec48 Mon Sep 17 00:00:00 2001 From: Yaroslav Serhieiev Date: Fri, 29 Mar 2024 10:26:40 +0200 Subject: [PATCH] Make test result labels more stylable --- .../main/javascript/blocks/pane/styles.scss | 6 +++++ .../testresult-category/CategoryView.hbs | 12 ++++++---- .../DescriptionView.hbs | 2 +- .../testresult-duration/DurationView.hbs | 14 ++++++----- .../plugins/testresult-links/LinksView.hbs | 24 ++++++++++--------- .../plugins/testresult-owner/OwnerView.hbs | 4 ++-- .../testresult-parameters/ParametersView.hbs | 6 +++-- .../testresult-severity/SeverityView.hbs | 6 +++-- .../plugins/testresult-tags/TagsView.hbs | 11 +++++---- 9 files changed, 52 insertions(+), 33 deletions(-) diff --git a/allure-generator/src/main/javascript/blocks/pane/styles.scss b/allure-generator/src/main/javascript/blocks/pane/styles.scss index 1d1bd5543..0e281b355 100644 --- a/allure-generator/src/main/javascript/blocks/pane/styles.scss +++ b/allure-generator/src/main/javascript/blocks/pane/styles.scss @@ -48,5 +48,11 @@ &__section-title { margin: 0 0 $gap-size; + + @at-root #{selector-append('span', &)} { + &::after { + content: ':'; + } + } } } diff --git a/allure-generator/src/main/javascript/plugins/testresult-category/CategoryView.hbs b/allure-generator/src/main/javascript/plugins/testresult-category/CategoryView.hbs index 404d8ee53..2b53eb23e 100644 --- a/allure-generator/src/main/javascript/plugins/testresult-category/CategoryView.hbs +++ b/allure-generator/src/main/javascript/plugins/testresult-category/CategoryView.hbs @@ -1,6 +1,8 @@ {{#if categories}} - {{t 'testResult.categories.name'}}: - {{#each categories}} - {{name}} - {{/each}} -{{/if}} \ No newline at end of file + {{t 'testResult.categories.name'}} + + {{#each categories}} + {{name}} + {{/each}} + +{{/if}} diff --git a/allure-generator/src/main/javascript/plugins/testresult-description/DescriptionView.hbs b/allure-generator/src/main/javascript/plugins/testresult-description/DescriptionView.hbs index ced31904a..832809a5a 100644 --- a/allure-generator/src/main/javascript/plugins/testresult-description/DescriptionView.hbs +++ b/allure-generator/src/main/javascript/plugins/testresult-description/DescriptionView.hbs @@ -1,4 +1,4 @@ {{#if descriptionHtml}}

{{t 'testResult.description.name'}}

-
{{{descriptionHtml}}}
+
{{{descriptionHtml}}}
{{/if}} diff --git a/allure-generator/src/main/javascript/plugins/testresult-duration/DurationView.hbs b/allure-generator/src/main/javascript/plugins/testresult-duration/DurationView.hbs index c43779eca..36fc860ce 100644 --- a/allure-generator/src/main/javascript/plugins/testresult-duration/DurationView.hbs +++ b/allure-generator/src/main/javascript/plugins/testresult-duration/DurationView.hbs @@ -1,7 +1,9 @@ {{#if time}} - - {{t 'testResult.duration.name'}}: - - {{duration time.duration 2}} - -{{/if}} \ No newline at end of file +
+ {{t 'testResult.duration.name'}} + + + {{duration time.duration 2}} + +
+{{/if}} diff --git a/allure-generator/src/main/javascript/plugins/testresult-links/LinksView.hbs b/allure-generator/src/main/javascript/plugins/testresult-links/LinksView.hbs index 66bb2d04d..f44eab077 100644 --- a/allure-generator/src/main/javascript/plugins/testresult-links/LinksView.hbs +++ b/allure-generator/src/main/javascript/plugins/testresult-links/LinksView.hbs @@ -1,14 +1,16 @@ {{#if links}}

{{t 'testResult.links.name'}}

- {{#each links}} - - {{#if (eq type "issue")}} - - {{/if}} - {{#if (eq type "tms")}} - - {{/if}} - {{default name url 'link'}} - - {{/each}} +
+ {{#each links}} + + {{#if (eq type "issue")}} + + {{/if}} + {{#if (eq type "tms")}} + + {{/if}} + {{default name url 'link'}} + + {{/each}} +
{{/if}} diff --git a/allure-generator/src/main/javascript/plugins/testresult-owner/OwnerView.hbs b/allure-generator/src/main/javascript/plugins/testresult-owner/OwnerView.hbs index 9702ac9e5..5f25570fb 100644 --- a/allure-generator/src/main/javascript/plugins/testresult-owner/OwnerView.hbs +++ b/allure-generator/src/main/javascript/plugins/testresult-owner/OwnerView.hbs @@ -1,4 +1,4 @@ {{#if owner}}

{{t 'testResult.owner.name'}}

-
{{owner}}
-{{/if}} \ No newline at end of file +
{{owner}}
+{{/if}} diff --git a/allure-generator/src/main/javascript/plugins/testresult-parameters/ParametersView.hbs b/allure-generator/src/main/javascript/plugins/testresult-parameters/ParametersView.hbs index 0d755ab64..75d406769 100644 --- a/allure-generator/src/main/javascript/plugins/testresult-parameters/ParametersView.hbs +++ b/allure-generator/src/main/javascript/plugins/testresult-parameters/ParametersView.hbs @@ -1,5 +1,6 @@ {{#if parameters.length}} -

{{t 'testResult.parameters.name'}}

+

{{t 'testResult.parameters.name'}}

+
{{#each parameters}}
{{#if name}}{{name}}{{else}}<null>{{/if}}: @@ -10,4 +11,5 @@ {{/if}}
{{/each}} -{{/if}} \ No newline at end of file +
+{{/if}} diff --git a/allure-generator/src/main/javascript/plugins/testresult-severity/SeverityView.hbs b/allure-generator/src/main/javascript/plugins/testresult-severity/SeverityView.hbs index 467043120..6174b5314 100644 --- a/allure-generator/src/main/javascript/plugins/testresult-severity/SeverityView.hbs +++ b/allure-generator/src/main/javascript/plugins/testresult-severity/SeverityView.hbs @@ -1,4 +1,6 @@ {{#if severity}} - {{t 'testResult.severity.name'}}: - {{t (concat 'testResult.severity.' severity)}} + {{t 'testResult.severity.name'}} + + {{t (concat 'testResult.severity.' severity)}} + {{/if}} diff --git a/allure-generator/src/main/javascript/plugins/testresult-tags/TagsView.hbs b/allure-generator/src/main/javascript/plugins/testresult-tags/TagsView.hbs index fc100ca78..491d321db 100644 --- a/allure-generator/src/main/javascript/plugins/testresult-tags/TagsView.hbs +++ b/allure-generator/src/main/javascript/plugins/testresult-tags/TagsView.hbs @@ -1,5 +1,8 @@ {{#if tags}} - {{t 'testResult.tags.name'}}: {{#each tags}} - {{#if this}}{{this}}{{else}}null{{/if}} - {{/each}} -{{/if}} \ No newline at end of file + {{t 'testResult.tags.name'}} + + {{#each tags}} + {{#if this}}{{this}}{{else}}null{{/if}} + {{/each}} + +{{/if}}