34 lines
1.0 KiB
Gherkin
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
|