@@ -77,16 +77,16 @@ protected void SpaTemplateImpl_IndividualAuth(string template, bool useLocalDb =
7777 Assert . Contains ( ".db" , projectFileContents ) ;
7878 }
7979
80- // Project.RunDotNetEfCreateMigration(template);
80+ Project . RunDotNetEfCreateMigration ( template ) ;
8181
82- // Project.AssertEmptyMigration(template);
82+ Project . AssertEmptyMigration ( template ) ;
8383
8484
85- TestApplication ( publish : false ) ;
85+ TestApplication ( publish : false , visitFetchData : false ) ;
8686
8787 UpdateSettingsForPublish ( ) ;
8888
89- TestApplication ( publish : true ) ;
89+ TestApplication ( publish : true , visitFetchData : false ) ;
9090 }
9191
9292 private void UpdateSettingsForPublish ( )
@@ -109,7 +109,7 @@ private void UpdateSettingsForPublish()
109109 File . WriteAllText ( Path . Combine ( Project . TemplateOutputDir , "appsettings.json" ) , testAppSettings ) ;
110110 }
111111
112- private void TestApplication ( bool publish )
112+ private void TestApplication ( bool publish , bool visitFetchData = true )
113113 {
114114 using ( var aspNetProcess = Project . StartAspNetProcess ( publish ) )
115115 {
@@ -118,12 +118,12 @@ private void TestApplication(bool publish)
118118 if ( BrowserFixture . IsHostAutomationSupported ( ) )
119119 {
120120 aspNetProcess . VisitInBrowser ( Browser ) ;
121- TestBasicNavigation ( ) ;
121+ TestBasicNavigation ( visitFetchData ) ;
122122 }
123123 }
124124 }
125125
126- private void TestBasicNavigation ( )
126+ private void TestBasicNavigation ( bool visitFetchData )
127127 {
128128 Browser . WaitForElement ( "ul" ) ;
129129 // <title> element gets project ID injected into it during template execution
@@ -144,16 +144,19 @@ private void TestBasicNavigation()
144144 Browser . Click ( counterComponent , "button" ) ;
145145 Assert . Equal ( "1" , counterComponent . GetText ( "strong" ) ) ;
146146
147- // Can navigate to the 'fetch data' page
148- Browser . Click ( By . PartialLinkText ( "Fetch data" ) ) ;
149- Browser . WaitForUrl ( "fetch-data" ) ;
150- Assert . Equal ( "Weather forecast" , Browser . GetText ( "h1" ) ) ;
151-
152- // Asynchronously loads and displays the table of weather forecasts
153- var fetchDataComponent = Browser . FindElement ( "h1" ) . Parent ( ) ;
154- Browser . WaitForElement ( "table>tbody>tr" ) ;
155- var table = Browser . FindElement ( fetchDataComponent , "table" , timeoutSeconds : 5 ) ;
156- Assert . Equal ( 5 , table . FindElements ( By . CssSelector ( "tbody tr" ) ) . Count ) ;
147+ if ( visitFetchData )
148+ {
149+ // Can navigate to the 'fetch data' page
150+ Browser . Click ( By . PartialLinkText ( "Fetch data" ) ) ;
151+ Browser . WaitForUrl ( "fetch-data" ) ;
152+ Assert . Equal ( "Weather forecast" , Browser . GetText ( "h1" ) ) ;
153+
154+ // Asynchronously loads and displays the table of weather forecasts
155+ var fetchDataComponent = Browser . FindElement ( "h1" ) . Parent ( ) ;
156+ Browser . WaitForElement ( "table>tbody>tr" ) ;
157+ var table = Browser . FindElement ( fetchDataComponent , "table" , timeoutSeconds : 5 ) ;
158+ Assert . Equal ( 5 , table . FindElements ( By . CssSelector ( "tbody tr" ) ) . Count ) ;
159+ }
157160 }
158161 }
159162}
0 commit comments