Skip to content

Commit 44917cf

Browse files
committed
tests: use this in property path in templates
When running the `id-for-deprecation-test` suite, there are several instances of the [this-property-fallback] deprecation logged to the console. Let's make sure that we always use `this.` in the property path of our inline templates when appropriate. This should help with #1272.
1 parent b70c8df commit 44917cf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/integration/helpers/id-for-deprecation-test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ module('Integration | Helper | id-for-deprecation', function (hooks) {
1010
test('anchor id is prefixed with toc_', async function (assert) {
1111
this.set('inputValue', 'toJSON');
1212

13-
await render(hbs`{{id-for-deprecation inputValue}}`);
13+
await render(hbs`{{id-for-deprecation this.inputValue}}`);
1414

1515
assert.equal(this.element.textContent.trim(), 'toc_toJSON');
1616
});
1717
test('anchor id has periods, commas, and colons replaced with dashes', async function (assert) {
1818
this.set('inputValue', 'ember-data:object.init,constructor');
1919

20-
await render(hbs`{{id-for-deprecation inputValue}}`);
20+
await render(hbs`{{id-for-deprecation this.inputValue}}`);
2121

2222
assert.equal(
2323
this.element.textContent.trim(),
@@ -27,7 +27,7 @@ module('Integration | Helper | id-for-deprecation', function (hooks) {
2727
test('anchor id has whitespace stripped out', async function (assert) {
2828
this.set('inputValue', 'ember_object.some property');
2929

30-
await render(hbs`{{id-for-deprecation inputValue}}`);
30+
await render(hbs`{{id-for-deprecation this.inputValue}}`);
3131

3232
assert.equal(
3333
this.element.textContent.trim(),
@@ -41,7 +41,9 @@ module('Integration | Helper | id-for-deprecation', function (hooks) {
4141
this.set('deprecationId', 'my-deprecation');
4242
this.set('optionalAnchorId', anchor);
4343

44-
await render(hbs`{{id-for-deprecation deprecationId optionalAnchorId}}`);
44+
await render(
45+
hbs`{{id-for-deprecation this.deprecationId this.optionalAnchorId}}`
46+
);
4547

4648
assert.equal(this.element.textContent.trim(), anchor);
4749
});

0 commit comments

Comments
 (0)