Skip to content

Commit dc0754e

Browse files
committed
Update nested template names.
1 parent 9e106d8 commit dc0754e

File tree

2 files changed

+42
-42
lines changed

2 files changed

+42
-42
lines changed

test/unit/dom-if-elements.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ Polymer({
126126
<x-foo prop="{{prop1}}"></x-foo>
127127
<template is="dom-if" id="if-2" if="{{shouldStamp2}}">
128128
<x-foo prop="{{prop2}}"></x-foo>
129-
<template is="dom-if" id="if-3" if="{{shouldStamp3}}" restamp>
130-
<x-foo prop="{{prop3}}"></x-foo>
129+
<template is="dom-if" id="if-3-1" if="{{shouldStamp3_1}}" restamp>
130+
<x-foo prop="{{prop3_1}}"></x-foo>
131131
</template>
132-
<template is="dom-if" id="if-4" if="{{shouldStamp4}}" restamp>
133-
<x-foo prop="{{prop4}}"></x-foo>
132+
<template is="dom-if" id="if-4-2" if="{{shouldStamp3_2}}" restamp>
133+
<x-foo prop="{{prop3_2}}"></x-foo>
134134
</template>
135-
<template is="dom-if" id="if-5" if="{{shouldStamp5}}" restamp>
136-
<x-foo prop="{{prop5}}"></x-foo>
135+
<template is="dom-if" id="if-5-3" if="{{shouldStamp3_3}}" restamp>
136+
<x-foo prop="{{prop3_3}}"></x-foo>
137137
</template>
138138
</template>
139139
</template>
@@ -148,14 +148,14 @@ Polymer({
148148
prop2: {
149149
value: 'prop2'
150150
},
151-
prop3: {
152-
value: 'prop3'
151+
prop3_1: {
152+
value: 'prop3_1'
153153
},
154-
prop4: {
155-
value: 'prop4'
154+
prop3_2: {
155+
value: 'prop3_2'
156156
},
157-
prop5: {
158-
value: 'prop5'
157+
prop3_3: {
158+
value: 'prop3_3'
159159
},
160160
item: {
161161
value: function() { return {prop: 'outerItem'}; }

test/unit/dom-if.html

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -178,87 +178,87 @@
178178
assert.equal(getComputedStyle(stamped[1]).display, 'inline', 'stamped 2 display wrong');
179179
});
180180

181-
test('show 3', function() {
182-
individual.shouldStamp3 = true;
181+
test('show 3-1', function() {
182+
individual.shouldStamp3_1 = true;
183183
individual.render();
184184
let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)');
185185
assert.equal(stamped.length, 3, 'total stamped count incorrect');
186186
assert.equal(stamped[0].prop, 'prop1');
187187
assert.equal(stamped[1].prop, 'prop2');
188-
assert.equal(stamped[2].prop, 'prop3');
188+
assert.equal(stamped[2].prop, 'prop3_1');
189189
assert.equal(getComputedStyle(stamped[0]).display, 'inline', 'stamped 1 display wrong');
190190
assert.equal(getComputedStyle(stamped[1]).display, 'inline', 'stamped 2 display wrong');
191-
assert.equal(getComputedStyle(stamped[2]).display, 'inline', 'stamped 3 display wrong');
191+
assert.equal(getComputedStyle(stamped[2]).display, 'inline', 'stamped 3-1 display wrong');
192192
});
193193

194-
test('show 4', function() {
195-
individual.shouldStamp4 = true;
194+
test('show 3-2', function() {
195+
individual.shouldStamp3_2 = true;
196196
individual.render();
197197
let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)');
198198
assert.equal(stamped.length, 4, 'total stamped count incorrect');
199199
assert.equal(stamped[0].prop, 'prop1');
200200
assert.equal(stamped[1].prop, 'prop2');
201-
assert.equal(stamped[2].prop, 'prop3');
202-
assert.equal(stamped[3].prop, 'prop4');
201+
assert.equal(stamped[2].prop, 'prop3_1');
202+
assert.equal(stamped[3].prop, 'prop3_2');
203203
assert.equal(getComputedStyle(stamped[0]).display, 'inline', 'stamped 1 display wrong');
204204
assert.equal(getComputedStyle(stamped[1]).display, 'inline', 'stamped 2 display wrong');
205-
assert.equal(getComputedStyle(stamped[2]).display, 'inline', 'stamped 3 display wrong');
206-
assert.equal(getComputedStyle(stamped[3]).display, 'inline', 'stamped 4 display wrong');
205+
assert.equal(getComputedStyle(stamped[2]).display, 'inline', 'stamped 3-1 display wrong');
206+
assert.equal(getComputedStyle(stamped[3]).display, 'inline', 'stamped 3-2 display wrong');
207207
});
208208

209-
test('remove 4', function() {
210-
individual.shouldStamp4 = false;
209+
test('remove 3-2', function() {
210+
individual.shouldStamp3_2 = false;
211211
individual.render();
212212
let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)');
213213
assert.equal(stamped.length, 3, 'total stamped count incorrect');
214214
assert.equal(stamped[0].prop, 'prop1');
215215
assert.equal(stamped[1].prop, 'prop2');
216-
assert.equal(stamped[2].prop, 'prop3');
216+
assert.equal(stamped[2].prop, 'prop3_1');
217217
assert.equal(getComputedStyle(stamped[0]).display, 'inline', 'stamped 1 display wrong');
218218
assert.equal(getComputedStyle(stamped[1]).display, 'inline', 'stamped 2 display wrong');
219-
assert.equal(getComputedStyle(stamped[2]).display, 'inline', 'stamped 3 display wrong');
219+
assert.equal(getComputedStyle(stamped[2]).display, 'inline', 'stamped 3-1 display wrong');
220220
});
221221

222-
test('show 5', function() {
223-
individual.shouldStamp5 = true;
222+
test('show 3-3', function() {
223+
individual.shouldStamp3_3 = true;
224224
individual.render();
225225
let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)');
226226
assert.equal(stamped.length, 4, 'total stamped count incorrect');
227227
assert.equal(stamped[0].prop, 'prop1');
228228
assert.equal(stamped[1].prop, 'prop2');
229-
assert.equal(stamped[2].prop, 'prop3');
230-
assert.equal(stamped[3].prop, 'prop5');
229+
assert.equal(stamped[2].prop, 'prop3_1');
230+
assert.equal(stamped[3].prop, 'prop3_3');
231231
assert.equal(getComputedStyle(stamped[0]).display, 'inline', 'stamped 1 display wrong');
232232
assert.equal(getComputedStyle(stamped[1]).display, 'inline', 'stamped 2 display wrong');
233-
assert.equal(getComputedStyle(stamped[2]).display, 'inline', 'stamped 3 display wrong');
234-
assert.equal(getComputedStyle(stamped[3]).display, 'inline', 'stamped 5 display wrong');
233+
assert.equal(getComputedStyle(stamped[2]).display, 'inline', 'stamped 3-1 display wrong');
234+
assert.equal(getComputedStyle(stamped[3]).display, 'inline', 'stamped 3-3 display wrong');
235235
});
236236

237-
test('update 5', function() {
238-
individual.prop5 = 'prop5*';
237+
test('update 3-3', function() {
238+
individual.prop3_3 = 'prop3_3*';
239239
let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)');
240240
assert.equal(stamped.length, 4, 'total stamped count incorrect');
241241
assert.equal(stamped[0].prop, 'prop1');
242242
assert.equal(stamped[1].prop, 'prop2');
243-
assert.equal(stamped[2].prop, 'prop3');
244-
assert.equal(stamped[3].prop, 'prop5*');
243+
assert.equal(stamped[2].prop, 'prop3_1');
244+
assert.equal(stamped[3].prop, 'prop3_3*');
245245
});
246246

247-
test('remove 5', function() {
248-
individual.shouldStamp5 = false;
247+
test('remove 3-3', function() {
248+
individual.shouldStamp3_3 = false;
249249
individual.render();
250250
let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)');
251251
assert.equal(stamped.length, 3, 'total stamped count incorrect');
252252
assert.equal(stamped[0].prop, 'prop1');
253253
assert.equal(stamped[1].prop, 'prop2');
254-
assert.equal(stamped[2].prop, 'prop3');
254+
assert.equal(stamped[2].prop, 'prop3_1');
255255
assert.equal(getComputedStyle(stamped[0]).display, 'inline', 'stamped 1 display wrong');
256256
assert.equal(getComputedStyle(stamped[1]).display, 'inline', 'stamped 2 display wrong');
257-
assert.equal(getComputedStyle(stamped[2]).display, 'inline', 'stamped 3 display wrong');
257+
assert.equal(getComputedStyle(stamped[2]).display, 'inline', 'stamped 3-1 display wrong');
258258
});
259259

260260
test('remove 3', function() {
261-
individual.shouldStamp3 = false;
261+
individual.shouldStamp3_1 = false;
262262
individual.render();
263263
let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)');
264264
assert.equal(stamped.length, 2, 'total stamped count incorrect');
@@ -305,7 +305,7 @@
305305
});
306306

307307
test('show 3', function() {
308-
individual.shouldStamp3 = true;
308+
individual.shouldStamp3_1 = true;
309309
individual.render();
310310
let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)');
311311
assert.equal(stamped.length, 3, 'total stamped count incorrect');

0 commit comments

Comments
 (0)