mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 14:25:02 +00:00
- Added `package_system.tla` to model the schema-driven package system, including multi-source loading, validation, dependency resolution, and permission filtering. - Created `package_system.cfg` for TLC model checker configuration, defining constants and invariants for bounded model checking. - Updated `metabuilder.tla` to reflect the core specification of MetaBuilder, emphasizing the package lifecycle and related specifications.
115 lines
3.2 KiB
JSON
115 lines
3.2 KiB
JSON
{
|
|
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
|
"schemaVersion": "2.0.0",
|
|
"package": "dropdown_manager",
|
|
"description": "Package metadata validation tests",
|
|
|
|
"testSuites": [
|
|
{
|
|
"id": "package-metadata",
|
|
"name": "Package Metadata Tests",
|
|
"description": "Validate package.json metadata structure and values",
|
|
"tags": ["metadata", "validation"],
|
|
|
|
"tests": [
|
|
{
|
|
"id": "test-package-id",
|
|
"name": "should have correct packageId",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "getPackageMetadata",
|
|
"input": "dropdown_manager"
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "equals",
|
|
"actual": "result.packageId",
|
|
"expected": "dropdown_manager",
|
|
"description": "Package ID should match"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "test-min-level",
|
|
"name": "should require Admin level",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "getPackageMetadata",
|
|
"input": "dropdown_manager"
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "equals",
|
|
"actual": "result.minLevel",
|
|
"expected": 4,
|
|
"description": "minLevel should be 4 (Admin)"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "test-icon-exists",
|
|
"name": "should have an icon file",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "checkFileExists",
|
|
"input": "dropdown_manager/static_content/icon.svg"
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "truthy",
|
|
"actual": "result",
|
|
"description": "Icon file should exist"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "test-category",
|
|
"name": "should be in managers category",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "getPackageMetadata",
|
|
"input": "dropdown_manager"
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "equals",
|
|
"actual": "result.category",
|
|
"expected": "managers",
|
|
"description": "Category should be managers"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "test-schema-valid",
|
|
"name": "package.json should be valid against schema",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "validateAgainstSchema",
|
|
"input": {
|
|
"file": "dropdown_manager/package.json",
|
|
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
|
}
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "truthy",
|
|
"actual": "result.valid",
|
|
"description": "package.json should be valid"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|