-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENG-1293: Add tests to verify that link to
pattern_human_handoff
is…
… triggered in relevant conditions On these conditions: 1. When `pattern_clarification` is triggered twice 2. Or when login fails during check-portfolio at least 3 times
- Loading branch information
1 parent
4ecfbcd
commit abda9f2
Showing
2 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
..._with_assertions/passing/flow_guards/user_is_referred_to_human_after_2_clarifications.yml
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,46 @@ | ||
fixtures: | ||
- route_to_calm: | ||
- route_session_to_calm: True | ||
|
||
metadata: | ||
- duplicate_message_1: | ||
turn_idx: 1 | ||
- duplicate_message_2: | ||
turn_idx: 2 | ||
- duplicate_message_3: | ||
turn_idx: 3 | ||
|
||
test_cases: | ||
- test_case: user_is_referred_to_human_after_2_clarifications | ||
fixtures: | ||
- route_to_calm | ||
steps: | ||
- user: cash | ||
metadata: duplicate_message_1 | ||
assertions: | ||
- pattern_clarification_contains: | ||
- 'transfer money' | ||
- 'check your balance' | ||
- slot_was_set: | ||
- name: clarification_count | ||
value: 1 | ||
- bot_uttered: | ||
utter_name: utter_clarification_options_rasa | ||
- user: cash | ||
metadata: duplicate_message_2 | ||
assertions: | ||
- pattern_clarification_contains: | ||
- 'transfer money' | ||
- 'check your balance' | ||
- slot_was_set: | ||
- name: clarification_count | ||
value: 2 | ||
- bot_uttered: | ||
utter_name: utter_clarification_options_rasa | ||
- user: cash | ||
metadata: duplicate_message_3 | ||
assertions: | ||
- slot_was_set: | ||
- name: clarification_count | ||
value: 3 | ||
- flow_started: pattern_human_handoff |
63 changes: 63 additions & 0 deletions
63
...ions/passing/flow_guards/user_is_referred_to_human_after_3_portfolio_check_auth_fails.yml
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,63 @@ | ||
fixtures: | ||
- route_to_calm: | ||
- route_session_to_calm: True | ||
|
||
metadata: | ||
- duplicate_message_1: | ||
turn_idx: 1 | ||
- duplicate_message_2: | ||
turn_idx: 2 | ||
- duplicate_message_3: | ||
turn_idx: 3 | ||
|
||
test_cases: | ||
- test_case: user_is_referred_to_human_after_3_portfolio_check_auth_fails | ||
fixtures: | ||
- route_to_calm | ||
steps: | ||
- user: I want to check my portfolio | ||
assertions: | ||
- bot_uttered: | ||
utter_name: utter_ask_user_name | ||
- user: John | ||
metadata: duplicate_message_1 | ||
assertions: | ||
- bot_uttered: | ||
utter_name: utter_ask_user_password | ||
- user: "1234" | ||
metadata: duplicate_message_1 | ||
assertions: | ||
- bot_uttered: | ||
utter_name: utter_authentication_failed | ||
- slot_was_set: | ||
- name: login_failed_attempts | ||
value: 1 | ||
- bot_uttered: | ||
utter_name: utter_ask_user_name | ||
- user: John | ||
metadata: duplicate_message_2 | ||
assertions: | ||
- bot_uttered: | ||
utter_name: utter_ask_user_password | ||
- user: "1234" | ||
metadata: duplicate_message_2 | ||
assertions: | ||
- bot_uttered: | ||
utter_name: utter_authentication_failed | ||
- slot_was_set: | ||
- name: login_failed_attempts | ||
value: 2 | ||
- bot_uttered: | ||
utter_name: utter_ask_user_name | ||
- user: John | ||
metadata: duplicate_message_3 | ||
assertions: | ||
- bot_uttered: | ||
utter_name: utter_ask_user_password | ||
- user: "1234" | ||
metadata: duplicate_message_3 | ||
assertions: | ||
- slot_was_set: | ||
- name: login_failed_attempts | ||
value: 3 | ||
- flow_started: pattern_human_handoff |