/// import * as Promise from 'bluebird'; import { Message } from '../types/message'; import { Button } from '../types/messages/button'; import TestPlatform from './platform'; export default class Tester { readonly userId: string; private testPlatfom; private promiseChain; private currentResolve; private currentReject; private currentExpect; private startTest; private timeoutReject; private timeout; private checkforExtraDialogs; constructor(platform: TestPlatform, userId?: string); /** * Add a promise to the chain to expect a response from the bot */ private addRespone(expectChecker); /** * Add a promise to chain to send amessage to the bot */ private addSend(message); /** * Wait to recieve a text message from bot */ expectText(allowedPhrases: Array | string): this; /** * Wait to recieve a text message from bot */ expectImage(url: string): this; /** * Wait to recieve a set of buttons from bot * @todo create a better inirializer to create button object * @param text Text for the button message to have * @param button Array of raw button strctures */ expectButtons(text: string, button: Array