- Core infrastructure: config, state management, models - REST API server (aiohttp) with Discord-compatible endpoints - WebSocket Gateway server (websockets) with Discord Gateway protocol - State management with guilds, channels, users, messages, interactions - Pydantic models for Discord objects (User, Guild, Channel, Message, etc.) - CLI with start, test, reset, export, validate commands - YAML-based test scenario framework - Basic test scenario for /server_status command flow - Unit tests for models and state manager (19 passing) - GPL-3.0 license
82 lines
1.7 KiB
YAML
82 lines
1.7 KiB
YAML
# Basic Test Scenario
|
|
# Tests the /server_status command flow: dropdown -> button click
|
|
|
|
name: "Basic Server Status Test"
|
|
description: "Test /server_status command and button interactions"
|
|
|
|
# Guild setup
|
|
guilds:
|
|
- id: "123456789012345678"
|
|
name: "Test Guild"
|
|
owner_id: "111111111111111111"
|
|
channels:
|
|
- "111111111111111111"
|
|
roles:
|
|
- "222222222222222222"
|
|
|
|
# Channels
|
|
channels:
|
|
- id: "111111111111111111"
|
|
guild_id: "123456789012345678"
|
|
name: "general"
|
|
type: 0 # GUILD_TEXT
|
|
position: 0
|
|
|
|
# Roles
|
|
roles:
|
|
- id: "222222222222222222"
|
|
guild_id: "123456789012345678"
|
|
name: "Game Server User"
|
|
color: 3447003
|
|
hoist: true
|
|
position: 1
|
|
permissions: "104324161"
|
|
managed: false
|
|
mentionable: true
|
|
|
|
# Users
|
|
users:
|
|
- id: "333333333333333333"
|
|
username: "TestUser"
|
|
discriminator: "1234"
|
|
bot: false
|
|
guild_roles:
|
|
"123456789012345678":
|
|
- "222222222222222222"
|
|
|
|
# Bot
|
|
bot:
|
|
id: "444444444444444444"
|
|
username: "TestBot"
|
|
discriminator: "0000"
|
|
token: "test_token_123"
|
|
|
|
# Test steps
|
|
steps:
|
|
- action: "slash_command"
|
|
command: "server_status"
|
|
user: "333333333333333333"
|
|
guild: "123456789012345678"
|
|
channel: "111111111111111111"
|
|
expect:
|
|
type: "interaction_response"
|
|
data:
|
|
type: 4 # CHANNEL_MESSAGE_WITH_SOURCE
|
|
components: true
|
|
|
|
- action: "select_menu"
|
|
custom_id: "server_dropdown"
|
|
values: ["server_1"]
|
|
user: "333333333333333333"
|
|
expect:
|
|
type: "message_create"
|
|
channel: "111111111111111111"
|
|
components: true
|
|
|
|
- action: "button_click"
|
|
custom_id: "start_button"
|
|
user: "333333333333333333"
|
|
expect:
|
|
type: "interaction_response"
|
|
data:
|
|
content_contains: "starting" |