Add transcript line workflow rules
PR and Push Build/Test / build-and-test (push) Failing after 13m27s

This commit is contained in:
2026-06-03 11:24:11 +02:00
parent 50daa88389
commit 40853115c5
20 changed files with 627 additions and 70 deletions
@@ -612,6 +612,36 @@ public sealed class WorkflowRulesEditorTests
Assert.Equal("rules: []", await File.ReadAllTextAsync(rulesPath));
}
[Fact]
public async Task RulesEditorToolsRefuseTranscriptLinePropertyOutsideTranscriptLineTrigger()
{
var root = Path.Combine(Path.GetTempPath(), "meeting-assistant-tests", Guid.NewGuid().ToString("N"));
Directory.CreateDirectory(root);
var rulesPath = Path.Combine(root, "rules.yaml");
await File.WriteAllTextAsync(rulesPath, "rules: []");
var tools = new WorkflowRulesEditorTools(new MeetingAssistantOptions
{
Automation = new AutomationOptions { RulesPath = rulesPath }
});
var result = await tools.WriteRules("""
rules:
- name: broken-transcript-property
on:
- created: {}
steps:
- uses: set_property
property: transcript.line
value: redacted
""", replace_file: true);
Assert.StartsWith("Refused: workflow rules are invalid.", result);
Assert.Contains("broken-transcript-property", result);
Assert.Contains("transcript.line", result);
Assert.Contains("transcript_line", result);
Assert.Equal("rules: []", await File.ReadAllTextAsync(rulesPath));
}
[Fact]
public async Task RulesEditorToolsRefuseMalformedRazorStepValues()
{