From 8edee8c3867af336a2ff1d397c41460df15538be Mon Sep 17 00:00:00 2001 From: Jonas Metzener Date: Fri, 21 Oct 2022 16:19:21 +0200 Subject: [PATCH] chore(distribution): cleanup document header template --- .../addon/components/cd-document-header.hbs | 6 ++- .../components/cd-inquiry-answer-form.hbs | 49 +++++++++---------- .../addon/components/cd-inquiry-edit-form.hbs | 1 - .../components/cd-document-header-test.js | 6 +-- .../components/cd-inquiry-answer-form-test.js | 2 +- .../components/cd-inquiry-edit-form-test.js | 2 +- 6 files changed, 31 insertions(+), 35 deletions(-) diff --git a/packages/distribution/addon/components/cd-document-header.hbs b/packages/distribution/addon/components/cd-document-header.hbs index 0f23ea04b..4e9fb1e7e 100644 --- a/packages/distribution/addon/components/cd-document-header.hbs +++ b/packages/distribution/addon/components/cd-document-header.hbs @@ -1,4 +1,4 @@ -

+

{{@name}} {{#if @group}} @@ -9,4 +9,6 @@ {{/if}}
{{yield}} -

\ No newline at end of file +
+ +
\ No newline at end of file diff --git a/packages/distribution/addon/components/cd-inquiry-answer-form.hbs b/packages/distribution/addon/components/cd-inquiry-answer-form.hbs index 069291ad0..667be17fa 100644 --- a/packages/distribution/addon/components/cd-inquiry-answer-form.hbs +++ b/packages/distribution/addon/components/cd-inquiry-answer-form.hbs @@ -11,37 +11,32 @@ @name={{content.document.rootForm.raw.name}} @status={{if (eq this.inquiry.status "READY") this.answerStatus}} > -
- + - {{#if this.inquiryDetails.length}} - + - - - {{/if}} -
- + /> + + {{/if}} -
-
-
{{#if (and (cannot "send inquiry" this.inquiry) diff --git a/packages/distribution/tests/integration/components/cd-document-header-test.js b/packages/distribution/tests/integration/components/cd-document-header-test.js index 979130cce..402d32c0c 100644 --- a/packages/distribution/tests/integration/components/cd-document-header-test.js +++ b/packages/distribution/tests/integration/components/cd-document-header-test.js @@ -19,11 +19,11 @@ module("Integration | Component | cd-document-header", function (hooks) { /> `); - assert.dom("p.uk-text-large").containsText("Test"); - assert.dom("p.uk-text-large .uk-label").hasText("Test"); + assert.dom("[data-test-document-header]").containsText("Test"); + assert.dom("[data-test-document-header] .uk-label").hasText("Test"); this.set("status", null); - assert.dom("p.uk-text-large .uk-label").doesNotExist(); + assert.dom("[data-test-document-header] .uk-label").doesNotExist(); }); }); diff --git a/packages/distribution/tests/integration/components/cd-inquiry-answer-form-test.js b/packages/distribution/tests/integration/components/cd-inquiry-answer-form-test.js index 3e8d9f3aa..17b6bd203 100644 --- a/packages/distribution/tests/integration/components/cd-inquiry-answer-form-test.js +++ b/packages/distribution/tests/integration/components/cd-inquiry-answer-form-test.js @@ -42,7 +42,7 @@ module("Integration | Component | cd-inquiry-answer-form", function (hooks) { await render(hbs``); assert - .dom("p.uk-text-large") + .dom("[data-test-document-header]") .containsText( "Inquiry answer t:caluma.distribution.answer.buttons.compose.status:()" ); diff --git a/packages/distribution/tests/integration/components/cd-inquiry-edit-form-test.js b/packages/distribution/tests/integration/components/cd-inquiry-edit-form-test.js index 0b76eed9c..efdff8ef0 100644 --- a/packages/distribution/tests/integration/components/cd-inquiry-edit-form-test.js +++ b/packages/distribution/tests/integration/components/cd-inquiry-edit-form-test.js @@ -34,7 +34,7 @@ module("Integration | Component | cd-inquiry-edit-form", function (hooks) { await render(hbs``); assert - .dom("p.uk-text-large") + .dom("[data-test-document-header]") .hasText("Inquiry (group2) t:caluma.distribution.status.draft:()"); assert.dom("form").exists(); assert