feat: 添加测试框架及功能测试用例
test: 实现BDD测试框架及功能测试 docs: 添加测试配置文件及文档 refactor: 重构命令处理逻辑以支持测试
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
Feature: /tasks command — list background tasks
|
||||
|
||||
Background:
|
||||
Given user "user_abc123" is sending commands
|
||||
|
||||
Scenario: No tasks returns empty message
|
||||
When user sends "/tasks"
|
||||
Then reply contains "No background tasks"
|
||||
|
||||
Scenario: Shows running task with spinner emoji
|
||||
Given there is a running task "task001" described as "CC session abc: fix bug"
|
||||
When user sends "/tasks"
|
||||
Then reply contains "task001"
|
||||
And reply contains "fix bug"
|
||||
And reply contains "⏳"
|
||||
|
||||
Scenario: Shows completed task with checkmark
|
||||
Given there is a completed task "task002" described as "CC session xyz: deploy"
|
||||
When user sends "/tasks"
|
||||
Then reply contains "task002"
|
||||
And reply contains "✅"
|
||||
|
||||
Scenario: Shows failed task with cross
|
||||
Given there is a failed task "task003" described as "CC session err: bad cmd"
|
||||
When user sends "/tasks"
|
||||
Then reply contains "task003"
|
||||
And reply contains "❌"
|
||||
Reference in New Issue
Block a user