-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reply keyboard feature to scenarios (#181)
* Add reply keyboard feature to scenarios * Only run tests on PRs and on main merge * Always wait in scenarios
- Loading branch information
1 parent
28a55ce
commit d9b3fa5
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ name: Go | |
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ name: Scenarios | |
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
concurrency: scenario | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Feature: Bot suggestions keyboard | ||
|
||
Scenario: Suggest last used values | ||
Given I have a bot | ||
When I send the message "/suggestions rm accFrom" | ||
And I wait 0.2 seconds | ||
And I send the message "/suggestions add accFrom fromAccount" | ||
And I wait 0.2 seconds | ||
When I send the message "1.00" | ||
Then 2 messages should be sent back | ||
And the response should include the message "Automatically created a new transaction for you" | ||
And the response should have a keyboard with the first entry being "fromAccount" | ||
When I send the message "/cancel" | ||
|
||
Scenario: Last used suggestion appears on top | ||
Given I have a bot | ||
When I send the message "/deleteAll yes" | ||
And I wait 0.2 seconds | ||
And I send the message "/suggestions rm accFrom" | ||
And I wait 0.2 seconds | ||
And I send the message "/suggestions add accFrom fromAccount" | ||
And I wait 0.2 seconds | ||
And I create a simple tx with amount 1.23 and accFrom someFromAccount and accTo someToAccount and desc Test Tx | ||
And I send the message "/list" | ||
Then 1 messages should be sent back | ||
And the response should include the message " someFromAccount -1.23 EUR" | ||
When I send the message "1.00" | ||
Then 2 messages should be sent back | ||
And the response should include the message "Automatically created a new transaction for you" | ||
And the response should have a keyboard with the first entry being "someFromAccount" | ||
When I send the message "/cancel" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters