test(playwright): CliRunner AddAlarm + alarm-override-delete helpers + round-trip (typed flags)
This commit is contained in:
+19
@@ -188,4 +188,23 @@ public class CliRunnerHelpersTests
|
||||
}
|
||||
finally { await CliRunner.DeleteRoleMappingAsync(id); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Exercises the typed HiLo setpoint flags end-to-end: a template alarm added via
|
||||
/// <see cref="CliRunner.AddAlarmAsync"/> with <c>--hi</c>/<c>--hihi</c> returns a
|
||||
/// positive id, confirming the server accepted the serialized trigger-config JSON.
|
||||
/// </summary>
|
||||
[SkippableFact]
|
||||
public async Task AddAlarmWithTypedFlags_RoundTrips()
|
||||
{
|
||||
Skip.IfNot(await ClusterAvailability.IsAvailableAsync(), ClusterAvailability.SkipReason);
|
||||
var id = await CliRunner.CreateTemplateAsync(CliRunner.UniqueName("tmpl"));
|
||||
try
|
||||
{
|
||||
await CliRunner.AddAttributeAsync(id, "Value", "Double");
|
||||
var alarmId = await CliRunner.AddAlarmAsync(id, "HiHi", "HiLo", 500, attribute: "Value", hi: 80, hiHi: 95);
|
||||
Assert.True(alarmId > 0); // server accepted the serialized trigger-config JSON
|
||||
}
|
||||
finally { await CliRunner.DeleteTemplateAsync(id); }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user