Comments (6)
Sure, I've created a gist with all of the required files, you can just paste them over the botkit boilerplate generated by yeoman.
The files starting with create...
should be in the features
folder and the files starting with test...
should be in the tests folder.
EDIT - the link to the gist is - https://gist.github.com/yaron-idan/e85e9c9fcc1615138bd9ad866115b742
from botkit-mock.
hey @yaron-idan,
i've checked you gist, thanks - great work!
i found that you include dialog as part of your config file bot.js
, so when you try to test single file you pass controller
as dependency without dialog itself.
take a look here i've provided super simple example how to make your tests working
from botkit-mock.
Whoa! This is really great. I was thinking there should probably be a way to load the controller as it's configured in bot.js
, because my understanding of the botkit docs led me to believe that's where I should be configuring my dialogs.
However, this can totally work in the meantime and allow me to create test cases for the dialog I'm currently building, thanks alot!
from botkit-mock.
hey @yaron-idan,
did you test that dialog online with connected slack bot?
from botkit-mock.
Hey @ihorrusinko,
Yep, the dialog behaves as expected when I test it online.
from botkit-mock.
from botkit-mock.
Related Issues (20)
- 100ms is not enough for some responses HOT 11
- Indentation Issue in Test Example HOT 1
- Support replyAndUpdate HOT 4
- Test controller.api.* (eg. Facebook's messenger_profile) functions HOT 6
- can't set afterProcessingUserMessageTimeout on each bot.usersInput. HOT 3
- AssertionError HOT 22
- bot.whisper is not a function HOT 4
- Does it work with SocketBot? HOT 2
- Where is "this" coming from in the examples HOT 3
- middleware interface HOT 9
- Relax deps permit use of 4.x HOT 2
- v4 is a breaking change. HOT 6
- bot.identity throws on Slack HOT 12
- Configurable baseUrl for use with yakbak HOT 2
- Audit issues with Handlebars HOT 1
- @slack/web-api dependency causes `invalid_auth` throws on every instantiation of adapter HOT 5
- Events not registering for testing `controller.trigger()` HOT 3
- Multi-step Testing? HOT 1
- Twilio SMS adapter? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from botkit-mock.