- 新增自定义函数与表单定义绑定关系字段 FormDefinitionId - 实现按钮调用函数时的表单作用域权限校验机制 - 实现按钮提交表单时的作用域权限检查功能 - 添加自定义函数列表按表单定义筛选查询能力 - 新增 RelationPicker 关联选择表单组件支持 - 完善菜单权限体系支持受限但可见菜单配置 - 添加文件消息大小限制验证(最大200MB) - 优化表单聚合变量同步异常处理机制 - 增加BuildFlow管理后台入口菜单种子数据 - 补充相关单元测试和架构约束测试用例
55 lines
1.8 KiB
C#
55 lines
1.8 KiB
C#
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,架构测试无法确定仓库边界。");
|
||
}
|
||
}
|