Associate ScadaBridge controls, guidance and editor errors
This commit is contained in:
@@ -15,6 +15,17 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Shared;
|
||||
/// </summary>
|
||||
public class MonacoEditorLoggingTests : BunitContext
|
||||
{
|
||||
/// <summary>Editor creation supplies a real editor accessibility name.</summary>
|
||||
[Fact]
|
||||
public void CreateEditor_SuppliesAccessibleName()
|
||||
{
|
||||
Services.AddLogging();
|
||||
JSInterop.Mode = JSRuntimeMode.Loose;
|
||||
Render<MonacoEditor>();
|
||||
var options = JSInterop.Invocations.Single(x => x.Identifier == "MonacoBlazor.createEditor").Arguments[2]!;
|
||||
Assert.Equal("Code editor", options.GetType().GetProperty("ariaLabel")?.GetValue(options));
|
||||
}
|
||||
|
||||
/// <summary>Captures log entries so the test can assert on them.</summary>
|
||||
private sealed class CapturingLoggerProvider : ILoggerProvider
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user