feat(nunit/mstest): serialise launch options for service (#3045)
This commit is contained in:
Родитель
d8b42ff47a
Коммит
d616e3610a
|
@ -25,6 +25,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Playwright.TestAdapter;
|
||||
|
||||
|
@ -70,7 +72,8 @@ internal class BrowserService : IWorkerService
|
|||
ExposeNetwork = exposeNetwork,
|
||||
Headers = new Dictionary<string, string>
|
||||
{
|
||||
["Authorization"] = $"Bearer {accessToken}"
|
||||
["Authorization"] = $"Bearer {accessToken}",
|
||||
["x-playwright-launch-options"] = JsonSerializer.Serialize(PlaywrightSettingsProvider.LaunchOptions, new JsonSerializerOptions() { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull })
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Playwright.TestAdapter;
|
||||
|
||||
|
@ -65,7 +67,8 @@ internal class BrowserService : IWorkerService
|
|||
ExposeNetwork = exposeNetwork,
|
||||
Headers = new Dictionary<string, string>
|
||||
{
|
||||
["Authorization"] = $"Bearer {accessToken}"
|
||||
["Authorization"] = $"Bearer {accessToken}",
|
||||
["x-playwright-launch-options"] = JsonSerializer.Serialize(PlaywrightSettingsProvider.LaunchOptions, new JsonSerializerOptions() { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull })
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче