Public Access
Add transcript line workflow rules
PR and Push Build/Test / build-and-test (push) Failing after 13m27s
PR and Push Build/Test / build-and-test (push) Failing after 13m27s
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user