5
5
using Microsoft . AspNetCore . Components . E2ETest . Infrastructure ;
6
6
using Microsoft . AspNetCore . Components . E2ETest . Infrastructure . ServerFixtures ;
7
7
using Microsoft . AspNetCore . E2ETesting ;
8
+ using Microsoft . AspNetCore . Testing ;
8
9
using OpenQA . Selenium ;
9
10
using TestServer ;
10
11
using Xunit . Abstractions ;
@@ -489,6 +490,7 @@ public void AutoRenderMode_UsesBlazorWebAssembly_WhenAddingWebAssemblyComponentA
489
490
}
490
491
491
492
[ Fact ]
493
+ [ QuarantinedTest ( "https://github.com/dotnet/aspnetcore/issues/49961" ) ]
492
494
public void AutoRenderMode_UsesBlazorServerOnFirstLoad_ThenWebAssemblyOnSuccessiveLoads ( )
493
495
{
494
496
Navigate ( ServerPathBase ) ;
@@ -504,6 +506,17 @@ public void AutoRenderMode_UsesBlazorServerOnFirstLoad_ThenWebAssemblyOnSuccessi
504
506
Browser . Equal ( "True" , ( ) => Browser . FindElement ( By . Id ( "is-interactive-0" ) ) . Text ) ;
505
507
Browser . Equal ( "Server" , ( ) => Browser . FindElement ( By . Id ( "render-mode-0" ) ) . Text ) ;
506
508
509
+ UnblockWebAssemblyResourceLoad ( ) ;
510
+
511
+ // Add a WebAssembly component to ensure the WebAssembly runtime
512
+ // will be cached after we refresh the page.
513
+ Browser . Click ( By . Id ( AddWebAssemblyPrerenderedId ) ) ;
514
+ Browser . Equal ( "True" , ( ) => Browser . FindElement ( By . Id ( "is-interactive-1" ) ) . Text ) ;
515
+ Browser . Equal ( "WebAssembly" , ( ) => Browser . FindElement ( By . Id ( "render-mode-1" ) ) . Text ) ;
516
+
517
+ Browser . Click ( By . Id ( $ "remove-counter-link-1") ) ;
518
+ Browser . DoesNotExist ( By . Id ( "is-interactive-1" ) ) ;
519
+
507
520
Browser . Navigate ( ) . Refresh ( ) ;
508
521
509
522
Browser . Equal ( "True" , ( ) => Browser . FindElement ( By . Id ( "is-interactive-0" ) ) . Text ) ;
0 commit comments