From 39bc18270a715de583ed28790e9ea32049da26e9 Mon Sep 17 00:00:00 2001 From: Jonas Metzener Date: Mon, 28 Nov 2022 14:51:49 +0100 Subject: [PATCH] chore(lint): fix linting errors --- .../components/ca-field-select-test.js | 26 ++-- .../ca-field-alias-input-test.js | 5 +- .../ca-field-function-select-test.js | 6 +- .../components/ca-filter-modal-test.js | 9 +- .../components/ca-report-builder-test.js | 18 +-- .../components/ca-report-list-test.js | 2 +- .../components/ca-toggle-switch-test.js | 22 +-- packages/core/tests/integration/query-test.js | 24 ++- .../components/cd-inquiry-new-form/select.hbs | 1 + .../components/cd-document-header-test.js | 9 +- .../components/cd-inquiry-new-form-test.js | 45 +++--- .../components/cd-navigation/section-test.js | 4 +- .../components/cfb-code-editor-test.js | 46 +++--- .../components/cfb-form-editor-test.js | 11 +- .../cfb-form-editor/general-test.js | 17 +-- .../cfb-form-editor/question-list-test.js | 20 +-- .../question-list/item-test.js | 10 +- .../cfb-form-editor/question-test.js | 95 +++++++++--- .../cfb-form-editor/question/default-test.js | 14 +- .../cfb-form-editor/question/options-test.js | 32 +++- .../question/validation-test.js | 2 +- .../components/cfb-form-list-test.js | 54 +++---- .../components/cfb-form-list/item-test.js | 4 +- .../cfb-jexl-boolean-toggle-switch-test.js | 24 ++- .../components/cfb-toggle-switch-test.js | 22 +-- .../integration/components/cf-content-test.js | 9 +- .../components/cf-field/errors-test.js | 10 +- .../components/cf-field/input-test.js | 144 ++++++------------ .../cf-field/input/action-button-test.js | 16 +- .../cf-field/input/checkbox-test.js | 122 ++++++--------- .../components/cf-field/input/date-test.js | 9 +- .../components/cf-field/input/float-test.js | 15 +- .../components/cf-field/input/integer-test.js | 23 +-- .../cf-field/input/powerselect-test.js | 15 +- .../components/cf-field/input/radio-test.js | 136 +++++++---------- .../components/cf-field/input/static-test.js | 21 +-- .../components/cf-field/input/table-test.js | 24 +-- .../components/cf-field/input/text-test.js | 20 +-- .../cf-field/input/textarea-test.js | 22 +-- .../components/cf-form-wrapper-test.js | 9 +- .../components/cf-pagination-test.js | 9 +- .../components/document-validity-test.js | 67 ++++---- .../integration/helpers/get-widget-test.js | 102 +++++-------- .../components/task-button-test.js | 7 +- .../components/work-item-button-test.js | 11 +- 45 files changed, 568 insertions(+), 745 deletions(-) diff --git a/packages/analytics/tests/integration/components/ca-field-select-test.js b/packages/analytics/tests/integration/components/ca-field-select-test.js index 690ab6551..105c57c71 100644 --- a/packages/analytics/tests/integration/components/ca-field-select-test.js +++ b/packages/analytics/tests/integration/components/ca-field-select-test.js @@ -17,7 +17,7 @@ module("Integration | Component | ca-field-select", function (hooks) { test.skip("it renders", async function (assert) { assert.expect(1); - await render(hbs``); + await render(hbs``); assert.dom(this.element).exists(); }); @@ -26,7 +26,7 @@ module("Integration | Component | ca-field-select", function (hooks) { assert.expect(2); await render( - hbs`` + hbs`` ); assert.dom(this.element).exists(); @@ -38,10 +38,9 @@ module("Integration | Component | ca-field-select", function (hooks) { // TODO: setup mirage to satisfy *fetchOptions - await render(hbs``); + await render( + hbs`` + ); assert .dom("[data-test-field-select-primary-selector]") @@ -60,10 +59,10 @@ module("Integration | Component | ca-field-select", function (hooks) { this.set("path", "grandpa.father.son"); await render(hbs``); + @selectedPath={{this.path}} + @parentPath="" + @onSelect={{this.update}} +/>`); assert .dom("[data-test-field-select-primary-selector]") @@ -96,10 +95,9 @@ module("Integration | Component | ca-field-select", function (hooks) { this.set("path", "grandpa.father.son"); - await render(hbs``); + await render( + hbs`` + ); selectChoose(".ember-power-select-trigger", "father"); assert.verifySteps(["selection"]); diff --git a/packages/analytics/tests/integration/components/ca-field-selector-list/ca-field-alias-input-test.js b/packages/analytics/tests/integration/components/ca-field-selector-list/ca-field-alias-input-test.js index 7ba0766c4..bb1275162 100644 --- a/packages/analytics/tests/integration/components/ca-field-selector-list/ca-field-alias-input-test.js +++ b/packages/analytics/tests/integration/components/ca-field-selector-list/ca-field-alias-input-test.js @@ -21,7 +21,10 @@ module( }); await render( - hbs`` + hbs`` ); assert.dom("[data-test-field-alias-input]").hasValue(this.alias); diff --git a/packages/analytics/tests/integration/components/ca-field-selector-list/ca-field-function-select-test.js b/packages/analytics/tests/integration/components/ca-field-selector-list/ca-field-function-select-test.js index ec4b10bde..459523bf8 100644 --- a/packages/analytics/tests/integration/components/ca-field-selector-list/ca-field-function-select-test.js +++ b/packages/analytics/tests/integration/components/ca-field-selector-list/ca-field-function-select-test.js @@ -23,7 +23,11 @@ module( }); await render( - hbs`` + hbs`` ); const requests = this.server.pretender.handledRequests; diff --git a/packages/analytics/tests/integration/components/ca-filter-modal-test.js b/packages/analytics/tests/integration/components/ca-filter-modal-test.js index 1f89e9d29..8dfda7663 100644 --- a/packages/analytics/tests/integration/components/ca-filter-modal-test.js +++ b/packages/analytics/tests/integration/components/ca-filter-modal-test.js @@ -16,11 +16,10 @@ module("Integration | Component | ca-filter-modal", function (hooks) { assert.dom(this.element).hasText(""); // Template block usage: - await render(hbs` - - template block text - - `); + await render(hbs`{{! template-lint-disable no-bare-strings }} + + template block text +`); assert.dom(this.element).hasText("template block text"); }); diff --git a/packages/analytics/tests/integration/components/ca-report-builder-test.js b/packages/analytics/tests/integration/components/ca-report-builder-test.js index 9cbe80811..16c9e6384 100644 --- a/packages/analytics/tests/integration/components/ca-report-builder-test.js +++ b/packages/analytics/tests/integration/components/ca-report-builder-test.js @@ -51,21 +51,19 @@ module("Integration | Component | ca-report-builder", function (hooks) { }); test("it renders the table from slug", async function (assert) { - await render(hbs` - `); + await render(hbs``); assert.dom("[data-test-analytics-table]").exists(); }); todo("the form for creating new fields works", async function (assert) { - await render(hbs` - `); + await render(hbs``); assert.dom("input[name=alias]").exists({ count: 1 }); // assert.dom("input[name=alias]").("test"); diff --git a/packages/analytics/tests/integration/components/ca-report-list-test.js b/packages/analytics/tests/integration/components/ca-report-list-test.js index 3161f58a9..e97c8c0c6 100644 --- a/packages/analytics/tests/integration/components/ca-report-list-test.js +++ b/packages/analytics/tests/integration/components/ca-report-list-test.js @@ -20,7 +20,7 @@ module("Integration | Component | ca-report-list", function (hooks) { this.set("itemRoute", "demo.builder"); await render( - hbs`` + hbs`` ); assert.dom(this.element).containsText("t:caluma.analytics.list.list-title"); diff --git a/packages/analytics/tests/integration/components/ca-toggle-switch-test.js b/packages/analytics/tests/integration/components/ca-toggle-switch-test.js index 5f18c79d5..b7792b132 100644 --- a/packages/analytics/tests/integration/components/ca-toggle-switch-test.js +++ b/packages/analytics/tests/integration/components/ca-toggle-switch-test.js @@ -14,13 +14,11 @@ module("Integration | Component | ca-toggle-switch", function (hooks) { this.set("value", false); - await render(hbs` - - `); + await render(hbs``); assert.dom("input[name=test]").isNotChecked(); @@ -40,13 +38,9 @@ module("Integration | Component | ca-toggle-switch", function (hooks) { this.set("value", value); }); - await render(hbs` - - `); + await render( + hbs`` + ); assert.dom("input[name=test]").isNotChecked(); diff --git a/packages/core/tests/integration/query-test.js b/packages/core/tests/integration/query-test.js index 9ceae576c..5b95d32ca 100644 --- a/packages/core/tests/integration/query-test.js +++ b/packages/core/tests/integration/query-test.js @@ -33,20 +33,16 @@ class QueryComponent extends Component { } setComponentTemplate( - hbs` - -
    - {{#each this.query.value as |item|}} -
  • {{item.id}}
  • - {{/each}} -
- {{#if this.query.hasNextPage}} - - {{/if}} - `, + hbs`{{! template-lint-disable no-bare-strings }} + +
    + {{#each this.query.value as |item|}} +
  • {{item.id}}
  • + {{/each}} +
+{{#if this.query.hasNextPage}} + +{{/if}}`, QueryComponent ); diff --git a/packages/distribution/addon/components/cd-inquiry-new-form/select.hbs b/packages/distribution/addon/components/cd-inquiry-new-form/select.hbs index 2b6843ca2..0866340d4 100644 --- a/packages/distribution/addon/components/cd-inquiry-new-form/select.hbs +++ b/packages/distribution/addon/components/cd-inquiry-new-form/select.hbs @@ -38,6 +38,7 @@ 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 402d32c0c..390c1c63d 100644 --- a/packages/distribution/tests/integration/components/cd-document-header-test.js +++ b/packages/distribution/tests/integration/components/cd-document-header-test.js @@ -12,12 +12,9 @@ module("Integration | Component | cd-document-header", function (hooks) { test("it renders", async function (assert) { this.status = "Test"; - await render(hbs` - - `); + await render( + hbs`` + ); assert.dom("[data-test-document-header]").containsText("Test"); assert.dom("[data-test-document-header] .uk-label").hasText("Test"); diff --git a/packages/distribution/tests/integration/components/cd-inquiry-new-form-test.js b/packages/distribution/tests/integration/components/cd-inquiry-new-form-test.js index 2d86244b7..45853ba3e 100644 --- a/packages/distribution/tests/integration/components/cd-inquiry-new-form-test.js +++ b/packages/distribution/tests/integration/components/cd-inquiry-new-form-test.js @@ -68,15 +68,12 @@ module("Integration | Component | cd-inquiry-new-form", function (hooks) { }); test("it renders", async function (assert) { - await render(hbs` - - `); + await render(hbs``); assert.dom("button[data-test-type]").exists({ count: 2 }); assert.dom("tr[data-test-group]").exists({ count: 2 }); @@ -92,15 +89,12 @@ module("Integration | Component | cd-inquiry-new-form", function (hooks) { }); test("it can select and reset groups", async function (assert) { - await render(hbs` - - `); + await render(hbs``); assert.dom("ul[data-test-selected-groups]").doesNotExist(); @@ -121,15 +115,12 @@ module("Integration | Component | cd-inquiry-new-form", function (hooks) { assert.deepEqual(model, { from: "1", to: "2" }); }; - await render(hbs` - - `); + await render(hbs``); await click("tr[data-test-group='2']"); await click("tr[data-test-group='3']"); diff --git a/packages/distribution/tests/integration/components/cd-navigation/section-test.js b/packages/distribution/tests/integration/components/cd-navigation/section-test.js index b32030593..577770025 100644 --- a/packages/distribution/tests/integration/components/cd-navigation/section-test.js +++ b/packages/distribution/tests/integration/components/cd-navigation/section-test.js @@ -56,9 +56,7 @@ module("Integration | Component | cd-navigation/section", function (hooks) { this.owner.lookup("service:router").isActive = () => true; - await render(hbs` - - `); + await render(hbs``); assert .dom("li:first-of-type > a") diff --git a/packages/form-builder/tests/integration/components/cfb-code-editor-test.js b/packages/form-builder/tests/integration/components/cfb-code-editor-test.js index cb98d14bd..bbd2ba856 100644 --- a/packages/form-builder/tests/integration/components/cfb-code-editor-test.js +++ b/packages/form-builder/tests/integration/components/cfb-code-editor-test.js @@ -8,14 +8,12 @@ module("Integration | Component | cfb-code-editor", function (hooks) { setupRenderingTest(hooks); test("it updates value", async function (assert) { - await render(hbs` - - `); + await render(hbs``); // use `typeIn` because codejar listens to keydown event await typeIn("[name=editor]", "1 + 1"); @@ -32,15 +30,13 @@ module("Integration | Component | cfb-code-editor", function (hooks) { test("it updates value on change from outside", async function (assert) { this.value = "true"; - await render(hbs` - - `); + await render(hbs``); assert.dom(this.element).hasText("true"); @@ -53,15 +49,13 @@ module("Integration | Component | cfb-code-editor", function (hooks) { test("it updates json data", async function (assert) { this.value = {}; - await render(hbs` - - `); + await render(hbs``); await fillIn("[name=editor]", `{"bar":"baz"}`); await typeIn("[name=editor]", " "); diff --git a/packages/form-builder/tests/integration/components/cfb-form-editor-test.js b/packages/form-builder/tests/integration/components/cfb-form-editor-test.js index ead1521dd..a67e08653 100644 --- a/packages/form-builder/tests/integration/components/cfb-form-editor-test.js +++ b/packages/form-builder/tests/integration/components/cfb-form-editor-test.js @@ -22,7 +22,7 @@ module("Integration | Component | cfb-form-editor", function (hooks) { test("it renders blockless", async function (assert) { assert.expect(1); - await render(hbs``); + await render(hbs``); assert.dom("[data-test-question-list-item]").exists({ count: 5 }); }); @@ -30,11 +30,10 @@ module("Integration | Component | cfb-form-editor", function (hooks) { test("it renders block style", async function (assert) { assert.expect(2); - await render(hbs` - - Content! - - `); + await render(hbs`{{! template-lint-disable no-bare-strings }} + + Content! +`); assert.dom("[uk-grid] > div:first-of-type").hasText("Content!"); assert.dom("[data-test-question-list]").exists(); diff --git a/packages/form-builder/tests/integration/components/cfb-form-editor/general-test.js b/packages/form-builder/tests/integration/components/cfb-form-editor/general-test.js index a709289c6..6dd121fd4 100644 --- a/packages/form-builder/tests/integration/components/cfb-form-editor/general-test.js +++ b/packages/form-builder/tests/integration/components/cfb-form-editor/general-test.js @@ -21,7 +21,7 @@ module("Integration | Component | cfb-form-editor/general", function (hooks) { description: "Test Description", }); - await render(hbs``); + await render(hbs``); assert.dom("input[name=name]").hasValue("Test Name"); assert.dom("input[name=slug]").hasValue("test-slug"); @@ -38,7 +38,7 @@ module("Integration | Component | cfb-form-editor/general", function (hooks) { description: "Test Description", }); - await render(hbs``); + await render(hbs``); await fillIn("input[name=name]", ""); await blur("input[name=name]"); @@ -120,7 +120,7 @@ module("Integration | Component | cfb-form-editor/general", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("input[name=name]", "Test Name 1"); @@ -144,10 +144,7 @@ module("Integration | Component | cfb-form-editor/general", function (hooks) { // edit form await render( - hbs`` + hbs`` ); this.server.post("/graphql", () => graphqlError("saveForm"), 200); @@ -155,9 +152,7 @@ module("Integration | Component | cfb-form-editor/general", function (hooks) { // new form await render( - hbs`` + hbs`` ); // Slug validation must be valid @@ -181,7 +176,7 @@ module("Integration | Component | cfb-form-editor/general", function (hooks) { data: { allForms: { edges: [], __typename: "FormEdges" } }, })); - await render(hbs``); + await render(hbs``); assert .dom("p") diff --git a/packages/form-builder/tests/integration/components/cfb-form-editor/question-list-test.js b/packages/form-builder/tests/integration/components/cfb-form-editor/question-list-test.js index c79bcf24e..338777eb1 100644 --- a/packages/form-builder/tests/integration/components/cfb-form-editor/question-list-test.js +++ b/packages/form-builder/tests/integration/components/cfb-form-editor/question-list-test.js @@ -25,7 +25,7 @@ module( test("it renders", async function (assert) { assert.expect(1); - await render(hbs``); + await render(hbs``); assert.dom("[data-test-question-list-item]").exists({ count: 5 }); }); @@ -38,7 +38,7 @@ module( this.set("mode", "reorder"); await render( - hbs`` + hbs`` ); assert.dom("[data-test-question-list-empty]").exists(); @@ -71,7 +71,7 @@ module( questions: [formQuestion], }); - await render(hbs``); + await render(hbs``); assert.dom("[data-test-link-subform]").exists(); assert.dom("[data-test-link-subform]").hasText(formQuestion.subForm.name); @@ -89,7 +89,7 @@ module( questions: [tableQuestion], }); - await render(hbs``); + await render(hbs``); assert.dom("[data-test-link-subform]").exists(); assert @@ -108,7 +108,7 @@ module( this.form.questionIds = [...this.form.questionIds, question.id]; await render( - hbs`` + hbs`` ); assert.dom("[data-test-question-list-item=test]:last-child").exists(); @@ -143,7 +143,7 @@ module( this.server.create("question", { slug: "test" }); await render( - hbs`` + hbs`` ); assert.dom("[data-test-question-list-item=test]").exists(); @@ -159,7 +159,7 @@ module( this.server.create("question", { slug: "test", formIds: [this.form.id] }); await render( - hbs`` + hbs`` ); assert.dom("[data-test-question-list-item=test]").exists(); @@ -175,7 +175,7 @@ module( assert.expect(1); await render( - hbs`` + hbs`` ); this.server.post( @@ -200,7 +200,7 @@ module( assert.expect(1); await render( - hbs`` + hbs`` ); this.server.post( @@ -219,7 +219,7 @@ module( this.server.create("question"); await render( - hbs`` + hbs`` ); this.server.post("/graphql", () => graphqlError("addFormQuestion"), 200); diff --git a/packages/form-builder/tests/integration/components/cfb-form-editor/question-list/item-test.js b/packages/form-builder/tests/integration/components/cfb-form-editor/question-list/item-test.js index 9b6e846e9..50a8bf321 100644 --- a/packages/form-builder/tests/integration/components/cfb-form-editor/question-list/item-test.js +++ b/packages/form-builder/tests/integration/components/cfb-form-editor/question-list/item-test.js @@ -27,12 +27,10 @@ module( this.question = new Question(); this.set("mode", "reorder"); - await render(hbs` - - `); + await render(hbs``); assert .dom("li") diff --git a/packages/form-builder/tests/integration/components/cfb-form-editor/question-test.js b/packages/form-builder/tests/integration/components/cfb-form-editor/question-test.js index ad6e4da19..7655f7be9 100644 --- a/packages/form-builder/tests/integration/components/cfb-form-editor/question-test.js +++ b/packages/form-builder/tests/integration/components/cfb-form-editor/question-test.js @@ -26,7 +26,7 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { type: "TEXT", }); - await render(hbs``); + await render(hbs``); assert.dom("[name=label]").hasValue("Test Label"); assert.dom("[name=slug]").hasValue("test-slug"); @@ -42,7 +42,7 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { type: "TEXT", }); - await render(hbs``); + await render(hbs``); await fillIn("[name=label]", ""); await blur("[name=label]"); @@ -66,7 +66,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=label]", "Test Label 1"); @@ -93,7 +96,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=label]", "Test Label 1"); @@ -117,9 +123,9 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { // edit question await render( hbs`` + @slug="foo-bar-test-slug" + @onAfterSubmit={{this.afterSubmit}} +/>` ); this.server.post("/graphql", () => graphqlError("saveQuestion"), 200); @@ -141,7 +147,7 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }, })); - await render(hbs``); + await render(hbs``); assert .dom("p") @@ -151,7 +157,7 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { test("it suggests a slug", async function (assert) { assert.expect(1); - await render(hbs``); + await render(hbs``); await fillIn("input[name=label]", "Test Label 123"); assert.dom("input[name=slug]").hasValue("test-label-123"); @@ -170,7 +176,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { this.owner.lookup("service:caluma-options").namespace = "Foo Bar"; await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "TextQuestion"); @@ -198,7 +207,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "TextQuestion"); @@ -228,7 +240,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "TextareaQuestion"); @@ -258,7 +273,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "IntegerQuestion"); @@ -288,7 +306,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "FloatQuestion"); @@ -319,7 +340,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "MultipleChoiceQuestion"); @@ -350,7 +374,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "ChoiceQuestion"); @@ -380,7 +407,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "TableQuestion"); @@ -406,7 +436,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "TableQuestion"); @@ -453,7 +486,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "FormQuestion"); @@ -479,7 +515,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "FormQuestion"); @@ -524,7 +563,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); await fillIn("[name=__typename]", "FilesQuestion"); @@ -550,7 +592,10 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { }); await render( - hbs`` + hbs`` ); // await selectChoose("[name=__typename]", "StaticQuestion"); @@ -569,7 +614,7 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { this.server.create("question", { slug: "test-slug" }); this.server.create("question", { slug: "other-test-slug" }); - await render(hbs``); + await render(hbs``); await fillIn("input[name=slug]", "test-slug"); await blur("input[name=slug]"); @@ -594,7 +639,7 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { test("it auto-suggests the slug if it has not been manually changed", async function (assert) { assert.expect(3); - await render(hbs``); + await render(hbs``); await fillIn("input[name=label]", "Foo Bar"); await blur("input[name=label]"); @@ -615,7 +660,7 @@ module("Integration | Component | cfb-form-editor/question", function (hooks) { test("it allows to select format-validators", async function (assert) { assert.expect(1); - await render(hbs``); + await render(hbs``); await selectChoose( ".ember-power-select-trigger", ".ember-power-select-option" diff --git a/packages/form-builder/tests/integration/components/cfb-form-editor/question/default-test.js b/packages/form-builder/tests/integration/components/cfb-form-editor/question/default-test.js index 65c20b8d1..59b1c4d5c 100644 --- a/packages/form-builder/tests/integration/components/cfb-form-editor/question/default-test.js +++ b/packages/form-builder/tests/integration/components/cfb-form-editor/question/default-test.js @@ -17,14 +17,12 @@ module( }); this.noop = () => {}; - await render(hbs` - - `); + await render(hbs``); assert.ok(this.element); }); diff --git a/packages/form-builder/tests/integration/components/cfb-form-editor/question/options-test.js b/packages/form-builder/tests/integration/components/cfb-form-editor/question/options-test.js index f21b60139..4c719c160 100644 --- a/packages/form-builder/tests/integration/components/cfb-form-editor/question/options-test.js +++ b/packages/form-builder/tests/integration/components/cfb-form-editor/question/options-test.js @@ -23,7 +23,7 @@ module( }); await render( - hbs`` + hbs`` ); // one is the add row @@ -41,7 +41,7 @@ module( }); await render( - hbs`` + hbs`` ); assert.dom("li").exists({ count: 2 }); @@ -60,7 +60,12 @@ module( this.set("noop", () => {}); await render( - hbs`` + hbs`` ); await click("[data-test-add-row]"); @@ -81,7 +86,12 @@ module( this.set("noop", () => {}); await render( - hbs`` + hbs`` ); assert.dom("li").exists({ count: 3 }); @@ -105,7 +115,12 @@ module( this.set("setDirty", () => {}); await render( - hbs`` + hbs`` ); // add some new rows (only one will be filled) @@ -159,7 +174,12 @@ module( this.set("noop", () => {}); await render( - hbs`` + hbs`` ); assert.dom("[data-test-row]").exists({ count: 2 }); diff --git a/packages/form-builder/tests/integration/components/cfb-form-editor/question/validation-test.js b/packages/form-builder/tests/integration/components/cfb-form-editor/question/validation-test.js index 1a6edbe28..d9d3e0cea 100644 --- a/packages/form-builder/tests/integration/components/cfb-form-editor/question/validation-test.js +++ b/packages/form-builder/tests/integration/components/cfb-form-editor/question/validation-test.js @@ -20,7 +20,7 @@ module( test("it renders all available validators", async function (assert) { assert.expect(2); - await render(hbs``); + await render(hbs``); await click(".ember-power-select-trigger"); diff --git a/packages/form-builder/tests/integration/components/cfb-form-list-test.js b/packages/form-builder/tests/integration/components/cfb-form-list-test.js index 9f987d5c5..ec76ae817 100644 --- a/packages/form-builder/tests/integration/components/cfb-form-list-test.js +++ b/packages/form-builder/tests/integration/components/cfb-form-list-test.js @@ -20,12 +20,9 @@ module("Integration | Component | cfb-form-list", function (hooks) { this.server.createList("form", 5); - await render(hbs` - - `); + await render( + hbs`` + ); assert.dom("[data-test-form-list]").exists(); assert.dom("[data-test-form-list-item]").exists({ count: 5 }); @@ -34,12 +31,9 @@ module("Integration | Component | cfb-form-list", function (hooks) { test("it displays an empty state", async function (assert) { assert.expect(1); - await render(hbs` - - `); + await render( + hbs`` + ); assert.dom("[data-test-form-list-empty]").exists(); }); @@ -51,13 +45,11 @@ module("Integration | Component | cfb-form-list", function (hooks) { this.set("onEditForm", () => assert.step("edit-form")); - await render(hbs` - - `); + await render(hbs``); await click(`[data-test-form-list-item=form-1] [data-test-edit-form]`); @@ -71,13 +63,11 @@ module("Integration | Component | cfb-form-list", function (hooks) { this.set("onNewForm", () => assert.step("new-form")); - await render(hbs` - - `); + await render(hbs``); await click("[data-test-new-form]"); @@ -96,13 +86,11 @@ module("Integration | Component | cfb-form-list", function (hooks) { isArchived: true, }); - await render(hbs` - - `); + await render(hbs``); assert.dom("[data-test-form-list-empty]").exists(); diff --git a/packages/form-builder/tests/integration/components/cfb-form-list/item-test.js b/packages/form-builder/tests/integration/components/cfb-form-list/item-test.js index e6b36a2cf..b89f38c15 100644 --- a/packages/form-builder/tests/integration/components/cfb-form-list/item-test.js +++ b/packages/form-builder/tests/integration/components/cfb-form-list/item-test.js @@ -16,7 +16,7 @@ module("Integration | Component | cfb-form-list/item", function (hooks) { description: "Test", }); - await render(hbs``); + await render(hbs``); assert.dom("li").exists(); assert.dom("li > span:nth-child(1)").hasText("Test"); @@ -33,7 +33,7 @@ module("Integration | Component | cfb-form-list/item", function (hooks) { this.set("editForm", () => assert.step("edit-form")); await render( - hbs`` + hbs`` ); await click("[data-test-edit-form]"); diff --git a/packages/form-builder/tests/integration/components/cfb-jexl-boolean-toggle-switch-test.js b/packages/form-builder/tests/integration/components/cfb-jexl-boolean-toggle-switch-test.js index e0446c6a0..0648058ae 100644 --- a/packages/form-builder/tests/integration/components/cfb-jexl-boolean-toggle-switch-test.js +++ b/packages/form-builder/tests/integration/components/cfb-jexl-boolean-toggle-switch-test.js @@ -16,13 +16,11 @@ module( this.set("value", "false"); - await render(hbs` - - `); + await render(hbs``); assert.dom("input[name=test]").isNotChecked(); @@ -44,13 +42,11 @@ module( this.set("value", value); }); - await render(hbs` - - `); + await render(hbs``); assert.dom("input[name=test]").isNotChecked(); diff --git a/packages/form-builder/tests/integration/components/cfb-toggle-switch-test.js b/packages/form-builder/tests/integration/components/cfb-toggle-switch-test.js index 895ec560e..a9bfa1cd1 100644 --- a/packages/form-builder/tests/integration/components/cfb-toggle-switch-test.js +++ b/packages/form-builder/tests/integration/components/cfb-toggle-switch-test.js @@ -14,13 +14,11 @@ module("Integration | Component | cfb-toggle-switch", function (hooks) { this.set("value", false); - await render(hbs` - - `); + await render(hbs``); assert.dom("input[name=test]").isNotChecked(); @@ -40,13 +38,9 @@ module("Integration | Component | cfb-toggle-switch", function (hooks) { this.set("value", value); }); - await render(hbs` - - `); + await render( + hbs`` + ); assert.dom("input[name=test]").isNotChecked(); diff --git a/packages/form/tests/integration/components/cf-content-test.js b/packages/form/tests/integration/components/cf-content-test.js index 8b6b8449c..327c35768 100644 --- a/packages/form/tests/integration/components/cf-content-test.js +++ b/packages/form/tests/integration/components/cf-content-test.js @@ -305,12 +305,9 @@ module("Integration | Component | cf-content", function (hooks) { assert.step("save"); }; - await render(hbs` - - `); + await render( + hbs`` + ); await fillIn( `[name="Document:${this.document.id}:Question:${question}"]`, diff --git a/packages/form/tests/integration/components/cf-field/errors-test.js b/packages/form/tests/integration/components/cf-field/errors-test.js index 00489223b..b26d1ce4e 100644 --- a/packages/form/tests/integration/components/cf-field/errors-test.js +++ b/packages/form/tests/integration/components/cf-field/errors-test.js @@ -10,13 +10,9 @@ module("Integration | Component | cf-field/errors", function (hooks) { setupIntl(hooks); test("it renders", async function (assert) { - await render(hbs` - - `); + await render( + hbs`` + ); assert.dom().hasText("foo, bar"); }); diff --git a/packages/form/tests/integration/components/cf-field/input-test.js b/packages/form/tests/integration/components/cf-field/input-test.js index 0e4e69e15..331086be5 100644 --- a/packages/form/tests/integration/components/cf-field/input-test.js +++ b/packages/form/tests/integration/components/cf-field/input-test.js @@ -12,20 +12,12 @@ module("Integration | Component | cf-field/input", function (hooks) { test("it renders a text field", async function (assert) { assert.expect(2); - await render(hbs` - - `); + await render(hbs``); assert.dom(".uk-form-controls").exists(); assert.dom("input[type=text]").hasValue("Test"); @@ -34,20 +26,12 @@ module("Integration | Component | cf-field/input", function (hooks) { test("it renders a textarea field", async function (assert) { assert.expect(2); - await render(hbs` - - `); + await render(hbs``); assert.dom(".uk-form-controls").exists(); assert.dom("textarea").hasValue("Test"); @@ -56,20 +40,12 @@ module("Integration | Component | cf-field/input", function (hooks) { test("it renders an integer field", async function (assert) { assert.expect(2); - await render(hbs` - - `); + await render(hbs``); assert.dom(".uk-form-controls").exists(); assert.dom("input[type=number]").hasValue("5"); @@ -78,18 +54,12 @@ module("Integration | Component | cf-field/input", function (hooks) { test("it renders a float field", async function (assert) { assert.expect(2); - await render(hbs` - - `); + await render(hbs``); assert.dom(".uk-form-controls").exists(); assert.dom("input[type=number]").hasValue("0.55"); @@ -100,24 +70,14 @@ module("Integration | Component | cf-field/input", function (hooks) { this.set("noop", () => {}); - await render(hbs` - - `); + await render(hbs``); assert.dom(".uk-form-controls").exists(); assert.dom("input[type=radio][value='option-1']").isChecked(); @@ -126,23 +86,13 @@ module("Integration | Component | cf-field/input", function (hooks) { test("it renders a checkbox field", async function (assert) { assert.expect(2); - await render(hbs` - - `); + await render(hbs``); assert.dom(".uk-form-controls").exists(); assert.dom("input[type=checkbox][value='option-1']").isChecked(); @@ -151,18 +101,10 @@ module("Integration | Component | cf-field/input", function (hooks) { test("it renders disabled fields", async function (assert) { assert.expect(2); - await render(hbs` - - `); + await render(hbs``); assert.dom("input[type=text]").hasAttribute("readonly"); assert.dom("input[type=text]").hasClass("uk-disabled"); diff --git a/packages/form/tests/integration/components/cf-field/input/action-button-test.js b/packages/form/tests/integration/components/cf-field/input/action-button-test.js index 7c9c4af8c..91268e629 100644 --- a/packages/form/tests/integration/components/cf-field/input/action-button-test.js +++ b/packages/form/tests/integration/components/cf-field/input/action-button-test.js @@ -108,15 +108,13 @@ module( test("triggers the callback functions", async function (assert) { assert.expect(6); - await render(hbs` - - `); + await render(hbs``); await click("button.uk-button-secondary"); await waitFor(".uk-modal.uk-open"); diff --git a/packages/form/tests/integration/components/cf-field/input/checkbox-test.js b/packages/form/tests/integration/components/cf-field/input/checkbox-test.js index 2e7a4abbc..09d69d012 100644 --- a/packages/form/tests/integration/components/cf-field/input/checkbox-test.js +++ b/packages/form/tests/integration/components/cf-field/input/checkbox-test.js @@ -13,24 +13,18 @@ module("Integration | Component | cf-field/input/checkbox", function (hooks) { test("it renders", async function (assert) { assert.expect(12); - await render(hbs` - - `); + await render(hbs``); assert.dom("input[type=checkbox]").exists({ count: 3 }); assert.dom("label").exists({ count: 3 }); @@ -58,27 +52,20 @@ module("Integration | Component | cf-field/input/checkbox", function (hooks) { test("it renders options of a checkbox field vertically", async function (assert) { assert.expect(1); - await render(hbs` - - `); + await render(hbs``); assert.dom("label.uk-margin-large-right").exists(); }); @@ -86,21 +73,17 @@ module("Integration | Component | cf-field/input/checkbox", function (hooks) { test("it can be disabled", async function (assert) { assert.expect(3); - await render(hbs` - - `); + await render(hbs``); assert.dom("label:nth-of-type(1) input[type=checkbox]").isDisabled(); assert.dom("label:nth-of-type(2) input[type=checkbox]").isDisabled(); @@ -131,12 +114,9 @@ module("Integration | Component | cf-field/input/checkbox", function (hooks) { await settled(); }; - await render(hbs` - - `); + await render( + hbs`` + ); await click("label:nth-of-type(1) input"); assert.deepEqual(this.field.value, ["option-1"]); @@ -153,19 +133,15 @@ module("Integration | Component | cf-field/input/checkbox", function (hooks) { this.set("disabled", false); - await render(hbs` - - `); + await render(hbs``); // the checkbox needs to be enabled in order to be deselected assert.dom("label input[type=checkbox]").isEnabled(); diff --git a/packages/form/tests/integration/components/cf-field/input/date-test.js b/packages/form/tests/integration/components/cf-field/input/date-test.js index 7cf238be9..7958262dd 100644 --- a/packages/form/tests/integration/components/cf-field/input/date-test.js +++ b/packages/form/tests/integration/components/cf-field/input/date-test.js @@ -36,12 +36,9 @@ module("Integration | Component | cf-field/input/date", function (hooks) { this.field = { answer: { value: "2021-09-10" } }; - await render(hbs` - - `); + await render( + hbs`` + ); assert.dom("input").hasAttribute("type", "text"); assert.dom("input").hasAttribute("readonly"); diff --git a/packages/form/tests/integration/components/cf-field/input/float-test.js b/packages/form/tests/integration/components/cf-field/input/float-test.js index 61e42408a..5e4793068 100644 --- a/packages/form/tests/integration/components/cf-field/input/float-test.js +++ b/packages/form/tests/integration/components/cf-field/input/float-test.js @@ -47,10 +47,7 @@ module("Integration | Component | cf-field/input/float", function (hooks) { assert.expect(2); await render( - hbs`` + hbs`` ); assert.dom("input").hasAttribute("readonly"); @@ -63,10 +60,7 @@ module("Integration | Component | cf-field/input/float", function (hooks) { this.set("save", (value) => assert.strictEqual(value, 1.5)); await render( - hbs`` + hbs`` ); await fillIn("input", 1.5); @@ -78,10 +72,7 @@ module("Integration | Component | cf-field/input/float", function (hooks) { this.set("save", (value) => assert.strictEqual(value, null)); await render( - hbs`` + hbs`` ); await fillIn("input", "Test"); diff --git a/packages/form/tests/integration/components/cf-field/input/integer-test.js b/packages/form/tests/integration/components/cf-field/input/integer-test.js index a9499f45f..3af4480cd 100644 --- a/packages/form/tests/integration/components/cf-field/input/integer-test.js +++ b/packages/form/tests/integration/components/cf-field/input/integer-test.js @@ -18,22 +18,13 @@ module("Integration | Component | cf-field/input/integer", function (hooks) { test("it renders", async function (assert) { assert.expect(7); - await render(hbs` - - `); + await render(hbs``); assert.dom("input").hasClass("uk-input"); assert.dom("input").hasAttribute("name", "test"); diff --git a/packages/form/tests/integration/components/cf-field/input/powerselect-test.js b/packages/form/tests/integration/components/cf-field/input/powerselect-test.js index 2ea3ad715..b8cecc942 100644 --- a/packages/form/tests/integration/components/cf-field/input/powerselect-test.js +++ b/packages/form/tests/integration/components/cf-field/input/powerselect-test.js @@ -105,7 +105,10 @@ module( }); await render( - hbs`` + hbs`` ); assert.dom(".ember-power-select-trigger").exists(); @@ -135,7 +138,10 @@ module( }); await render( - hbs`` + hbs`` ); // Check if select is being rendered. @@ -165,7 +171,10 @@ module( }); await render( - hbs`` + hbs`` ); this.set("multipleChoiceField.answer.value", ["option-1"]); diff --git a/packages/form/tests/integration/components/cf-field/input/radio-test.js b/packages/form/tests/integration/components/cf-field/input/radio-test.js index ac3c5f76c..b03f70816 100644 --- a/packages/form/tests/integration/components/cf-field/input/radio-test.js +++ b/packages/form/tests/integration/components/cf-field/input/radio-test.js @@ -16,25 +16,19 @@ module("Integration | Component | cf-field/input/radio", function (hooks) { test("it renders", async function (assert) { assert.expect(11); - await render(hbs` - - `); + await render(hbs``); assert.dom("input[type=radio]").exists({ count: 3 }); assert.dom("label").exists({ count: 3 }); @@ -55,27 +49,17 @@ module("Integration | Component | cf-field/input/radio", function (hooks) { test("it renders options of a radio field vertically", async function (assert) { assert.expect(1); - await render(hbs` - - `); + await render(hbs``); assert.dom("label.uk-margin-large-right").exists(); }); @@ -83,22 +67,18 @@ module("Integration | Component | cf-field/input/radio", function (hooks) { test("it can be disabled", async function (assert) { assert.expect(3); - await render(hbs` - - `); + await render(hbs``); assert.dom("label:nth-of-type(1) input[type=radio]").isDisabled(); assert.dom("label:nth-of-type(2) input[type=radio]").isDisabled(); @@ -110,19 +90,13 @@ module("Integration | Component | cf-field/input/radio", function (hooks) { this.set("save", (value) => assert.strictEqual(value, "option-1")); - await render(hbs` - - `); + await render(hbs``); await click("label:nth-of-type(1) input"); }); @@ -132,20 +106,16 @@ module("Integration | Component | cf-field/input/radio", function (hooks) { this.set("disabled", false); - await render(hbs` - - `); + await render(hbs``); assert.dom("label input[type=radio]").isDisabled(); assert diff --git a/packages/form/tests/integration/components/cf-field/input/static-test.js b/packages/form/tests/integration/components/cf-field/input/static-test.js index 77b3d5197..0baed282f 100644 --- a/packages/form/tests/integration/components/cf-field/input/static-test.js +++ b/packages/form/tests/integration/components/cf-field/input/static-test.js @@ -12,19 +12,14 @@ module("Integration | Component | cf-field/input/static", function (hooks) { test("it renders", async function (assert) { assert.expect(1); - await render(hbs` - - `); + await render(hbs``); assert.dom("h1").hasText("Markdown"); }); diff --git a/packages/form/tests/integration/components/cf-field/input/table-test.js b/packages/form/tests/integration/components/cf-field/input/table-test.js index 743589047..2e8ce2e96 100644 --- a/packages/form/tests/integration/components/cf-field/input/table-test.js +++ b/packages/form/tests/integration/components/cf-field/input/table-test.js @@ -279,12 +279,9 @@ module("Integration | Component | cf-field/input/table", function (hooks) { assert.step("save"); }; - await render(hbs` - - `); + await render( + hbs`` + ); await click("[data-test-add-row]"); @@ -306,11 +303,7 @@ module("Integration | Component | cf-field/input/table", function (hooks) { test("it can edit a row", async function (assert) { assert.expect(1); - await render(hbs` - - `); + await render(hbs``); await click("[data-test-edit-row]"); @@ -335,12 +328,9 @@ module("Integration | Component | cf-field/input/table", function (hooks) { assert.step("save"); }; - await render(hbs` - - `); + await render( + hbs`` + ); await click("[data-test-delete-row]"); await click("button[autofocus]"); diff --git a/packages/form/tests/integration/components/cf-field/input/text-test.js b/packages/form/tests/integration/components/cf-field/input/text-test.js index 0064d8402..289765e4d 100644 --- a/packages/form/tests/integration/components/cf-field/input/text-test.js +++ b/packages/form/tests/integration/components/cf-field/input/text-test.js @@ -18,19 +18,13 @@ module("Integration | Component | cf-field/input/text", function (hooks) { test("it renders", async function (assert) { assert.expect(4); - await render(hbs` - - `); + await render(hbs``); assert.dom("input").hasClass("uk-input"); assert.dom("input").hasAttribute("name", "test"); diff --git a/packages/form/tests/integration/components/cf-field/input/textarea-test.js b/packages/form/tests/integration/components/cf-field/input/textarea-test.js index 6de886dfb..029e85e00 100644 --- a/packages/form/tests/integration/components/cf-field/input/textarea-test.js +++ b/packages/form/tests/integration/components/cf-field/input/textarea-test.js @@ -20,21 +20,13 @@ module("Integration | Component | cf-field/input/textarea", function (hooks) { test("it renders", async function (assert) { assert.expect(4); - await render(hbs` - - `); + await render(hbs``); assert.dom("textarea").hasClass("uk-textarea"); assert.dom("textarea").hasAttribute("name", "test"); diff --git a/packages/form/tests/integration/components/cf-form-wrapper-test.js b/packages/form/tests/integration/components/cf-form-wrapper-test.js index d10b59f4e..0d6eac7a5 100644 --- a/packages/form/tests/integration/components/cf-form-wrapper-test.js +++ b/packages/form/tests/integration/components/cf-form-wrapper-test.js @@ -18,11 +18,10 @@ module("Integration | Component | cf-form-wrapper", function (hooks) { assert.dom(this.element).hasText(""); // Template block usage: - await render(hbs` - - template block text - - `); + await render(hbs`{{! template-lint-disable no-bare-strings }} + + template block text +`); assert.dom(this.element).hasText("template block text"); }); diff --git a/packages/form/tests/integration/components/cf-pagination-test.js b/packages/form/tests/integration/components/cf-pagination-test.js index e53851d58..d5989bf39 100644 --- a/packages/form/tests/integration/components/cf-pagination-test.js +++ b/packages/form/tests/integration/components/cf-pagination-test.js @@ -18,11 +18,10 @@ module("Integration | Component | cf-pagination", function (hooks) { assert.dom(this.element).hasText(""); // Template block usage: - await render(hbs` - - template block text - - `); + await render(hbs`{{! template-lint-disable no-bare-strings }} + + template block text +`); assert.dom(this.element).hasText("template block text"); }); diff --git a/packages/form/tests/integration/components/document-validity-test.js b/packages/form/tests/integration/components/document-validity-test.js index 6bb9104d4..9864b66b1 100644 --- a/packages/form/tests/integration/components/document-validity-test.js +++ b/packages/form/tests/integration/components/document-validity-test.js @@ -34,17 +34,20 @@ module("Integration | Component | document-validity", function (hooks) { test("it checks validity", async function (assert) { assert.expect(1); - await render(hbs` - -

- {{#if isValid}} - Valid - {{else}} - Invalid - {{/if}} -

-
- `); + await render(hbs`{{! template-lint-disable no-bare-strings }} + +

+ {{#if isValid}} + Valid + {{else}} + Invalid + {{/if}} +

+
`); await scrollTo("p", 0, 0); @@ -56,18 +59,17 @@ module("Integration | Component | document-validity", function (hooks) { await this.makeInvalid(); - await render(hbs` - -

- {{#if isValid}} - Valid - {{else}} - Invalid - {{/if}} -

- -
- `); + await render(hbs`{{! template-lint-disable no-bare-strings }} + +

+ {{#if isValid}} + Valid + {{else}} + Invalid + {{/if}} +

+ +
`); assert.dom("p").hasText("Valid"); await click("button"); @@ -83,16 +85,15 @@ module("Integration | Component | document-validity", function (hooks) { this.onInvalid = () => assert.step("invalid"); this.onValid = () => assert.step("valid"); - await render(hbs` - - - - `); + await render(hbs`{{! template-lint-disable no-bare-strings }} + + +`); await this.makeInvalid(); await click("button"); diff --git a/packages/form/tests/integration/helpers/get-widget-test.js b/packages/form/tests/integration/helpers/get-widget-test.js index 54585daa7..b24ec2b76 100644 --- a/packages/form/tests/integration/helpers/get-widget-test.js +++ b/packages/form/tests/integration/helpers/get-widget-test.js @@ -12,7 +12,11 @@ module("Integration | Helper | get-widget", function (hooks) { hooks.beforeEach(function () { // eslint-disable-next-line ember/no-empty-glimmer-component-classes class SomeComponent extends Component {} - setComponentTemplate(hbs`some-component`, SomeComponent); + setComponentTemplate( + hbs`{{! template-lint-disable no-bare-strings }} +some-component`, + SomeComponent + ); this.SomeComponent = SomeComponent; @@ -25,58 +29,38 @@ module("Integration | Helper | get-widget", function (hooks) { component: "some-component", }); - await render(hbs` - {{component - (ensure-safe-component - (get-widget - (hash - raw=(hash - meta=(hash widgetOverride="some-component") - ) - ) - ) - ) - }} - `); + await render(hbs`{{component + (ensure-safe-component + (get-widget (hash raw=(hash meta=(hash widgetOverride="some-component")))) + ) +}}`); assert.dom(this.element).hasText("some-component"); }); test("it doesn't return an invalid override", async function (assert) { - await render(hbs` - {{component - (ensure-safe-component - (get-widget - (hash - raw=(hash - meta=(hash widgetOverride="some-component") - ) - ) - ) - ) - field=(hash question=(hash raw=(hash __typename="TextQuestion"))) - }} - `); + await render(hbs`{{component + (ensure-safe-component + (get-widget (hash raw=(hash meta=(hash widgetOverride="some-component")))) + ) + field=(hash question=(hash raw=(hash __typename="TextQuestion"))) +}}`); assert.dom("input").exists(); }); test("it has a fallback", async function (assert) { - await render(hbs` - {{component - (ensure-safe-component (get-widget null)) - field=(hash question=(hash raw=(hash __typename="TextQuestion"))) - }} - `); + await render(hbs`{{component + (ensure-safe-component (get-widget null)) + field=(hash question=(hash raw=(hash __typename="TextQuestion"))) +}}`); assert.dom("input").exists(); - await render(hbs` - {{component - (ensure-safe-component (get-widget undefined)) - field=(hash question=(hash raw=(hash __typename="TextQuestion"))) - }} - `); + await render(hbs`{{component + (ensure-safe-component (get-widget undefined)) + field=(hash question=(hash raw=(hash __typename="TextQuestion"))) +}}`); assert.dom("input").exists(); }); @@ -95,17 +79,15 @@ module("Integration | Helper | get-widget", function (hooks) { component: "some-component", }); - await render(hbs` - {{component - (ensure-safe-component - (get-widget - null - (hash raw=(hash meta=(hash widgetOverride="some-invalid-component"))) - (hash raw=(hash meta=(hash widgetOverride="some-component"))) - ) - ) - }} - `); + await render(hbs`{{component + (ensure-safe-component + (get-widget + null + (hash raw=(hash meta=(hash widgetOverride="some-invalid-component"))) + (hash raw=(hash meta=(hash widgetOverride="some-component"))) + ) + ) +}}`); assert.dom(this.element).hasText("some-component"); }); @@ -117,19 +99,11 @@ module("Integration | Helper | get-widget", function (hooks) { componentClass: this.SomeComponent, }); - await render(hbs` - {{component - (ensure-safe-component - (get-widget - (hash - raw=(hash - meta=(hash widgetOverride="some-component") - ) - ) - ) - ) - }} - `); + await render(hbs`{{component + (ensure-safe-component + (get-widget (hash raw=(hash meta=(hash widgetOverride="some-component")))) + ) +}}`); assert.dom(this.element).hasText("some-component"); }); diff --git a/packages/workflow/tests/integration/components/task-button-test.js b/packages/workflow/tests/integration/components/task-button-test.js index 3840ad86d..840cbd3c4 100644 --- a/packages/workflow/tests/integration/components/task-button-test.js +++ b/packages/workflow/tests/integration/components/task-button-test.js @@ -37,14 +37,14 @@ module("Integration | Component | task-button", function (hooks) { }); test("it renders default", async function (assert) { - await render(hbs``); + await render(hbs``); assert.dom("button").hasText("t:caluma.mutate-work-item.complete:()"); }); test("it renders label", async function (assert) { await render( - hbs`` + hbs`` ); assert.dom("button").hasText("Lorem Ipsum"); @@ -52,7 +52,8 @@ module("Integration | Component | task-button", function (hooks) { test("it renders block", async function (assert) { await render( - hbs`Lorem Ipsum` + hbs`{{! template-lint-disable no-bare-strings }} +Lorem Ipsum` ); assert.dom("button").hasText("Lorem Ipsum"); diff --git a/packages/workflow/tests/integration/components/work-item-button-test.js b/packages/workflow/tests/integration/components/work-item-button-test.js index a5b90b02d..d47118c62 100644 --- a/packages/workflow/tests/integration/components/work-item-button-test.js +++ b/packages/workflow/tests/integration/components/work-item-button-test.js @@ -21,7 +21,7 @@ module("Integration | Component | work-item-button", function (hooks) { test("it renders label", async function (assert) { await render( - hbs`` + hbs`` ); assert.dom("button").hasText("Lorem Ipsum"); @@ -29,7 +29,8 @@ module("Integration | Component | work-item-button", function (hooks) { test("it renders block", async function (assert) { await render( - hbs`Lorem Ipsum` + hbs`{{! template-lint-disable no-bare-strings }} +Lorem Ipsum` ); assert.dom("button").hasText("Lorem Ipsum"); @@ -79,7 +80,11 @@ module("Integration | Component | work-item-button", function (hooks) { }; await render( - hbs`` + hbs`` ); await click("button");