@@ -350,30 +350,15 @@ public void InteractiveRootComponents_CanReceiveSsrParameterUpdates_FromEnhanced
350
350
{
351
351
Browser . Click ( By . Id ( addCounterLinkIds [ i ] ) ) ;
352
352
Browser . Equal ( "True" , ( ) => Browser . FindElement ( By . Id ( $ "is-interactive-{ i } ") ) . Text ) ;
353
+
353
354
Browser . Click ( By . Id ( $ "increment-{ i } ") ) ;
354
355
Browser . Equal ( "1" , ( ) => Browser . FindElement ( By . Id ( $ "count-{ i } ") ) . Text ) ;
355
- }
356
356
357
- for ( var i = 0 ; i < addCounterLinkIds . Length ; i ++ )
358
- {
359
357
Browser . Click ( By . Id ( $ "update-counter-link-{ i } ") ) ;
360
358
Browser . Equal ( "2" , ( ) => Browser . FindElement ( By . Id ( $ "increment-amount-{ i } ") ) . Text ) ;
361
- Browser . Equal ( "0" , ( ) => Browser . FindElement ( By . Id ( $ "count-{ i } ") ) . Text ) ; // Resets back to 0 because the parameter changed
362
359
363
- // Ensure that interactivity still works, and the correct parameters have been supplied.
364
360
Browser . Click ( By . Id ( $ "increment-{ i } ") ) ;
365
- Browser . Equal ( "2" , ( ) => Browser . FindElement ( By . Id ( $ "count-{ i } ") ) . Text ) ;
366
-
367
- for ( var j = 0 ; j < addCounterLinkIds . Length ; j ++ )
368
- {
369
- if ( j == i )
370
- {
371
- continue ;
372
- }
373
-
374
- // Ensure that other components didn't get reset; their parameters did not change.
375
- Browser . NotEqual ( "0" , ( ) => Browser . FindElement ( By . Id ( $ "count-{ j } ") ) . Text ) ;
376
- }
361
+ Browser . Equal ( "3" , ( ) => Browser . FindElement ( By . Id ( $ "count-{ i } ") ) . Text ) ;
377
362
}
378
363
379
364
AssertBrowserLogDoesNotContainErrors ( ) ;
@@ -393,37 +378,21 @@ public void InteractiveRootComponents_CanReceiveSsrParameterUpdates_FromStreamin
393
378
{
394
379
Browser . Click ( By . Id ( addCounterLinkIds [ i ] ) ) ;
395
380
Browser . Equal ( "True" , ( ) => Browser . FindElement ( By . Id ( $ "is-interactive-{ i } ") ) . Text ) ;
396
- Browser . Click ( By . Id ( $ "increment-{ i } ") ) ;
397
- Browser . Equal ( "1" , ( ) => Browser . FindElement ( By . Id ( $ "count-{ i } ") ) . Text ) ;
398
381
}
399
382
400
383
Browser . Click ( By . Id ( "start-streaming-link" ) ) ;
401
384
Browser . Equal ( "Streaming" , ( ) => Browser . FindElement ( By . Id ( "status" ) ) . Text ) ;
402
385
403
386
for ( var i = 0 ; i < addCounterLinkIds . Length ; i ++ )
404
387
{
388
+ Browser . Click ( By . Id ( $ "increment-{ i } ") ) ;
389
+ Browser . Equal ( "1" , ( ) => Browser . FindElement ( By . Id ( $ "count-{ i } ") ) . Text ) ;
390
+
405
391
Browser . Click ( By . Id ( $ "update-counter-link-{ i } ") ) ;
406
392
Browser . Equal ( "2" , ( ) => Browser . FindElement ( By . Id ( $ "increment-amount-{ i } ") ) . Text ) ;
407
- Browser . Equal ( "0" , ( ) => Browser . FindElement ( By . Id ( $ "count-{ i } ") ) . Text ) ; // Resets back to 0 because the parameter changed
408
393
409
- // Ensure that interactivity still works, and the correct parameters have been supplied.
410
- // Note that while SSR'd components don't become interactive during stream rendering,
411
- // this streaming update replaced an already-interactive component. To ensure that supplying
412
- // unchanged parameters behaves the same way as supplying updated parameters, we
413
- // check that the component is still interactive.
414
394
Browser . Click ( By . Id ( $ "increment-{ i } ") ) ;
415
- Browser . Equal ( "2" , ( ) => Browser . FindElement ( By . Id ( $ "count-{ i } ") ) . Text ) ;
416
-
417
- for ( var j = 0 ; j < addCounterLinkIds . Length ; j ++ )
418
- {
419
- if ( j == i )
420
- {
421
- continue ;
422
- }
423
-
424
- // Ensure that other components didn't get reset; their parameters did not change.
425
- Browser . NotEqual ( "0" , ( ) => Browser . FindElement ( By . Id ( $ "count-{ j } ") ) . Text ) ;
426
- }
395
+ Browser . Equal ( "3" , ( ) => Browser . FindElement ( By . Id ( $ "count-{ i } ") ) . Text ) ;
427
396
}
428
397
429
398
Browser . Click ( By . Id ( "stop-streaming-link" ) ) ;
0 commit comments