feat(nunit/mstest): serialise launch options for service (#3045)

This commit is contained in:
Max Schmitt 2024-11-11 17:58:53 +01:00 коммит произвёл GitHub
Родитель d8b42ff47a
Коммит d616e3610a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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 })
}
};