From 6084b331ed899e14c57663d564a88a1dc96ddd96 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 14 Jun 2023 19:16:56 +0100 Subject: [PATCH] Unsilence this-property-fallback (#21615) --- .../tests/acceptance/plugin-outlet-parent-view-test.js | 2 +- .../acceptance/plugin-outlet-single-template-test.js | 2 +- .../truth-helpers/integration/helpers/includes-test.js | 8 ++++---- .../integration/components/category-badge-helper-test.js | 4 ++-- .../tests/integration/components/html-safe-helper-test.js | 2 +- .../tests/integration/components/plugin-outlet-test.js | 6 +++--- .../integration/components/select-kit/combo-box-test.js | 4 ++-- .../components/select-kit/future-date-input-test.js | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-parent-view-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-parent-view-test.js index 12683437209..053db157d01 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-parent-view-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-parent-view-test.js @@ -9,7 +9,7 @@ acceptance("Plugin Outlet - Deprecated parentView", function (needs) { needs.hooks.beforeEach(function () { registerTemporaryModule( "discourse/templates/connectors/user-profile-primary/hello", - hbs`{{parentView.parentView.class}}` + hbs`{{this.parentView.parentView.class}}` ); }); diff --git a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js index 5022ac3fe2c..a7b3fe8355e 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js @@ -15,7 +15,7 @@ acceptance("Plugin Outlet - Single Template", function (needs) { needs.hooks.beforeEach(() => { registerTemporaryModule( CONNECTOR_MODULE, - hbs`{{model.username}}` + hbs`{{this.model.username}}` ); }); diff --git a/app/assets/javascripts/discourse/tests/addons/truth-helpers/integration/helpers/includes-test.js b/app/assets/javascripts/discourse/tests/addons/truth-helpers/integration/helpers/includes-test.js index adf2000528d..86abc660620 100644 --- a/app/assets/javascripts/discourse/tests/addons/truth-helpers/integration/helpers/includes-test.js +++ b/app/assets/javascripts/discourse/tests/addons/truth-helpers/integration/helpers/includes-test.js @@ -11,14 +11,14 @@ module("Addons | truth-helpers | Integration | includes", function (hooks) { this.foo = [1]; this.bar = 1; await render( - hbs`{{#if (includes foo bar)}}{{/if}}` + hbs`{{#if (includes this.foo this.bar)}}{{/if}}` ); assert.ok(exists(".test"), "it returns true when element is found"); this.bar = 2; await render( - hbs`{{#if (includes foo bar)}}{{/if}}` + hbs`{{#if (includes this.foo this.bar)}}{{/if}}` ); assert.notOk(exists(".test"), "it returns false when element is not found"); @@ -28,14 +28,14 @@ module("Addons | truth-helpers | Integration | includes", function (hooks) { this.foo = "foo"; this.bar = "f"; await render( - hbs`{{#if (includes foo bar)}}{{/if}}` + hbs`{{#if (includes this.foo this.bar)}}{{/if}}` ); assert.ok(exists(".test"), "it returns true when element is found"); this.bar = "b"; await render( - hbs`{{#if (includes foo bar)}}{{/if}}` + hbs`{{#if (includes this.foo this.bar)}}{{/if}}` ); assert.notOk(exists(".test"), "it returns false when element is not found"); diff --git a/app/assets/javascripts/discourse/tests/integration/components/category-badge-helper-test.js b/app/assets/javascripts/discourse/tests/integration/components/category-badge-helper-test.js index 44269f5a556..7a8b8a8c62a 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/category-badge-helper-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/category-badge-helper-test.js @@ -11,7 +11,7 @@ module("Integration | Component | category-badge helper", function (hooks) { test("displays category", async function (assert) { this.set("category", Category.findById(1)); - await render(hbs`{{category-badge category}}`); + await render(hbs`{{category-badge this.category}}`); assert.strictEqual( query(".category-name").innerText.trim(), @@ -22,7 +22,7 @@ module("Integration | Component | category-badge helper", function (hooks) { test("options.link", async function (assert) { this.set("category", Category.findById(1)); - await render(hbs`{{category-badge category link=true}}`); + await render(hbs`{{category-badge this.category link=true}}`); assert.ok( exists( diff --git a/app/assets/javascripts/discourse/tests/integration/components/html-safe-helper-test.js b/app/assets/javascripts/discourse/tests/integration/components/html-safe-helper-test.js index 35a5df3ea30..32d70d8d08b 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/html-safe-helper-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/html-safe-helper-test.js @@ -10,7 +10,7 @@ module("Integration | Component | html-safe-helper", function (hooks) { test("default", async function (assert) { this.set("string", "

biscuits

"); - await render(hbs`{{html-safe string}}`); + await render(hbs`{{html-safe this.string}}`); assert.ok(exists("p.cookies"), "it displays the string as html"); }); diff --git a/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.js b/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.js index a3cf9ff01b8..4d44b2c426d 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.js @@ -53,15 +53,15 @@ module("Integration | Component | plugin-outlet", function (hooks) { registerTemporaryModule( `${PREFIX}/test-name/hello`, - hbs`{{username}} + hbs`{{this.username}} - {{hello}}` + {{this.hello}}` ); registerTemporaryModule( `${PREFIX}/test-name/hi`, hbs` - {{hi}}` + {{this.hi}}` ); registerTemporaryModule( `${PREFIX}/test-name/conditional-render`, diff --git a/app/assets/javascripts/discourse/tests/integration/components/select-kit/combo-box-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/combo-box-test.js index 106985059b7..8899ed8e7d4 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/select-kit/combo-box-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/combo-box-test.js @@ -75,8 +75,8 @@ module("Integration | Component | select-kit/combo-box", function (hooks) { @value={{this.value}} @content={{this.content}} @options={{hash - caretUpIcon=caretUpIcon - caretDownIcon=caretDownIcon + caretUpIcon=this.caretUpIcon + caretDownIcon=this.caretDownIcon }} /> `); diff --git a/app/assets/javascripts/discourse/tests/integration/components/select-kit/future-date-input-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/future-date-input-test.js index b652adc4699..89b80b856cf 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/select-kit/future-date-input-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/future-date-input-test.js @@ -129,7 +129,7 @@ module( this.set("input", moment("2032-01-01 11:10")); await render( - hbs`` + hbs`` ); await fillIn(".time-input", "11:15");