Files
metabuilder/packages/irc_webchat/seed/scripts/tests/chat.cases.json
2025-12-30 13:09:18 +00:00

41 lines
2.0 KiB
JSON

{
"handle_command": {
"help_command": [
{ "command": "/help", "expected_contains": "Available commands", "desc": "Help shows commands" },
{ "command": "/HELP", "expected_contains": "Available commands", "desc": "Help is case insensitive" }
],
"users_command": [
{ "command": "/users", "users": ["Alice", "Bob"], "expected_contains": "Alice, Bob", "desc": "Lists online users" },
{ "command": "/users", "users": [], "expected_contains": "Online users (0)", "desc": "Empty user list" }
],
"clear_command": [
{ "command": "/clear", "expected_type": "command", "expected_message": "CLEAR_MESSAGES", "desc": "Clear returns command type" }
],
"me_command": [
{ "command": "/me waves", "username": "TestUser", "expected_contains": "waves", "desc": "Me action with text" },
{ "command": "/me", "expected_contains": "Usage:", "desc": "Me without action shows usage" }
],
"unknown_command": [
{ "command": "/invalid", "expected_contains": "Unknown command", "desc": "Unknown command error" },
{ "command": "/test123", "expected_contains": "Type /help", "desc": "Suggests help for unknown" }
]
},
"format_time": [
{ "timestamp": 0, "expected_format": "HH:MM", "desc": "Epoch timestamp" },
{ "timestamp": 1609459200000, "expected_contains": ":", "desc": "Valid timestamp formats" },
{ "timestamp": 1609502400000, "expected_contains": ":", "desc": "Afternoon timestamp" }
],
"send_message": [
{ "channelId": "ch1", "username": "Alice", "userId": "u1", "message": "Hello", "desc": "Basic message creation" },
{ "channelId": "general", "username": "Bot", "userId": "bot1", "message": "System alert", "desc": "System message" }
],
"user_events": {
"join": [
{ "username": "Alice", "channelId": "ch1", "expected_type": "join", "desc": "User join event" }
],
"leave": [
{ "username": "Bob", "channelId": "ch1", "expected_type": "leave", "desc": "User leave event" }
]
}
}