Unsilence this-property-fallback (#21615)
This commit is contained in:
parent
cd6183de93
commit
6084b331ed
|
@ -9,7 +9,7 @@ acceptance("Plugin Outlet - Deprecated parentView", function (needs) {
|
||||||
needs.hooks.beforeEach(function () {
|
needs.hooks.beforeEach(function () {
|
||||||
registerTemporaryModule(
|
registerTemporaryModule(
|
||||||
"discourse/templates/connectors/user-profile-primary/hello",
|
"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>`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ acceptance("Plugin Outlet - Single Template", function (needs) {
|
||||||
needs.hooks.beforeEach(() => {
|
needs.hooks.beforeEach(() => {
|
||||||
registerTemporaryModule(
|
registerTemporaryModule(
|
||||||
CONNECTOR_MODULE,
|
CONNECTOR_MODULE,
|
||||||
hbs`<span class='hello-username'>{{model.username}}</span>`
|
hbs`<span class='hello-username'>{{this.model.username}}</span>`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -11,14 +11,14 @@ module("Addons | truth-helpers | Integration | includes", function (hooks) {
|
||||||
this.foo = [1];
|
this.foo = [1];
|
||||||
this.bar = 1;
|
this.bar = 1;
|
||||||
await render(
|
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");
|
assert.ok(exists(".test"), "it returns true when element is found");
|
||||||
|
|
||||||
this.bar = 2;
|
this.bar = 2;
|
||||||
await render(
|
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");
|
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.foo = "foo";
|
||||||
this.bar = "f";
|
this.bar = "f";
|
||||||
await render(
|
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");
|
assert.ok(exists(".test"), "it returns true when element is found");
|
||||||
|
|
||||||
this.bar = "b";
|
this.bar = "b";
|
||||||
await render(
|
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");
|
assert.notOk(exists(".test"), "it returns false when element is not found");
|
||||||
|
|
|
@ -11,7 +11,7 @@ module("Integration | Component | category-badge helper", function (hooks) {
|
||||||
test("displays category", async function (assert) {
|
test("displays category", async function (assert) {
|
||||||
this.set("category", Category.findById(1));
|
this.set("category", Category.findById(1));
|
||||||
|
|
||||||
await render(hbs`{{category-badge category}}`);
|
await render(hbs`{{category-badge this.category}}`);
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
query(".category-name").innerText.trim(),
|
query(".category-name").innerText.trim(),
|
||||||
|
@ -22,7 +22,7 @@ module("Integration | Component | category-badge helper", function (hooks) {
|
||||||
test("options.link", async function (assert) {
|
test("options.link", async function (assert) {
|
||||||
this.set("category", Category.findById(1));
|
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(
|
assert.ok(
|
||||||
exists(
|
exists(
|
||||||
|
|
|
@ -10,7 +10,7 @@ module("Integration | Component | html-safe-helper", function (hooks) {
|
||||||
test("default", async function (assert) {
|
test("default", async function (assert) {
|
||||||
this.set("string", "<p class='cookies'>biscuits</p>");
|
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");
|
assert.ok(exists("p.cookies"), "it displays the string as html");
|
||||||
});
|
});
|
||||||
|
|
|
@ -53,15 +53,15 @@ module("Integration | Component | plugin-outlet", function (hooks) {
|
||||||
|
|
||||||
registerTemporaryModule(
|
registerTemporaryModule(
|
||||||
`${PREFIX}/test-name/hello`,
|
`${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' {{on "click" (action "sayHello")}}></button>
|
||||||
<button class='say-hello-using-this' {{on "click" this.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(
|
registerTemporaryModule(
|
||||||
`${PREFIX}/test-name/hi`,
|
`${PREFIX}/test-name/hi`,
|
||||||
hbs`<button class='say-hi' {{on "click" (action "sayHi")}}></button>
|
hbs`<button class='say-hi' {{on "click" (action "sayHi")}}></button>
|
||||||
<span class='hi-result'>{{hi}}</span>`
|
<span class='hi-result'>{{this.hi}}</span>`
|
||||||
);
|
);
|
||||||
registerTemporaryModule(
|
registerTemporaryModule(
|
||||||
`${PREFIX}/test-name/conditional-render`,
|
`${PREFIX}/test-name/conditional-render`,
|
||||||
|
|
|
@ -75,8 +75,8 @@ module("Integration | Component | select-kit/combo-box", function (hooks) {
|
||||||
@value={{this.value}}
|
@value={{this.value}}
|
||||||
@content={{this.content}}
|
@content={{this.content}}
|
||||||
@options={{hash
|
@options={{hash
|
||||||
caretUpIcon=caretUpIcon
|
caretUpIcon=this.caretUpIcon
|
||||||
caretDownIcon=caretDownIcon
|
caretDownIcon=this.caretDownIcon
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
`);
|
`);
|
||||||
|
|
|
@ -129,7 +129,7 @@ module(
|
||||||
this.set("input", moment("2032-01-01 11:10"));
|
this.set("input", moment("2032-01-01 11:10"));
|
||||||
|
|
||||||
await render(
|
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");
|
await fillIn(".time-input", "11:15");
|
||||||
|
|
Loading…
Reference in New Issue