mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-31 11:54:24 +01:00
Catch errors in AssertNoErrors
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Tests.Logging;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using OpenQA.Selenium;
|
||||
using Xunit;
|
||||
@@ -19,15 +20,21 @@ namespace BTCPayServer.Tests
|
||||
catch
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.AppendLine();
|
||||
foreach (var logKind in new []{ LogType.Browser, LogType.Client, LogType.Driver })
|
||||
{
|
||||
builder.AppendLine($"Selenium [{logKind}]:");
|
||||
foreach (var entry in driver.Manage().Logs.GetLog(logKind))
|
||||
try
|
||||
{
|
||||
builder.AppendLine($"[{entry.Level}]: {entry.Message}");
|
||||
builder.AppendLine($"Selenium [{logKind}]:");
|
||||
foreach (var entry in driver.Manage().Logs.GetLog(logKind))
|
||||
{
|
||||
builder.AppendLine($"[{entry.Level}]: {entry.Message}");
|
||||
}
|
||||
builder.AppendLine($"---------");
|
||||
}
|
||||
builder.AppendLine($"---------");
|
||||
catch { }
|
||||
}
|
||||
Logs.Tester.LogInformation(builder.ToString());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user