diff --git a/data/test/test_integration/data/nlu.yml b/data/test/test_integration/data/nlu.yml index 877f8f7c6975..ecb72d611556 100644 --- a/data/test/test_integration/data/nlu.yml +++ b/data/test/test_integration/data/nlu.yml @@ -89,3 +89,10 @@ nlu: - are you a human? - am I talking to a bot? - am I talking to a human? + + - intent: block + examples: | + - block my [checking](account_type) account + - i want to block my [savings](account_type) account + - i need to block an account + - i need to block my [credit](account_type) card diff --git a/data/test/test_integration/data/stories.yml b/data/test/test_integration/data/stories.yml index 8d67b0112b46..227609c1868e 100644 --- a/data/test/test_integration/data/stories.yml +++ b/data/test/test_integration/data/stories.yml @@ -28,3 +28,29 @@ stories: - action: utter_did_that_help - intent: deny - action: utter_goodbye + + - story: block savings + steps: + - intent: block + entities: + - account_type: savings + - action: utter_block_account + + - story: block checking + steps: + - intent: block + entities: + - account_type: checking + - action: utter_checking + + - story: block credit + steps: + - intent: block + entities: + - account_type: credit + - action: utter_credit + + - story: block no entities + steps: + - intent: block + - action: utter_nothing diff --git a/data/test/test_integration/domain.yml b/data/test/test_integration/domain.yml index d72dc536ad91..2118bb66fc1d 100644 --- a/data/test/test_integration/domain.yml +++ b/data/test/test_integration/domain.yml @@ -8,6 +8,7 @@ intents: - mood_great - mood_unhappy - bot_challenge + - block responses: utter_greet: @@ -29,6 +30,35 @@ responses: utter_iamabot: - text: "I am a bot, powered by Rasa." + utter_block_account: + - text: "your account has been blocked" + + utter_checking: + - text: "checking account" + + utter_credit: + - text: "credit account" + + utter_nothing: + - text: "no account type was specified" + +entities: + - account_type + +slots: + account_type: + type: categorical + influence_conversation: true + values: + - savings + - checking + - credit + mappings: + - type: from_entity + entity: account_type + conditions: + - active_loop: null + session_config: session_expiration_time: 60 carry_over_slots_to_new_session: true diff --git a/data/test/test_integration/domain_with_null_active_loop.yml b/data/test/test_integration/domain_with_null_active_loop.yml deleted file mode 100644 index 0a9a964f8275..000000000000 --- a/data/test/test_integration/domain_with_null_active_loop.yml +++ /dev/null @@ -1,64 +0,0 @@ -version: "3.1" - -intents: - - greet - - goodbye - - affirm - - deny - - mood_great - - mood_unhappy - - bot_challenge - - block - -entities: - - account_type - -slots: - account_type: - type: categorical - influence_conversation: true - values: - - savings - - checking - - credit - mappings: - - type: from_entity - entity: account_type - # uncomment below to make the story conflict happen - conditions: - - active_loop: null - -responses: - utter_block_account: - - text: "your account has been blocked" - - utter_checking: - - text: "checking account" - - utter_credit: - - text: "credit account" - - utter_nothing: - - text: "no account type was specified" - - utter_goodbye: - - text: "Bye" - - utter_iamabot: - - text: "I am a bot, powered by Rasa." - - utter_greet: - - text: "Hey! How are you?" - - utter_cheer_up: - - text: 'Here is something to cheer you up' - - utter_did_that_help: - - text: Did that help you? - - utter_happy: - - text: Great, carry on! - -session_config: - session_expiration_time: 60 - carry_over_slots_to_new_session: true diff --git a/tests/integration_tests/core/test_cli_response.py b/tests/integration_tests/core/test_cli_response.py index 27daaaff7911..35a0a4f4cfcb 100644 --- a/tests/integration_tests/core/test_cli_response.py +++ b/tests/integration_tests/core/test_cli_response.py @@ -158,8 +158,8 @@ def test_rasa_validate_null_active_loop_no_errors( test_data_dir = Path(request.config.rootdir, "data", "test", "test_integration") test_config_dir = Path(request.config.rootdir, "data", "test_config") - source_file = (test_data_dir).absolute() - domain_file = (test_data_dir / "domain_with_null_active_loop.yml").absolute() + source_file = (test_data_dir / "data").absolute() + domain_file = (test_data_dir / "domain.yml").absolute() config_file = (test_config_dir / "config_unique_assistant_id.yml").absolute() result = run( "data", @@ -181,12 +181,3 @@ def test_rasa_validate_null_active_loop_no_errors( assert "Validating utterances..." in stderr_text assert "Considering all preceding turns for conflict analysis." in stderr_text assert "No story structure conflicts found." in stderr_text - - output_text = "".join(result.outlines) - assert "Rasa Open Source reports anonymous usage telemetry" - "to help improve the product" in output_text - assert "for all its users." in output_text - assert "If you'd like to opt-out," - "you can use `rasa telemetry disable`." in output_text - assert "To learn more, check out" - "https://rasa.com/docs/rasa/telemetry/telemetry." in output_text