|
178 | 178 | assert.equal(getComputedStyle(stamped[1]).display, 'inline', 'stamped 2 display wrong'); |
179 | 179 | }); |
180 | 180 |
|
181 | | - test('show 3', function() { |
182 | | - individual.shouldStamp3 = true; |
| 181 | + test('show 3-1', function() { |
| 182 | + individual.shouldStamp3_1 = true; |
183 | 183 | individual.render(); |
184 | 184 | let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)'); |
185 | 185 | assert.equal(stamped.length, 3, 'total stamped count incorrect'); |
186 | 186 | assert.equal(stamped[0].prop, 'prop1'); |
187 | 187 | assert.equal(stamped[1].prop, 'prop2'); |
188 | | - assert.equal(stamped[2].prop, 'prop3'); |
| 188 | + assert.equal(stamped[2].prop, 'prop3_1'); |
189 | 189 | assert.equal(getComputedStyle(stamped[0]).display, 'inline', 'stamped 1 display wrong'); |
190 | 190 | 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'); |
192 | 192 | }); |
193 | 193 |
|
194 | | - test('show 4', function() { |
195 | | - individual.shouldStamp4 = true; |
| 194 | + test('show 3-2', function() { |
| 195 | + individual.shouldStamp3_2 = true; |
196 | 196 | individual.render(); |
197 | 197 | let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)'); |
198 | 198 | assert.equal(stamped.length, 4, 'total stamped count incorrect'); |
199 | 199 | assert.equal(stamped[0].prop, 'prop1'); |
200 | 200 | 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'); |
203 | 203 | assert.equal(getComputedStyle(stamped[0]).display, 'inline', 'stamped 1 display wrong'); |
204 | 204 | 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'); |
207 | 207 | }); |
208 | 208 |
|
209 | | - test('remove 4', function() { |
210 | | - individual.shouldStamp4 = false; |
| 209 | + test('remove 3-2', function() { |
| 210 | + individual.shouldStamp3_2 = false; |
211 | 211 | individual.render(); |
212 | 212 | let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)'); |
213 | 213 | assert.equal(stamped.length, 3, 'total stamped count incorrect'); |
214 | 214 | assert.equal(stamped[0].prop, 'prop1'); |
215 | 215 | assert.equal(stamped[1].prop, 'prop2'); |
216 | | - assert.equal(stamped[2].prop, 'prop3'); |
| 216 | + assert.equal(stamped[2].prop, 'prop3_1'); |
217 | 217 | assert.equal(getComputedStyle(stamped[0]).display, 'inline', 'stamped 1 display wrong'); |
218 | 218 | 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'); |
220 | 220 | }); |
221 | 221 |
|
222 | | - test('show 5', function() { |
223 | | - individual.shouldStamp5 = true; |
| 222 | + test('show 3-3', function() { |
| 223 | + individual.shouldStamp3_3 = true; |
224 | 224 | individual.render(); |
225 | 225 | let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)'); |
226 | 226 | assert.equal(stamped.length, 4, 'total stamped count incorrect'); |
227 | 227 | assert.equal(stamped[0].prop, 'prop1'); |
228 | 228 | 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'); |
231 | 231 | assert.equal(getComputedStyle(stamped[0]).display, 'inline', 'stamped 1 display wrong'); |
232 | 232 | 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'); |
235 | 235 | }); |
236 | 236 |
|
237 | | - test('update 5', function() { |
238 | | - individual.prop5 = 'prop5*'; |
| 237 | + test('update 3-3', function() { |
| 238 | + individual.prop3_3 = 'prop3_3*'; |
239 | 239 | let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)'); |
240 | 240 | assert.equal(stamped.length, 4, 'total stamped count incorrect'); |
241 | 241 | assert.equal(stamped[0].prop, 'prop1'); |
242 | 242 | 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*'); |
245 | 245 | }); |
246 | 246 |
|
247 | | - test('remove 5', function() { |
248 | | - individual.shouldStamp5 = false; |
| 247 | + test('remove 3-3', function() { |
| 248 | + individual.shouldStamp3_3 = false; |
249 | 249 | individual.render(); |
250 | 250 | let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)'); |
251 | 251 | assert.equal(stamped.length, 3, 'total stamped count incorrect'); |
252 | 252 | assert.equal(stamped[0].prop, 'prop1'); |
253 | 253 | assert.equal(stamped[1].prop, 'prop2'); |
254 | | - assert.equal(stamped[2].prop, 'prop3'); |
| 254 | + assert.equal(stamped[2].prop, 'prop3_1'); |
255 | 255 | assert.equal(getComputedStyle(stamped[0]).display, 'inline', 'stamped 1 display wrong'); |
256 | 256 | 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'); |
258 | 258 | }); |
259 | 259 |
|
260 | 260 | test('remove 3', function() { |
261 | | - individual.shouldStamp3 = false; |
| 261 | + individual.shouldStamp3_1 = false; |
262 | 262 | individual.render(); |
263 | 263 | let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)'); |
264 | 264 | assert.equal(stamped.length, 2, 'total stamped count incorrect'); |
|
305 | 305 | }); |
306 | 306 |
|
307 | 307 | test('show 3', function() { |
308 | | - individual.shouldStamp3 = true; |
| 308 | + individual.shouldStamp3_1 = true; |
309 | 309 | individual.render(); |
310 | 310 | let stamped = individual.shadowRoot.querySelectorAll('*:not(template):not(dom-if):not(span)'); |
311 | 311 | assert.equal(stamped.length, 3, 'total stamped count incorrect'); |
|
0 commit comments