Added additional logging

This commit is contained in:
Nikolaj Geisle
2021-10-14 14:36:58 +02:00
parent 76a8d4c474
commit 6e540de408

View File

@@ -444,7 +444,24 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.BackOffice.Controllers
body = body.TrimStart(AngularJsonMediaTypeFormatter.XsrfPrefix);
ContentItemDisplay display = JsonConvert.DeserializeObject<ContentItemDisplay>(body);
TestContext.Progress.Write($"======CURRENT THREAD CULTURE IN TEST======{Thread.CurrentThread.CurrentCulture.Name}");
var currentThreadCulture = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;
var currentUICulture = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName;
if (string.IsNullOrEmpty(currentThreadCulture))
{
TestContext.Progress.Write($"======CURRENT THREAD CULTURE IN TEST====== NO CULTURE");
}
else
{
TestContext.Progress.Write($"======CURRENT THREAD CULTURE IN TEST======{currentThreadCulture}");
}
if (string.IsNullOrEmpty(currentUICulture))
{
TestContext.Progress.Write($"======CURRENT UI CULTURE IN TEST====== NO CULTURE");
}
else
{
TestContext.Progress.Write($"======CURRENT UI CULTURE IN TEST======{currentUICulture}");
}
ILocalizedTextService localizedTextService = GetRequiredService<ILocalizedTextService>();
foreach (var culture in localizedTextService.GetSupportedCultures())
{