mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
- Changed devDependencies from "lua_test" to "testing" in package.json for ui_level4, ui_level5, ui_level6, ui_login, ui_pages, ui_permissions, user_manager, and workflow_editor. - Removed legacy test scripts and parameterized tests, replacing them with a unified test suite structure in the tests section of package.json. - Introduced new metadata.params.json files for each package to define test parameters for package ID validation, icon file existence, and JSON schema validation. - Created new metadata.test.json files for each package to define structured test cases for validating package metadata, including checks for package ID, icon file existence, and schema validity.
77 lines
2.1 KiB
JSON
77 lines
2.1 KiB
JSON
{
|
|
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
|
"schemaVersion": "2.0.0",
|
|
"package": "css_designer",
|
|
"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": "css_designer"
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "equals",
|
|
"actual": "result.packageId",
|
|
"expected": "css_designer",
|
|
"description": "Package ID should match"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "test-icon-exists",
|
|
"name": "should have an icon file",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "checkFileExists",
|
|
"input": "css_designer/static_content/icon.svg"
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "truthy",
|
|
"actual": "result",
|
|
"description": "Icon file should exist"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "test-schema-valid",
|
|
"name": "package.json should be valid against schema",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "validateAgainstSchema",
|
|
"input": {
|
|
"file": "css_designer/package.json",
|
|
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
|
}
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "truthy",
|
|
"actual": "result.valid",
|
|
"description": "package.json should be valid"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|