Skip to content

Commit 8291f84

Browse files
committed
Update some tests
1 parent ae63159 commit 8291f84

File tree

3 files changed

+15
-84
lines changed

3 files changed

+15
-84
lines changed

packages/@glimmer/integration-tests/test/ember-component-test.ts

+2-33
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ class CurlyScopeTest extends CurlyTest {
542542
}
543543

544544
@test
545-
'correct scope - self lookup inside #each'(assert: Assert) {
545+
'correct scope - self lookup inside #each'() {
546546
this.registerComponent('TemplateOnly', 'SubItem', `<p>{{@name}}</p>`);
547547

548548
let subitems = [{ id: 0 }, { id: 1 }, { id: 42 }];
@@ -552,8 +552,7 @@ class CurlyScopeTest extends CurlyTest {
552552
<div>
553553
{{#each this.items key="id" as |item|}}
554554
<SubItem @name={{this.id}} />
555-
{{! Intentional property fallback to test self lookup }}
556-
<SubItem @name={{id}} />
555+
<SubItem @name={{this.id}} />
557556
<SubItem @name={{item.id}} />
558557
{{/each}}
559558
</div>`,
@@ -569,10 +568,6 @@ class CurlyScopeTest extends CurlyTest {
569568
</div>
570569
`
571570
);
572-
573-
assert.validateDeprecations(
574-
/The `id` property was used in the `.*` template without using `this`/
575-
);
576571
}
577572

578573
@test
@@ -1633,32 +1628,6 @@ class CurlyGlimmerComponentTest extends CurlyTest {
16331628
this.assertHTML('Foo');
16341629
this.assertStableNodes();
16351630
}
1636-
1637-
@test
1638-
'Can use implicit this fallback for `component.name` emberjs/ember.js#19313'(assert: Assert) {
1639-
this.registerComponent(
1640-
'Glimmer',
1641-
'Outer',
1642-
'{{component.name}}',
1643-
class extends GlimmerishComponent {
1644-
get component() {
1645-
return { name: 'Foo' };
1646-
}
1647-
}
1648-
);
1649-
1650-
this.render('<Outer />');
1651-
this.assertHTML('Foo');
1652-
1653-
this.rerender();
1654-
1655-
this.assertHTML('Foo');
1656-
this.assertStableNodes();
1657-
1658-
assert.validateDeprecations(
1659-
/The `component\.name` property path was used in the `.*` template without using `this`/
1660-
);
1661-
}
16621631
}
16631632

16641633
class CurlyTeardownTest extends CurlyTest {

packages/@glimmer/integration-tests/test/helpers/dynamic-helpers-test.ts

-23
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,6 @@ class DynamicHelpersResolutionModeTest extends RenderTest {
2020
this.assertStableRerender();
2121
}
2222

23-
@test
24-
'Can invoke a helper definition based on this fallback lookup in resolution mode'(
25-
assert: Assert
26-
) {
27-
const foo = defineSimpleHelper(() => 'Hello, world!');
28-
this.registerComponent(
29-
'Glimmer',
30-
'Bar',
31-
'{{x.foo}}',
32-
class extends GlimmerishComponent {
33-
x = { foo };
34-
}
35-
);
36-
37-
this.render('<Bar/>');
38-
this.assertHTML('Hello, world!');
39-
this.assertStableRerender();
40-
41-
assert.validateDeprecations(
42-
/The `x\.foo` property path was used in the `.*` template without using `this`/
43-
);
44-
}
45-
4623
@test
4724
'Can use a dynamic helper with nested helpers'() {
4825
const foo = defineSimpleHelper(() => 'world!');

packages/@glimmer/integration-tests/test/updating-test.ts

+13-28
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class UpdatingTest extends RenderTest {
101101
this.render(
102102
stripTight`
103103
<div>
104-
[{{this.[]}}]
104+
[{{this.['']}}]
105105
[{{this.[1]}}]
106106
[{{this.[undefined]}}]
107107
[{{this.[null]}}]
@@ -110,7 +110,7 @@ class UpdatingTest extends RenderTest {
110110
[{{this.[this]}}]
111111
[{{this.[foo.bar]}}]
112112
113-
[{{this.nested.[]}}]
113+
[{{this.nested.['']}}]
114114
[{{this.nested.[1]}}]
115115
[{{this.nested.[undefined]}}]
116116
[{{this.nested.[null]}}]
@@ -125,7 +125,7 @@ class UpdatingTest extends RenderTest {
125125

126126
this.assertHTML(stripTight`
127127
<div>
128-
[empty string]
128+
[]
129129
[1]
130130
[undefined]
131131
[null]
@@ -134,7 +134,7 @@ class UpdatingTest extends RenderTest {
134134
[this]
135135
[foo.bar]
136136
137-
[empty string]
137+
[]
138138
[1]
139139
[undefined]
140140
[null]
@@ -159,7 +159,7 @@ class UpdatingTest extends RenderTest {
159159

160160
this.assertHTML(stripTight`
161161
<div>
162-
[EMPTY STRING]
162+
[]
163163
[ONE]
164164
[UNDEFINED]
165165
[NULL]
@@ -168,7 +168,7 @@ class UpdatingTest extends RenderTest {
168168
[THIS]
169169
[FOO.BAR]
170170
171-
[EMPTY STRING]
171+
[]
172172
[ONE]
173173
[UNDEFINED]
174174
[NULL]
@@ -196,7 +196,7 @@ class UpdatingTest extends RenderTest {
196196

197197
this.assertHTML(stripTight`
198198
<div>
199-
[empty string]
199+
[]
200200
[1]
201201
[undefined]
202202
[null]
@@ -205,7 +205,7 @@ class UpdatingTest extends RenderTest {
205205
[this]
206206
[foo.bar]
207207
208-
[empty string]
208+
[]
209209
[1]
210210
[undefined]
211211
[null]
@@ -215,10 +215,6 @@ class UpdatingTest extends RenderTest {
215215
[foo.bar]
216216
</div>
217217
`);
218-
219-
assert.validateDeprecations(
220-
/The `` property was used in the `.*` template without using `this`/
221-
);
222218
}
223219

224220
@test
@@ -949,8 +945,8 @@ class UpdatingTest extends RenderTest {
949945
foo: "{{foo}}";
950946
bar: "{{bar}}";
951947
value: "{{this.value}}";
952-
echo foo: "{{echo foo}}";
953-
echo bar: "{{echo bar}}";
948+
echo foo: "{{echo this.foo}}";
949+
echo bar: "{{echo this.bar}}";
954950
echo value: "{{echo this.value}}";
955951
956952
-----
@@ -960,7 +956,7 @@ class UpdatingTest extends RenderTest {
960956
bar: "{{bar}}";
961957
value: "{{this.value}}";
962958
echo foo: "{{echo foo}}";
963-
echo bar: "{{echo bar}}";
959+
echo bar: "{{echo this.bar}}";
964960
echo value: "{{echo this.value}}";
965961
966962
-----
@@ -981,7 +977,7 @@ class UpdatingTest extends RenderTest {
981977
foo: "{{foo}}";
982978
bar: "{{bar}}";
983979
value: "{{this.value}}";
984-
echo foo: "{{echo foo}}";
980+
echo foo: "{{echo this.foo}}";
985981
echo bar: "{{echo bar}}";
986982
echo value: "{{echo this.value}}";
987983
{{/with}}
@@ -1115,19 +1111,12 @@ class UpdatingTest extends RenderTest {
11151111
</div>`,
11161112
'After reset'
11171113
);
1118-
1119-
assert.validateDeprecations(
1120-
/The `foo` property path was used in the `.*` template without using `this`/,
1121-
/The `bar` property path was used in the `.*` template without using `this`/,
1122-
/The `bar` property path was used in the `.*` template without using `this`/,
1123-
/The `foo` property path was used in the `.*` template without using `this`/
1124-
);
11251114
}
11261115

11271116
@test
11281117
'block arguments (ensure balanced push/pop)'() {
11291118
let person = { name: { first: 'Godfrey', last: 'Chan' } };
1130-
this.render('<div>{{#with this.person.name.first as |f|}}{{f}}{{/with}}{{f}}</div>', {
1119+
this.render('<div>{{#with this.person.name.first as |f|}}{{f}}{{/with}}{{this.f}}</div>', {
11311120
person,
11321121
f: 'Outer',
11331122
});
@@ -1138,10 +1127,6 @@ class UpdatingTest extends RenderTest {
11381127
this.rerender({ person });
11391128

11401129
this.assertHTML('<div>GodfreakOuter</div>', 'After updating');
1141-
1142-
assert.validateDeprecations(
1143-
/The `f` property was used in the `.*` template without using `this`/
1144-
);
11451130
}
11461131

11471132
@test

0 commit comments

Comments
 (0)