Unsilence this-property-fallback (#21615)

This commit is contained in:
David Taylor 2023-06-14 19:16:56 +01:00 committed by GitHub
parent cd6183de93
commit 6084b331ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 15 deletions

View File

@ -9,7 +9,7 @@ acceptance("Plugin Outlet - Deprecated parentView", function (needs) {
needs.hooks.beforeEach(function () {
registerTemporaryModule(
"discourse/templates/connectors/user-profile-primary/hello",
hbs`<span class='hello-username'>{{parentView.parentView.class}}</span>`
hbs`<span class='hello-username'>{{this.parentView.parentView.class}}</span>`
);
});

View File

@ -15,7 +15,7 @@ acceptance("Plugin Outlet - Single Template", function (needs) {
needs.hooks.beforeEach(() => {
registerTemporaryModule(
CONNECTOR_MODULE,
hbs`<span class='hello-username'>{{model.username}}</span>`
hbs`<span class='hello-username'>{{this.model.username}}</span>`
);
});

View File

@ -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)}}<span class="test"></span>{{/if}}`
hbs`{{#if (includes this.foo this.bar)}}<span class="test"></span>{{/if}}`
);
assert.ok(exists(".test"), "it returns true when element is found");
this.bar = 2;
await render(
hbs`{{#if (includes foo bar)}}<span class="test"></span>{{/if}}`
hbs`{{#if (includes this.foo this.bar)}}<span class="test"></span>{{/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)}}<span class="test"></span>{{/if}}`
hbs`{{#if (includes this.foo this.bar)}}<span class="test"></span>{{/if}}`
);
assert.ok(exists(".test"), "it returns true when element is found");
this.bar = "b";
await render(
hbs`{{#if (includes foo bar)}}<span class="test"></span>{{/if}}`
hbs`{{#if (includes this.foo this.bar)}}<span class="test"></span>{{/if}}`
);
assert.notOk(exists(".test"), "it returns false when element is not found");

View File

@ -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(

View File

@ -10,7 +10,7 @@ module("Integration | Component | html-safe-helper", function (hooks) {
test("default", async function (assert) {
this.set("string", "<p class='cookies'>biscuits</p>");
await render(hbs`{{html-safe string}}`);
await render(hbs`{{html-safe this.string}}`);
assert.ok(exists("p.cookies"), "it displays the string as html");
});

View File

@ -53,15 +53,15 @@ module("Integration | Component | plugin-outlet", function (hooks) {
registerTemporaryModule(
`${PREFIX}/test-name/hello`,
hbs`<span class='hello-username'>{{username}}</span>
hbs`<span class='hello-username'>{{this.username}}</span>
<button class='say-hello' {{on "click" (action "sayHello")}}></button>
<button class='say-hello-using-this' {{on "click" this.sayHello}}></button>
<span class='hello-result'>{{hello}}</span>`
<span class='hello-result'>{{this.hello}}</span>`
);
registerTemporaryModule(
`${PREFIX}/test-name/hi`,
hbs`<button class='say-hi' {{on "click" (action "sayHi")}}></button>
<span class='hi-result'>{{hi}}</span>`
<span class='hi-result'>{{this.hi}}</span>`
);
registerTemporaryModule(
`${PREFIX}/test-name/conditional-render`,

View File

@ -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
}}
/>
`);

View File

@ -129,7 +129,7 @@ module(
this.set("input", moment("2032-01-01 11:10"));
await render(
hbs`<FutureDateInput @input={{this.input}} @onChangeInput={{action (mut input)}} />`
hbs`<FutureDateInput @input={{this.input}} @onChangeInput={{action (mut this.input)}} />`
);
await fillIn(".time-input", "11:15");