@@ -136,14 +136,7 @@ public void CanUpdateComponentsWithPersistedStateAndEnhancedNavUpdates(
136136
137137 // Navigate to a page without components first to make sure that we exercise rendering components
138138 // with enhanced navigation on.
139- if ( streaming == null )
140- {
141- Navigate ( $ "subdir/persistent-state/page-no-components?render-mode={ mode } &suppress-autostart") ;
142- }
143- else
144- {
145- Navigate ( $ "subdir/persistent-state/page-no-components?render-mode={ mode } &streaming-id={ streaming } &suppress-autostart") ;
146- }
139+ NavigateToInitialPage ( streaming , mode ) ;
147140 if ( mode == "auto" )
148141 {
149142 BlockWebAssemblyResourceLoad ( ) ;
@@ -159,12 +152,27 @@ public void CanUpdateComponentsWithPersistedStateAndEnhancedNavUpdates(
159152 {
160153 // For auto mode, validate that the state is persisted for both runtimes and is able
161154 // to be loaded on server and wasm.
162- RenderComponentsWithDeclarativePersistentStateAndValidate ( mode , renderMode , streaming , interactiveRuntime : "server" ) ;
155+ RenderComponentsWithDeclarativePersistentStateAndValidate ( mode , renderMode , streaming , interactiveRuntime : "server" , stateValue : "other" ) ;
163156
164157 UnblockWebAssemblyResourceLoad ( ) ;
165158 Browser . Navigate ( ) . Refresh ( ) ;
159+ NavigateToInitialPage ( streaming , mode ) ;
160+ Browser . Click ( By . Id ( "call-blazor-start" ) ) ;
161+ Browser . Click ( By . Id ( "page-with-components-link-and-declarative-state" ) ) ;
162+
163+ RenderComponentsWithDeclarativePersistentStateAndValidate ( mode , renderMode , streaming , interactiveRuntime : "wasm" , stateValue : "other" ) ;
164+ }
166165
167- RenderComponentsWithDeclarativePersistentStateAndValidate ( mode , renderMode , streaming , interactiveRuntime : "wasm" ) ;
166+ void NavigateToInitialPage ( string streaming , string mode )
167+ {
168+ if ( streaming == null )
169+ {
170+ Navigate ( $ "subdir/persistent-state/page-no-components?render-mode={ mode } &suppress-autostart") ;
171+ }
172+ else
173+ {
174+ Navigate ( $ "subdir/persistent-state/page-no-components?render-mode={ mode } &streaming-id={ streaming } &suppress-autostart") ;
175+ }
168176 }
169177 }
170178
0 commit comments