31 lines
1.0 KiB
Gherkin
31 lines
1.0 KiB
Gherkin
Feature: /switch command — activate a different session
|
|
|
|
Background:
|
|
Given user "user_abc123" is sending commands
|
|
|
|
Scenario: No sessions returns error
|
|
When user sends "/switch 1"
|
|
Then reply contains "No sessions available"
|
|
|
|
Scenario: Valid switch updates active session
|
|
Given user has session "sess01" in "/tmp/proj1"
|
|
And user has session "sess02" in "/tmp/proj2"
|
|
When user sends "/switch 2"
|
|
Then reply contains "Switched to session"
|
|
And active session for user "user_abc123" is "sess02"
|
|
|
|
Scenario: Out of range number returns error
|
|
Given user has session "sess01" in "/tmp/proj1"
|
|
When user sends "/switch 5"
|
|
Then reply contains "Invalid session number"
|
|
|
|
Scenario: Non-numeric argument returns error
|
|
Given user has session "sess01" in "/tmp/proj1"
|
|
When user sends "/switch notanumber"
|
|
Then reply contains "Invalid number"
|
|
|
|
Scenario: Missing argument shows usage
|
|
Given user has session "sess01" in "/tmp/proj1"
|
|
When user sends "/switch"
|
|
Then reply contains "Usage: /switch"
|