feat(central-ui): MES badge on live alarm rows and template native-source list (ScadaBridge#102 item 3)
Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
@@ -56,4 +56,24 @@ public class AlarmStateBadgesTests : BunitContext
|
||||
// HiLo level badge label.
|
||||
Assert.Contains("Hi", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Gitea #102: a MES-reportable alarm shows the MES badge.</summary>
|
||||
[Fact]
|
||||
public void MesReportableAlarm_RendersMesBadge()
|
||||
{
|
||||
var alarm = ActiveNativeHighUnacked() with { IsMesReportable = true };
|
||||
|
||||
var cut = Render<AlarmStateBadges>(p => p.Add(c => c.Alarm, alarm));
|
||||
|
||||
Assert.Equal("MES", cut.Find("[data-test='alarm-mes-badge']").TextContent);
|
||||
}
|
||||
|
||||
/// <summary>Gitea #102: a non-reportable alarm shows no MES badge.</summary>
|
||||
[Fact]
|
||||
public void NonMesReportableAlarm_RendersNoMesBadge()
|
||||
{
|
||||
var cut = Render<AlarmStateBadges>(p => p.Add(c => c.Alarm, ActiveNativeHighUnacked()));
|
||||
|
||||
Assert.Empty(cut.FindAll("[data-test='alarm-mes-badge']"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user