xiangning baaff8db63 feat(workflow): 添加自定义函数表单绑定及权限控制功能
- 新增自定义函数与表单定义绑定关系字段 FormDefinitionId
- 实现按钮调用函数时的表单作用域权限校验机制
- 实现按钮提交表单时的作用域权限检查功能
- 添加自定义函数列表按表单定义筛选查询能力
- 新增 RelationPicker 关联选择表单组件支持
- 完善菜单权限体系支持受限但可见菜单配置
- 添加文件消息大小限制验证(最大200MB)
- 优化表单聚合变量同步异常处理机制
- 增加BuildFlow管理后台入口菜单种子数据
- 补充相关单元测试和架构约束测试用例
2026-07-05 09:30:45 +08:00

55 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace BuildFlow.Architecture.Tests;
using Xunit;
/// <summary>
/// BuildFlow 低代码后台入口种子约束。保证干净库自动具备表单、按钮、函数管理菜单。
/// </summary>
public class BuildFlowEntrySeedTests
{
[Fact]
public void PlatformSeedDataShouldContainBuildFlowMetadataMenus()
{
var seedData = ReadPlatformSeedData();
Assert.Contains("\"buildflow\"", seedData, StringComparison.Ordinal);
Assert.Contains("\"buildflow.forms\"", seedData, StringComparison.Ordinal);
Assert.Contains("\"/buildflow/forms/index\"", seedData, StringComparison.Ordinal);
Assert.Contains("\"buildflow.buttons\"", seedData, StringComparison.Ordinal);
Assert.Contains("\"/buildflow/buttons/index\"", seedData, StringComparison.Ordinal);
Assert.Contains("\"buildflow.functions\"", seedData, StringComparison.Ordinal);
Assert.Contains("\"/buildflow/custom-functions/index\"", seedData, StringComparison.Ordinal);
}
private static string ReadPlatformSeedData()
{
var repoRoot = FindRepoRoot();
var seedPath = Path.Combine(
repoRoot.FullName,
"src",
"modules",
"platform",
"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,架构测试无法确定仓库边界。");
}
}