PhoneWork/tests/features/commands/remind.feature
Yuyao Huang (Sam) 8dab229aaf feat: 添加测试框架及功能测试用例
test: 实现BDD测试框架及功能测试
docs: 添加测试配置文件及文档
refactor: 重构命令处理逻辑以支持测试
2026-03-29 04:24:27 +08:00

34 lines
1.0 KiB
Gherkin

Feature: /remind command — schedule a one-time reminder
Background:
Given user "user_abc123" is sending commands
And the current chat_id is "chat_xyz"
Scenario: No arguments shows usage
When user sends "/remind"
Then reply contains "Usage: /remind"
Scenario: Missing message part shows usage
When user sends "/remind 10m"
Then reply contains "Usage: /remind"
Scenario: Invalid time format returns error
When user sends "/remind badtime check build"
Then reply contains "Invalid time format"
Scenario: Valid reminder with seconds is scheduled
When user sends "/remind 30s check the build"
Then reply contains "Reminder #"
And reply contains "30s"
And scheduler has 1 pending job
Scenario: Valid reminder with minutes is scheduled
When user sends "/remind 5m deploy done"
Then reply contains "5m"
And scheduler has 1 pending job
Scenario: Valid reminder with hours is scheduled
When user sends "/remind 2h weekly report"
Then reply contains "2h"
And scheduler has 1 pending job