Files
AutoMetabuilder/backend/autometabuilder/packages/dict_plugins_test/workflow.json
copilot-swe-agent[bot] 3175a4187f Add unit testing workflow plugins and test packages
- Created var plugin directory with get, set, delete, exists plugins
- Created test plugin directory with assert_equals, assert_true, assert_false, assert_exists, run_suite plugins
- Updated plugin_map.json to register all new plugins (90 total plugins now)
- Created 5 test packages: logic_plugins_test, math_plugins_test, string_plugins_test, list_plugins_test, dict_plugins_test
- Added comprehensive unit tests for all new plugins
- Updated documentation with test plugin information
- All tests passing (16 workflow plugin tests + 11 unit testing plugin tests)

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-10 13:53:51 +00:00

121 lines
3.9 KiB
JSON

{
"name": "Dict Plugins Test Suite",
"active": false,
"nodes": [
{
"id": "test_get",
"name": "Test Get",
"type": "dict.get",
"typeVersion": 1,
"position": [0, 0],
"parameters": {"object": {"name": "Alice", "age": 30}, "key": "name"}
},
{
"id": "assert_get",
"name": "Assert Get Value",
"type": "test.assert_equals",
"typeVersion": 1,
"position": [300, 0],
"parameters": {"actual": "$test_get.result", "expected": "Alice", "message": "dict.get should retrieve value"}
},
{
"id": "assert_get_found",
"name": "Assert Get Found",
"type": "test.assert_true",
"typeVersion": 1,
"position": [600, 0],
"parameters": {"value": "$test_get.found", "message": "dict.get should set found flag"}
},
{
"id": "test_set",
"name": "Test Set",
"type": "dict.set",
"typeVersion": 1,
"position": [0, 100],
"parameters": {"object": {"a": 1}, "key": "b", "value": 2}
},
{
"id": "test_get_new_key",
"name": "Test Get New Key",
"type": "dict.get",
"typeVersion": 1,
"position": [300, 100],
"parameters": {"object": "$test_set.result", "key": "b"}
},
{
"id": "assert_set",
"name": "Assert Set Value",
"type": "test.assert_equals",
"typeVersion": 1,
"position": [600, 100],
"parameters": {"actual": "$test_get_new_key.result", "expected": 2, "message": "dict.set should add new key"}
},
{
"id": "test_keys",
"name": "Test Keys",
"type": "dict.keys",
"typeVersion": 1,
"position": [0, 200],
"parameters": {"object": {"a": 1, "b": 2, "c": 3}}
},
{
"id": "assert_keys_length",
"name": "Assert Keys Length",
"type": "list.length",
"typeVersion": 1,
"position": [300, 200],
"parameters": {"items": "$test_keys.result"}
},
{
"id": "assert_keys",
"name": "Assert Keys Count",
"type": "test.assert_equals",
"typeVersion": 1,
"position": [600, 200],
"parameters": {"actual": "$assert_keys_length.result", "expected": 3, "message": "dict.keys should return all keys"}
},
{
"id": "test_merge",
"name": "Test Merge",
"type": "dict.merge",
"typeVersion": 1,
"position": [0, 300],
"parameters": {"objects": [{"a": 1}, {"b": 2}, {"c": 3}]}
},
{
"id": "test_merged_keys",
"name": "Get Merged Keys",
"type": "dict.keys",
"typeVersion": 1,
"position": [300, 300],
"parameters": {"object": "$test_merge.result"}
},
{
"id": "assert_merge_length",
"name": "Assert Merge Length",
"type": "list.length",
"typeVersion": 1,
"position": [600, 300],
"parameters": {"items": "$test_merged_keys.result"}
},
{
"id": "assert_merge",
"name": "Assert Merge",
"type": "test.assert_equals",
"typeVersion": 1,
"position": [900, 300],
"parameters": {"actual": "$assert_merge_length.result", "expected": 3, "message": "dict.merge should merge dicts"}
}
],
"connections": {
"Test Get": {"main": {"0": [{"node": "Assert Get Value", "type": "main", "index": 0}, {"node": "Assert Get Found", "type": "main", "index": 0}]}},
"Test Set": {"main": {"0": [{"node": "Test Get New Key", "type": "main", "index": 0}]}},
"Test Get New Key": {"main": {"0": [{"node": "Assert Set Value", "type": "main", "index": 0}]}},
"Test Keys": {"main": {"0": [{"node": "Assert Keys Length", "type": "main", "index": 0}]}},
"Assert Keys Length": {"main": {"0": [{"node": "Assert Keys Count", "type": "main", "index": 0}]}},
"Test Merge": {"main": {"0": [{"node": "Get Merged Keys", "type": "main", "index": 0}]}},
"Get Merged Keys": {"main": {"0": [{"node": "Assert Merge Length", "type": "main", "index": 0}]}},
"Assert Merge Length": {"main": {"0": [{"node": "Assert Merge", "type": "main", "index": 0}]}}
}
}