Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin-flow-builder: fallback , keyword, smart-intent tests #2820

Merged
merged 10 commits into from
May 14, 2024

Conversation

Iru89
Copy link
Contributor

@Iru89 Iru89 commented May 12, 2024

Description

Many lines added (292 in one file and 486 in the other) are from the JSON that represents the flow used for testing

  • Split the bot-action and first-interaction tests into two different files.
  • Add tests for fallback, keyword and smart intent.
  • Refactor the function getSmartIntentNodeByInput into a SmartIntentApi class and add a mock for the private function getInference of this class

Context

We need to create tests to keep adding new features and refactor the plugin without changing the behaviour

Approach taken / Explain the design

For the smart intent test I have created a separate flow so that I don't always have to use the mock (we can discuss if this is the best way or if all tests should go in the same flow)

Testing

This PR only contains changes to add tests and refactors the getSmartIntentNodeByInput function into a class and then creates a mock that modifies only one function of this class.

Add tests for fallback, keyword and smart intent

@Iru89 Iru89 changed the title plugin-flow-builder: add tests plugin-flow-builder: fallback , keyword, smart-intent tests May 13, 2024
@Iru89 Iru89 merged commit 0a04c04 into master-lts May 14, 2024
2 checks passed
@Iru89 Iru89 deleted the plugin-flow-builder/tests branch May 14, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants