@@ -223,7 +223,7 @@ test('should be able to parse BrowserName and LaunchOptions.Headless from runset
223223 expect ( result . stdout ) . not . toContain ( "Headless" )
224224} ) ;
225225
226- test ( 'should be able to parse LaunchOptions.Proxy from runsettings' , async ( { runTest, proxyServer } ) => {
226+ test ( 'should be able to parse LaunchOptions.Proxy from runsettings' , async ( { runTest, proxyServer, server } ) => {
227227 const result = await runTest ( {
228228 'ExampleTests.cs' : `
229229 using System;
@@ -240,7 +240,7 @@ test('should be able to parse LaunchOptions.Proxy from runsettings', async ({ ru
240240 public async Task Test()
241241 {
242242 Console.WriteLine("User-Agent: " + await Page.EvaluateAsync<string>("() => navigator.userAgent"));
243- await Page.GotoAsync("http://example.com ");
243+ await Page.GotoAsync("${ server . EMPTY_PAGE } ");
244244 }
245245 }` ,
246246 '.runsettings' : `
@@ -266,8 +266,8 @@ test('should be able to parse LaunchOptions.Proxy from runsettings', async ({ ru
266266
267267 expect ( result . stdout ) . not . toContain ( "Headless" ) ;
268268
269- const { url, auth } = proxyServer . requests . find ( r => r . url === 'http://example.com/' ) ! ; ;
270- expect ( url ) . toBe ( 'http://example.com/' ) ;
269+ const { url, auth } = proxyServer . requests . find ( r => r . url === server . EMPTY_PAGE ) ! ;
270+ expect ( url ) . toBe ( server . EMPTY_PAGE ) ;
271271 expect ( auth ) . toBe ( 'user:pwd' ) ;
272272} ) ;
273273
@@ -307,7 +307,7 @@ test('should be able to parse LaunchOptions.Args from runsettings', async ({ run
307307 expect ( result . stdout ) . toContain ( "User-Agent: hello" )
308308} ) ;
309309
310- test ( 'should be able to override context options' , async ( { runTest } ) => {
310+ test ( 'should be able to override context options' , async ( { runTest, server } ) => {
311311 const result = await runTest ( {
312312 'ExampleTests.cs' : `
313313 using System;
@@ -335,7 +335,7 @@ test('should be able to override context options', async ({ runTest }) => {
335335
336336 Assert.AreEqual("Foobar", await Page.EvaluateAsync<string>("() => navigator.userAgent"));
337337
338- var response = await Page.GotoAsync("https://example.com/ ");
338+ var response = await Page.GotoAsync("${ server . EMPTY_PAGE } ");
339339 Assert.AreEqual(await response.Request.HeaderValueAsync("Kekstar"), "KekStarValue");
340340 }
341341
0 commit comments