mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
refactor: update testing framework and restructure test configurations
- 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.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"primary": false,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -25,9 +25,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua"
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/admin_dialog/tests/metadata.params.json
Normal file
49
packages/admin_dialog/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "admin_dialog",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/admin_dialog/tests/metadata.test.json
Normal file
76
packages/admin_dialog/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "admin_dialog",
|
||||
"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": "admin_dialog"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "admin_dialog",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "admin_dialog/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": "admin_dialog/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
"dashboard": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -31,17 +31,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/arcade_lobby/tests/metadata.params.json
Normal file
49
packages/arcade_lobby/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "arcade_lobby",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/arcade_lobby/tests/metadata.test.json
Normal file
76
packages/arcade_lobby/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "arcade_lobby",
|
||||
"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": "arcade_lobby"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "arcade_lobby",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "arcade_lobby/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": "arcade_lobby/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": true,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*",
|
||||
"testing": "*",
|
||||
"package_validator": "*"
|
||||
},
|
||||
"exports": {
|
||||
@@ -30,11 +30,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua",
|
||||
"tests/stats.test.lua",
|
||||
"tests/filters.test.lua"
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/audit_log/tests/metadata.params.json
Normal file
49
packages/audit_log/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "audit_log",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/audit_log/tests/metadata.test.json
Normal file
76
packages/audit_log/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "audit_log",
|
||||
"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": "audit_log"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "audit_log",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "audit_log/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": "audit_log/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": false,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -28,19 +28,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua",
|
||||
"tests/editor.test.lua",
|
||||
"tests/theme.test.lua",
|
||||
"tests/json.test.lua",
|
||||
"tests/lua.test.lua",
|
||||
"tests/init.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/editor.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/code_editor/tests/metadata.params.json
Normal file
49
packages/code_editor/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "code_editor",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/code_editor/tests/metadata.test.json
Normal file
76
packages/code_editor/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "code_editor",
|
||||
"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": "code_editor"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "code_editor",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "code_editor/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": "code_editor/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": true,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -30,21 +30,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua",
|
||||
"package_template/tests/generator.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "package_template/tests/generator.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/codegen_studio/tests/metadata.params.json
Normal file
49
packages/codegen_studio/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "codegen_studio",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/codegen_studio/tests/metadata.test.json
Normal file
76
packages/codegen_studio/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "codegen_studio",
|
||||
"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": "codegen_studio"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "codegen_studio",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "codegen_studio/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": "codegen_studio/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": false,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -27,14 +27,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/summary.test.lua",
|
||||
"tests/aggregators.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/config.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/config_summary/tests/metadata.params.json
Normal file
49
packages/config_summary/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "config_summary",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/config_summary/tests/metadata.test.json
Normal file
76
packages/config_summary/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "config_summary",
|
||||
"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": "config_summary"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "config_summary",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "config_summary/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": "config_summary/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
"shared": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -37,17 +37,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/colors.test.lua",
|
||||
"tests/export.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/colors.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/export.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
},
|
||||
"icon": "static_content/icon.svg"
|
||||
|
||||
49
packages/css_designer/tests/metadata.params.json
Normal file
49
packages/css_designer/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "css_designer",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/css_designer/tests/metadata.test.json
Normal file
76
packages/css_designer/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
"ui_permissions": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -29,13 +29,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/stats.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/stats.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/dashboard/tests/metadata.params.json
Normal file
49
packages/dashboard/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "dashboard",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/dashboard/tests/metadata.test.json
Normal file
76
packages/dashboard/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "dashboard",
|
||||
"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": "dashboard"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "dashboard",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "dashboard/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": "dashboard/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": false,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -29,37 +29,11 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua",
|
||||
"tests/filtering.test.lua",
|
||||
"tests/sorting.test.lua",
|
||||
"tests/pagination.test.lua",
|
||||
"tests/selection.test.lua",
|
||||
"tests/export.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/filtering.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/sorting.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/pagination.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/selection.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/export.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json",
|
||||
"tests/components.test.json",
|
||||
"tests/sorting.test.json",
|
||||
"tests/pagination.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
124
packages/data_table/tests/components.test.json
Normal file
124
packages/data_table/tests/components.test.json
Normal file
@@ -0,0 +1,124 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "data_table",
|
||||
"description": "Component definition and rendering tests",
|
||||
|
||||
"testSuites": [
|
||||
{
|
||||
"id": "component-definitions",
|
||||
"name": "Component Definition Tests",
|
||||
"description": "Validate component schema and structure",
|
||||
"tags": ["components", "schema"],
|
||||
|
||||
"tests": [
|
||||
{
|
||||
"id": "test-datagrid-component-exists",
|
||||
"name": "DataGrid component should be defined",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "getComponent",
|
||||
"input": {
|
||||
"package": "data_table",
|
||||
"component": "DataGrid"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "notNull",
|
||||
"actual": "result",
|
||||
"description": "DataGrid component should exist"
|
||||
},
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.name",
|
||||
"expected": "DataGrid",
|
||||
"description": "Component name should be DataGrid"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-datagrid-required-props",
|
||||
"name": "DataGrid should have required props",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "getComponentProps",
|
||||
"input": {
|
||||
"package": "data_table",
|
||||
"component": "DataGrid"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "hasProperty",
|
||||
"actual": "result",
|
||||
"expected": "columns",
|
||||
"description": "Should have columns prop"
|
||||
},
|
||||
{
|
||||
"type": "hasProperty",
|
||||
"actual": "result",
|
||||
"expected": "data",
|
||||
"description": "Should have data prop"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "component-rendering",
|
||||
"name": "Component Rendering Tests",
|
||||
"description": "Test component rendering with various props",
|
||||
"tags": ["rendering", "integration"],
|
||||
|
||||
"tests": [
|
||||
{
|
||||
"id": "test-render-basic-table",
|
||||
"name": "should render basic data table",
|
||||
"arrange": {
|
||||
"given": "valid columns and data props",
|
||||
"fixtures": {
|
||||
"columns": [
|
||||
{ "id": "name", "label": "Name" },
|
||||
{ "id": "age", "label": "Age" }
|
||||
],
|
||||
"data": [
|
||||
{ "id": 1, "name": "John", "age": 30 },
|
||||
{ "id": 2, "name": "Jane", "age": 25 }
|
||||
]
|
||||
}
|
||||
},
|
||||
"act": {
|
||||
"when": "the component is rendered",
|
||||
"type": "function_call",
|
||||
"target": "renderComponent",
|
||||
"input": {
|
||||
"component": "DataGrid",
|
||||
"props": "{{fixtures}}"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"then": "the table should render correctly",
|
||||
"expectations": [
|
||||
{
|
||||
"type": "notNull",
|
||||
"actual": "result",
|
||||
"description": "Render output should exist"
|
||||
},
|
||||
{
|
||||
"type": "hasProperty",
|
||||
"actual": "result",
|
||||
"expected": "type",
|
||||
"description": "Should have type property"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
49
packages/data_table/tests/metadata.params.json
Normal file
49
packages/data_table/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "data_table",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/data_table/tests/metadata.test.json
Normal file
76
packages/data_table/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "data_table",
|
||||
"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": "data_table"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "data_table",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "data_table/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": "data_table/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
61
packages/data_table/tests/pagination.test.json
Normal file
61
packages/data_table/tests/pagination.test.json
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "data_table",
|
||||
"description": "Pagination functionality tests",
|
||||
|
||||
"testSuites": [
|
||||
{
|
||||
"id": "pagination-tests",
|
||||
"name": "Pagination Tests",
|
||||
"description": "Test page navigation and data slicing",
|
||||
"tags": ["pagination", "functionality"],
|
||||
|
||||
"tests": [
|
||||
{
|
||||
"id": "test-page-size",
|
||||
"name": "should respect page size setting",
|
||||
"parameterized": true,
|
||||
"parameters": [
|
||||
{
|
||||
"case": "10 items per page",
|
||||
"input": { "totalItems": 25, "pageSize": 10, "page": 1 },
|
||||
"expected": { "itemsOnPage": 10, "totalPages": 3 }
|
||||
},
|
||||
{
|
||||
"case": "5 items per page",
|
||||
"input": { "totalItems": 25, "pageSize": 5, "page": 1 },
|
||||
"expected": { "itemsOnPage": 5, "totalPages": 5 }
|
||||
},
|
||||
{
|
||||
"case": "last page partial",
|
||||
"input": { "totalItems": 25, "pageSize": 10, "page": 3 },
|
||||
"expected": { "itemsOnPage": 5, "totalPages": 3 }
|
||||
}
|
||||
],
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "pagination.changePage",
|
||||
"input": "{{input}}"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.itemsOnPage",
|
||||
"expected": "{{expected.itemsOnPage}}",
|
||||
"description": "Should show correct number of items"
|
||||
},
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.totalPages",
|
||||
"expected": "{{expected.totalPages}}",
|
||||
"description": "Should calculate correct total pages"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
34
packages/data_table/tests/sorting.params.json
Normal file
34
packages/data_table/tests/sorting.params.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "data_table",
|
||||
"description": "Test parameters for sorting functionality",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "sorting-test-params",
|
||||
"name": "Sorting Test Parameters",
|
||||
"description": "Various sorting scenarios",
|
||||
"tags": ["sorting", "parameterized"],
|
||||
"params": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"description": "Input data array"
|
||||
},
|
||||
"column": {
|
||||
"type": "string",
|
||||
"description": "Column to sort by"
|
||||
},
|
||||
"direction": {
|
||||
"type": "string",
|
||||
"enum": ["asc", "desc"],
|
||||
"description": "Sort direction"
|
||||
},
|
||||
"expected": {
|
||||
"type": "array",
|
||||
"description": "Expected sorted order (array of IDs)"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
114
packages/data_table/tests/sorting.test.json
Normal file
114
packages/data_table/tests/sorting.test.json
Normal file
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "data_table",
|
||||
"description": "Table sorting functionality tests",
|
||||
|
||||
"testSuites": [
|
||||
{
|
||||
"id": "sorting-functionality",
|
||||
"name": "Sorting Functionality Tests",
|
||||
"description": "Test column sorting in ascending and descending order",
|
||||
"tags": ["sorting", "functionality"],
|
||||
|
||||
"tests": [
|
||||
{
|
||||
"id": "test-sort-ascending",
|
||||
"name": "should sort data in ascending order",
|
||||
"parameterized": true,
|
||||
"parameters": [
|
||||
{
|
||||
"case": "sort names alphabetically",
|
||||
"input": {
|
||||
"data": [
|
||||
{ "id": 1, "name": "Charlie", "age": 30 },
|
||||
{ "id": 2, "name": "Alice", "age": 25 },
|
||||
{ "id": 3, "name": "Bob", "age": 35 }
|
||||
],
|
||||
"column": "name",
|
||||
"direction": "asc"
|
||||
},
|
||||
"expected": [2, 3, 1]
|
||||
},
|
||||
{
|
||||
"case": "sort numbers ascending",
|
||||
"input": {
|
||||
"data": [
|
||||
{ "id": 1, "name": "Alice", "age": 30 },
|
||||
{ "id": 2, "name": "Bob", "age": 25 },
|
||||
{ "id": 3, "name": "Charlie", "age": 35 }
|
||||
],
|
||||
"column": "age",
|
||||
"direction": "asc"
|
||||
},
|
||||
"expected": [2, 1, 3]
|
||||
}
|
||||
],
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "sorting.sortByColumn",
|
||||
"input": "{{input}}"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "deepEquals",
|
||||
"actual": "result.map(row => row.id)",
|
||||
"expected": "{{expected}}",
|
||||
"description": "Sorted order should match expected"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-sort-descending",
|
||||
"name": "should sort data in descending order",
|
||||
"parameterized": true,
|
||||
"parameters": [
|
||||
{
|
||||
"case": "sort names reverse alphabetically",
|
||||
"input": {
|
||||
"data": [
|
||||
{ "id": 1, "name": "Alice", "age": 25 },
|
||||
{ "id": 2, "name": "Bob", "age": 30 },
|
||||
{ "id": 3, "name": "Charlie", "age": 35 }
|
||||
],
|
||||
"column": "name",
|
||||
"direction": "desc"
|
||||
},
|
||||
"expected": [3, 2, 1]
|
||||
},
|
||||
{
|
||||
"case": "sort numbers descending",
|
||||
"input": {
|
||||
"data": [
|
||||
{ "id": 1, "name": "Alice", "age": 25 },
|
||||
{ "id": 2, "name": "Bob", "age": 30 },
|
||||
{ "id": 3, "name": "Charlie", "age": 35 }
|
||||
],
|
||||
"column": "age",
|
||||
"direction": "desc"
|
||||
},
|
||||
"expected": [3, 2, 1]
|
||||
}
|
||||
],
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "sorting.sortByColumn",
|
||||
"input": "{{input}}"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "deepEquals",
|
||||
"actual": "result.map(row => row.id)",
|
||||
"expected": "{{expected}}",
|
||||
"description": "Sorted order should match expected"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -37,21 +37,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/kv_operations.test.lua",
|
||||
"tests/cache_operations.test.lua",
|
||||
"tests/blob_operations.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/kv_operations.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/cache_operations.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/blob_operations.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
},
|
||||
"bindings": {
|
||||
|
||||
49
packages/dbal_demo/tests/metadata.params.json
Normal file
49
packages/dbal_demo/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "dbal_demo",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/dbal_demo/tests/metadata.test.json
Normal file
76
packages/dbal_demo/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "dbal_demo",
|
||||
"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": "dbal_demo"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "dbal_demo",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "dbal_demo/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": "dbal_demo/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": false,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -30,25 +30,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua",
|
||||
"tests/validate.test.lua",
|
||||
"tests/contact_form.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/validate.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/contact_form.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/form_builder/tests/metadata.params.json
Normal file
49
packages/form_builder/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "form_builder",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/form_builder/tests/metadata.test.json
Normal file
76
packages/form_builder/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "form_builder",
|
||||
"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": "form_builder"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "form_builder",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "form_builder/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": "form_builder/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -10,14 +10,20 @@
|
||||
"minLevel": 2,
|
||||
"primary": true,
|
||||
"icon": "static_content/icon.svg",
|
||||
"keywords": ["forum", "discussion", "threads", "moderation", "community"],
|
||||
"keywords": [
|
||||
"forum",
|
||||
"discussion",
|
||||
"threads",
|
||||
"moderation",
|
||||
"community"
|
||||
],
|
||||
"dependencies": {
|
||||
"ui_permissions": "^1.0.0",
|
||||
"data_table": "^1.0.0",
|
||||
"form_builder": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "^1.0.0"
|
||||
"testing": "^1.0.0"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -38,17 +44,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
|
||||
49
packages/forum_forge/tests/metadata.params.json
Normal file
49
packages/forum_forge/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "forum_forge",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/forum_forge/tests/metadata.test.json
Normal file
76
packages/forum_forge/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "forum_forge",
|
||||
"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": "forum_forge"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "forum_forge",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "forum_forge/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": "forum_forge/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -36,13 +36,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/github_tools/tests/metadata.params.json
Normal file
49
packages/github_tools/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "github_tools",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/github_tools/tests/metadata.test.json
Normal file
76
packages/github_tools/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "github_tools",
|
||||
"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": "github_tools"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "github_tools",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "github_tools/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": "github_tools/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
"author": "MetaBuilder Team",
|
||||
"license": "MIT",
|
||||
"category": "social",
|
||||
"icon": "💬",
|
||||
"icon": "\ud83d\udcac",
|
||||
"minLevel": 2,
|
||||
"primary": true,
|
||||
"tags": [
|
||||
@@ -18,7 +18,7 @@
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -37,17 +37,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
|
||||
49
packages/irc_webchat/tests/metadata.params.json
Normal file
49
packages/irc_webchat/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "irc_webchat",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/irc_webchat/tests/metadata.test.json
Normal file
76
packages/irc_webchat/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "irc_webchat",
|
||||
"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": "irc_webchat"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "irc_webchat",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "irc_webchat/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": "irc_webchat/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": false,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
|
||||
49
packages/json_script_example/tests/metadata.params.json
Normal file
49
packages/json_script_example/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "json_script_example",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/json_script_example/tests/metadata.test.json
Normal file
76
packages/json_script_example/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "json_script_example",
|
||||
"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": "json_script_example"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "json_script_example",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "json_script_example/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": "json_script_example/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -26,7 +26,7 @@
|
||||
"data_table": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -110,14 +110,8 @@
|
||||
}
|
||||
],
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/media_api.test.lua",
|
||||
"tests/job_helpers.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/media.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/media_center/tests/metadata.params.json
Normal file
49
packages/media_center/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "media_center",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/media_center/tests/metadata.test.json
Normal file
76
packages/media_center/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "media_center",
|
||||
"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": "media_center"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "media_center",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "media_center/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": "media_center/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
"ui_permissions": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -28,17 +28,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/nav_menu/tests/metadata.params.json
Normal file
49
packages/nav_menu/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "nav_menu",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/nav_menu/tests/metadata.test.json
Normal file
76
packages/nav_menu/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "nav_menu",
|
||||
"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": "nav_menu"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "nav_menu",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "nav_menu/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": "nav_menu/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": false,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -28,17 +28,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/notification_center/tests/metadata.params.json
Normal file
49
packages/notification_center/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "notification_center",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/notification_center/tests/metadata.test.json
Normal file
76
packages/notification_center/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "notification_center",
|
||||
"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": "notification_center"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "notification_center",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "notification_center/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": "notification_center/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,29 +12,46 @@
|
||||
"primary": true,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"externalDependencies": {
|
||||
"fs": {
|
||||
"description": "File system operations for reading package files",
|
||||
"required": true,
|
||||
"functions": ["readFile", "existsSync", "readdir", "statSync"]
|
||||
"functions": [
|
||||
"readFile",
|
||||
"existsSync",
|
||||
"readdir",
|
||||
"statSync"
|
||||
]
|
||||
},
|
||||
"path": {
|
||||
"description": "Path manipulation utilities",
|
||||
"required": true,
|
||||
"functions": ["join", "resolve", "basename", "dirname", "extname"]
|
||||
"functions": [
|
||||
"join",
|
||||
"resolve",
|
||||
"basename",
|
||||
"dirname",
|
||||
"extname"
|
||||
]
|
||||
},
|
||||
"JSON": {
|
||||
"description": "JSON parsing and validation",
|
||||
"required": true,
|
||||
"functions": ["parse", "stringify"]
|
||||
"functions": [
|
||||
"parse",
|
||||
"stringify"
|
||||
]
|
||||
},
|
||||
"ajv": {
|
||||
"description": "JSON Schema validator (Another JSON Schema Validator)",
|
||||
"required": false,
|
||||
"version": "^8.0.0",
|
||||
"functions": ["compile", "validate"]
|
||||
"functions": [
|
||||
"compile",
|
||||
"validate"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
@@ -59,11 +76,14 @@
|
||||
]
|
||||
},
|
||||
"runtime": {
|
||||
"scripts": ["scripts/validator.lua"],
|
||||
"scripts": [
|
||||
"scripts/validator.lua"
|
||||
],
|
||||
"main": "scripts/init.lua"
|
||||
},
|
||||
"tests": {
|
||||
"scripts": ["tests/validator.test.lua"],
|
||||
"parameterized": []
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/package_validator/tests/metadata.params.json
Normal file
49
packages/package_validator/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "package_validator",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/package_validator/tests/metadata.test.json
Normal file
76
packages/package_validator/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "package_validator",
|
||||
"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": "package_validator"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "package_validator",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "package_validator/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": "package_validator/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": true,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -27,13 +27,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/quick_guide/tests/metadata.params.json
Normal file
49
packages/quick_guide/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "quick_guide",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/quick_guide/tests/metadata.test.json
Normal file
76
packages/quick_guide/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "quick_guide",
|
||||
"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": "quick_guide"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "quick_guide",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "quick_guide/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": "quick_guide/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
"ui_permissions": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -27,17 +27,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/role.test.lua",
|
||||
"tests/config.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/role.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/config.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/role_editor/tests/metadata.params.json
Normal file
49
packages/role_editor/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "role_editor",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/role_editor/tests/metadata.test.json
Normal file
76
packages/role_editor/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "role_editor",
|
||||
"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": "role_editor"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "role_editor",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "role_editor/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": "role_editor/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
"form_builder": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -29,25 +29,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua",
|
||||
"tests/field_definitions.test.lua",
|
||||
"tests/table_operations.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/field_definitions.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/table_operations.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/schema_editor/tests/metadata.params.json
Normal file
49
packages/schema_editor/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "schema_editor",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/schema_editor/tests/metadata.test.json
Normal file
76
packages/schema_editor/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "schema_editor",
|
||||
"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": "schema_editor"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "schema_editor",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "schema_editor/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": "schema_editor/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -34,17 +34,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
},
|
||||
"bindings": {
|
||||
|
||||
49
packages/screenshot_analyzer/tests/metadata.params.json
Normal file
49
packages/screenshot_analyzer/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "screenshot_analyzer",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/screenshot_analyzer/tests/metadata.test.json
Normal file
76
packages/screenshot_analyzer/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "screenshot_analyzer",
|
||||
"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": "screenshot_analyzer"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "screenshot_analyzer",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "screenshot_analyzer/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": "screenshot_analyzer/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": true,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -25,17 +25,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/smtp.test.lua",
|
||||
"tests/validate.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/smtp.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/validate.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/smtp_config/tests/metadata.params.json
Normal file
49
packages/smtp_config/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "smtp_config",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/smtp_config/tests/metadata.test.json
Normal file
76
packages/smtp_config/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "smtp_config",
|
||||
"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": "smtp_config"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "smtp_config",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "smtp_config/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": "smtp_config/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
"form_builder": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -33,17 +33,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/social_hub/tests/metadata.params.json
Normal file
49
packages/social_hub/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "social_hub",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/social_hub/tests/metadata.test.json
Normal file
76
packages/social_hub/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "social_hub",
|
||||
"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": "social_hub"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "social_hub",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "social_hub/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": "social_hub/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
"dashboard": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -29,17 +29,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/stats.test.lua",
|
||||
"tests/formatters.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/stats.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/formatters.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/stats_grid/tests/metadata.params.json
Normal file
49
packages/stats_grid/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "stats_grid",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/stats_grid/tests/metadata.test.json
Normal file
76
packages/stats_grid/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "stats_grid",
|
||||
"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": "stats_grid"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "stats_grid",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "stats_grid/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": "stats_grid/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
"dashboard": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -32,17 +32,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
|
||||
49
packages/stream_cast/tests/metadata.params.json
Normal file
49
packages/stream_cast/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "stream_cast",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/stream_cast/tests/metadata.test.json
Normal file
76
packages/stream_cast/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "stream_cast",
|
||||
"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": "stream_cast"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "stream_cast",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "stream_cast/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": "stream_cast/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/package-metadata.schema.json",
|
||||
"packageId": "lua_test",
|
||||
"name": "Lua Test",
|
||||
"version": "1.0.0",
|
||||
"description": "Unit testing framework for Lua scripts in MetaBuilder packages",
|
||||
"packageId": "testing",
|
||||
"name": "Testing Framework",
|
||||
"version": "2.0.0",
|
||||
"description": "JSON-based testing framework for MetaBuilder packages with parameterized tests, mocks, and assertions",
|
||||
"author": "MetaBuilder",
|
||||
"license": "MIT",
|
||||
"category": "tools",
|
||||
@@ -12,11 +12,12 @@
|
||||
"icon": "static_content/icon.svg",
|
||||
"keywords": [
|
||||
"testing",
|
||||
"lua",
|
||||
"json",
|
||||
"unit-test",
|
||||
"framework",
|
||||
"assertions",
|
||||
"mocks"
|
||||
"mocks",
|
||||
"parameterized"
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
|
Before Width: | Height: | Size: 490 B After Width: | Height: | Size: 490 B |
@@ -14,7 +14,7 @@
|
||||
"ui_permissions": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -28,22 +28,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua",
|
||||
"tests/gate.check.test.lua",
|
||||
"tests/gate.wrap.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/gate.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/ui_auth/tests/metadata.params.json
Normal file
49
packages/ui_auth/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "ui_auth",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/ui_auth/tests/metadata.test.json
Normal file
76
packages/ui_auth/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "ui_auth",
|
||||
"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": "ui_auth"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "ui_auth",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "ui_auth/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": "ui_auth/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": false,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -26,17 +26,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/ui_dialogs/tests/metadata.params.json
Normal file
49
packages/ui_dialogs/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "ui_dialogs",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
76
packages/ui_dialogs/tests/metadata.test.json
Normal file
76
packages/ui_dialogs/tests/metadata.test.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "ui_dialogs",
|
||||
"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": "ui_dialogs"
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "equals",
|
||||
"actual": "result.packageId",
|
||||
"expected": "ui_dialogs",
|
||||
"description": "Package ID should match"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test-icon-exists",
|
||||
"name": "should have an icon file",
|
||||
"act": {
|
||||
"type": "function_call",
|
||||
"target": "checkFileExists",
|
||||
"input": "ui_dialogs/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": "ui_dialogs/package.json",
|
||||
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
||||
}
|
||||
},
|
||||
"assert": {
|
||||
"expectations": [
|
||||
{
|
||||
"type": "truthy",
|
||||
"actual": "result.valid",
|
||||
"description": "package.json should be valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"primary": false,
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"lua_test": "*"
|
||||
"testing": "*"
|
||||
},
|
||||
"exports": {
|
||||
"components": [
|
||||
@@ -24,17 +24,8 @@
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"scripts": [
|
||||
"tests/metadata.test.lua",
|
||||
"tests/components.test.lua"
|
||||
],
|
||||
"parameterized": [
|
||||
{
|
||||
"parameters": "tests/metadata.cases.json"
|
||||
},
|
||||
{
|
||||
"parameters": "tests/components.cases.json"
|
||||
}
|
||||
"suites": [
|
||||
"tests/metadata.test.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/ui_footer/tests/metadata.params.json
Normal file
49
packages/ui_footer/tests/metadata.params.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "https://metabuilder.dev/schemas/test-parameters.schema.json",
|
||||
"schemaVersion": "2.0.0",
|
||||
"package": "ui_footer",
|
||||
"description": "Test parameters for metadata validation",
|
||||
|
||||
"parameters": [
|
||||
{
|
||||
"id": "package-id-params",
|
||||
"name": "Package ID Test Parameters",
|
||||
"description": "Parameters for testing package ID validation",
|
||||
"tags": ["metadata", "validation"],
|
||||
"params": {
|
||||
"packageId": {
|
||||
"type": "string",
|
||||
"description": "Expected package ID"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "icon-file-params",
|
||||
"name": "Icon File Test Parameters",
|
||||
"description": "Parameters for testing icon file existence",
|
||||
"tags": ["metadata", "assets"],
|
||||
"params": {
|
||||
"iconPath": {
|
||||
"type": "string",
|
||||
"description": "Path to icon file relative to packages directory"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "schema-validation-params",
|
||||
"name": "Schema Validation Test Parameters",
|
||||
"description": "Parameters for JSON schema validation",
|
||||
"tags": ["metadata", "schema"],
|
||||
"params": {
|
||||
"filePath": {
|
||||
"type": "string",
|
||||
"description": "Path to file to validate"
|
||||
},
|
||||
"schemaUrl": {
|
||||
"type": "string",
|
||||
"description": "URL of JSON schema to validate against"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user