File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Components/test/E2ETest/ServerRenderingTests Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,7 @@ public EnhancedNavigationTest(
3131 // One of the tests here makes use of the streaming rendering page, which uses global state
3232 // so we can't run at the same time as other such tests
3333 public override Task InitializeAsync ( )
34- {
35- var initTask = InitializeAsync ( BrowserFixture . StreamingContext ) ;
36- var testId = Guid . NewGuid ( ) . ToString ( "N" ) [ ..8 ] ;
37- ( ( IJavaScriptExecutor ) Browser ) . ExecuteScript ( $ "sessionStorage.setItem('test-id', '{ testId } ')") ;
38- return initTask ;
39- }
34+ => InitializeAsync ( BrowserFixture . StreamingContext ) ;
4035
4136 [ Fact ]
4237 public void CanNavigateToAnotherPageWhilePreservingCommonDOMElements ( )
Original file line number Diff line number Diff line change @@ -63,9 +63,16 @@ public virtual Task InitializeAsync(string isolationContext)
6363 {
6464 InitializeBrowser ( isolationContext ) ;
6565 InitializeAsyncCore ( ) ;
66+ GrantTestId ( ) ;
6667 return Task . CompletedTask ;
6768 }
6869
70+ private void GrantTestId ( )
71+ {
72+ var testId = Guid . NewGuid ( ) . ToString ( "N" ) [ ..8 ] ;
73+ ( ( IJavaScriptExecutor ) Browser ) . ExecuteScript ( $ "sessionStorage.setItem('test-id', '{ testId } ')") ;
74+ }
75+
6976 protected virtual void InitializeAsyncCore ( )
7077 {
7178 }
You can’t perform that action at this time.
0 commit comments