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

Add support for random order expectations #18

Closed
bilby91 opened this issue Sep 6, 2017 · 5 comments
Closed

Add support for random order expectations #18

bilby91 opened this issue Sep 6, 2017 · 5 comments

Comments

@bilby91
Copy link
Contributor

bilby91 commented Sep 6, 2017

At the moment the array of messages that is used to check responses against a message is used in the order the user provides the message. In some situations, a bot can respond to a message with multiple messages but the order of the messages is not known before hand. I think it would be a good idea to support random order of message, in other words, expect that all the messages are sent from the bot to the user but don't force the same order.

What do you think @microsoftly ?

@microsoftly
Copy link
Owner

Can you give me an example where multiple messages would be sent with a random order? I want to be able to build a test case for it before going into it.

I'm thinking I would end up adding an additional sendMessageToBot. Something like sendMessageToBotResponseOrderAgnostic or something similar. That then begs the question of how to handle the sendMessageToBot case where an array for random responses is included.

@bilby91
Copy link
Contributor Author

bilby91 commented Sep 6, 2017

@microsoftly Sure.

In our use case, a user can start a checkin in Suttna (https://suttna.com) using a command. When running the command the bot will send a message as a reply to the user that executed the command and also direct message every participant of the checkin. The order of the direct messages can be different.

Make sense ?

@microsoftly
Copy link
Owner

makes sense. I think adding a method sendMessageToBotIgnoreResponseOrder should do the trick. It won't complicate the api much and still makes sense.

@bilby91
Copy link
Contributor Author

bilby91 commented Sep 7, 2017

Like it! Let me know if I can help

@microsoftly
Copy link
Owner

#23 solved. Will be out in the 3.0.0 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants