- 新增自定义函数与表单定义绑定关系字段 FormDefinitionId - 实现按钮调用函数时的表单作用域权限校验机制 - 实现按钮提交表单时的作用域权限检查功能 - 添加自定义函数列表按表单定义筛选查询能力 - 新增 RelationPicker 关联选择表单组件支持 - 完善菜单权限体系支持受限但可见菜单配置 - 添加文件消息大小限制验证(最大200MB) - 优化表单聚合变量同步异常处理机制 - 增加BuildFlow管理后台入口菜单种子数据 - 补充相关单元测试和架构约束测试用例
50 lines
1.4 KiB
C#
50 lines
1.4 KiB
C#
namespace BuildFlow.Architecture.Tests;
|
||
|
||
using Xunit;
|
||
|
||
/// <summary>
|
||
/// BuildFlow 表单组件种子约束。保证干净库可创建前端设计器内置的运行时字段。
|
||
/// </summary>
|
||
public class BuildFlowFormComponentSeedTests
|
||
{
|
||
[Fact]
|
||
public void WorkflowSeedDataShouldContainRelationPickerComponent()
|
||
{
|
||
var seedData = ReadWorkflowSeedData();
|
||
|
||
Assert.Contains("RelationPicker", seedData, StringComparison.Ordinal);
|
||
Assert.Contains("\"x-field-kind\":\"relation\"", seedData, StringComparison.Ordinal);
|
||
}
|
||
|
||
private static string ReadWorkflowSeedData()
|
||
{
|
||
var repoRoot = FindRepoRoot();
|
||
var seedPath = Path.Combine(
|
||
repoRoot.FullName,
|
||
"src",
|
||
"modules",
|
||
"workflow",
|
||
"Infrastructure",
|
||
"Persistence",
|
||
"SeedData.cs");
|
||
|
||
return File.ReadAllText(seedPath);
|
||
}
|
||
|
||
private static DirectoryInfo FindRepoRoot()
|
||
{
|
||
var current = new DirectoryInfo(AppContext.BaseDirectory);
|
||
while (current is not null)
|
||
{
|
||
if (File.Exists(Path.Combine(current.FullName, "BuildFlow.slnx")))
|
||
{
|
||
return current;
|
||
}
|
||
|
||
current = current.Parent;
|
||
}
|
||
|
||
throw new InvalidOperationException("无法定位 BuildFlow.slnx,架构测试无法确定仓库边界。");
|
||
}
|
||
}
|