Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
519f235
Add message filter and in-line options update (#28)
microsoftly Oct 6, 2017
8b02cc6
add builtin message filters
microsoftly Oct 6, 2017
ab04000
add builtin message filters to options/config (#30)
microsoftly Oct 6, 2017
a6d5807
Merge branch 'dev' of github.com:microsoftly/BotTester into dev
microsoftly Oct 6, 2017
a4c07bd
v3.1.0 (#32)
microsoftly Oct 6, 2017
f2c154c
Merge branch 'dev' of github.com:microsoftly/BotTester into dev
microsoftly Oct 6, 2017
c1cddcf
added ignoreInternalSaveMessage option
microsoftly Oct 6, 2017
d38828a
Add internal save ignore option (#35)
microsoftly Oct 6, 2017
634d8ec
Merge branch 'dev' of github.com:microsoftly/BotTester into dev
microsoftly Oct 6, 2017
0d1ee2f
v3.2.0
microsoftly Oct 6, 2017
a47bef5
Merge branch 'master' of github.com:microsoftly/BotTester into dev
microsoftly Oct 6, 2017
be8c307
fixed a redundant definition that came from a recursive merge strategy
microsoftly Oct 6, 2017
af4b954
fix spelling error with ignoreInternalSaveMessage (#38)
microsoftly Oct 11, 2017
9602372
3.2.1
microsoftly Oct 11, 2017
d753c30
Merge branch 'dev' of github.com:microsoftly/BotTester into dev
microsoftly Oct 11, 2017
c2d754d
Merge branch 'master' of github.com:microsoftly/BotTester into dev
microsoftly Oct 11, 2017
5b1b84f
remove typescript notation from docs
microsoftly Oct 11, 2017
08c78d2
forcibly remove docs folder when building typeDocs
microsoftly Oct 11, 2017
7f0a476
3.2.2
microsoftly Oct 11, 2017
6b2e716
Merge branch 'master' of github.com:microsoftly/BotTester into dev
microsoftly Oct 11, 2017
e1be08f
add adaptive cards (and attachment) support (#44)
microsoftly Dec 7, 2017
60e637c
v3.3.0
microsoftly Dec 7, 2017
587d07b
Merge branch 'master' of github.com:microsoftly/BotTester into dev
microsoftly Dec 7, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ For a more in depth view, check out [the Bot Tester Framework Config doc](https:
import { IAddress, IMessage, Message, Prompts, Session, UniversalBot } from 'botbuilder';
import { expect } from 'chai';
import { BotTester, TestConnector } from 'bot-tester';
import { getAdaptiveCard, getAdaptiveCardAttachment, getAdaptiveCardMessage } from './adaptiveCardProvider';

const connector = new TestConnector();

Expand Down Expand Up @@ -113,6 +114,19 @@ describe('BotTester', () => {
});
```

# Test Adaptive Cards
``` javascript
it('can correctly check against adaptive cards', () => {
bot.dialog('/', (session) => {
session.send(getAdaptiveCardMessage());
});

return new BotTester(bot)
.sendMessageToBot('anything', getAdaptiveCardMessage())
.runTest();
});
```

# Inspect session
```javascript
it('can inspect session state', () => {
Expand Down
11 changes: 10 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
machine:
node:
version: 6.1.0
version: 8.0.0
environment:
PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"

dependencies:
override:
- yarn
cache_directories:
- ~/.cache/yarn

test:
override:
- yarn lint && yarn coverage

Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ <h3>Properties</h3>
<section class="tsd-index-section tsd-is-external">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private tsd-is-external"><a href="_assertionlibraries_chaiexpectation_.chaiexpectation.html#checkformatchingattachments" class="tsd-kind-icon">check<wbr>For<wbr>Matching<wbr>Attachments</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_assertionlibraries_chaiexpectation_.chaiexpectation.html#nottobeempty" class="tsd-kind-icon">not<wbr>ToBe<wbr>Empty</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_assertionlibraries_chaiexpectation_.chaiexpectation.html#tobetrue" class="tsd-kind-icon">to<wbr>BeTrue</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="_assertionlibraries_chaiexpectation_.chaiexpectation.html#todeeplyinclude" class="tsd-kind-icon">to<wbr>Deeply<wbr>Include</a></li>
Expand All @@ -130,7 +131,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/08c78d2/src/assertionLibraries/ChaiExpectation.ts#L32">assertionLibraries/ChaiExpectation.ts:32</a></li>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/e1be08f/src/assertionLibraries/ChaiExpectation.ts#L32">assertionLibraries/ChaiExpectation.ts:32</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -155,7 +156,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> message</h3>
<div class="tsd-signature tsd-kind-icon">message<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/08c78d2/src/assertionLibraries/ChaiExpectation.ts#L32">assertionLibraries/ChaiExpectation.ts:32</a></li>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/e1be08f/src/assertionLibraries/ChaiExpectation.ts#L32">assertionLibraries/ChaiExpectation.ts:32</a></li>
</ul>
</aside>
</section>
Expand All @@ -165,13 +166,39 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> subject</h3>
<div class="tsd-signature tsd-kind-icon">subject<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">__type</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/08c78d2/src/assertionLibraries/ChaiExpectation.ts#L31">assertionLibraries/ChaiExpectation.ts:31</a></li>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/e1be08f/src/assertionLibraries/ChaiExpectation.ts#L31">assertionLibraries/ChaiExpectation.ts:31</a></li>
</ul>
</aside>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private tsd-is-external">
<a name="checkformatchingattachments" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> check<wbr>For<wbr>Matching<wbr>Attachments</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private tsd-is-external">
<li class="tsd-signature tsd-kind-icon">check<wbr>For<wbr>Matching<wbr>Attachments<span class="tsd-signature-symbol">(</span>outgoingAttachments<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IAttachment</span><span class="tsd-signature-symbol">[]</span>, expectedAttachments<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IAttachment</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/e1be08f/src/assertionLibraries/ChaiExpectation.ts#L112">assertionLibraries/ChaiExpectation.ts:112</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>outgoingAttachments: <span class="tsd-signature-type">IAttachment</span><span class="tsd-signature-symbol">[]</span></h5>
</li>
<li>
<h5>expectedAttachments: <span class="tsd-signature-type">IAttachment</span><span class="tsd-signature-symbol">[]</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="nottobeempty" class="tsd-anchor"></a>
<h3>not<wbr>ToBe<wbr>Empty</h3>
Expand All @@ -183,7 +210,7 @@ <h3>not<wbr>ToBe<wbr>Empty</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_assertionlibraries_iexpectation_.iexpectation.html">IExpectation</a>.<a href="../interfaces/_assertionlibraries_iexpectation_.iexpectation.html#nottobeempty">notToBeEmpty</a></p>
<ul>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/08c78d2/src/assertionLibraries/ChaiExpectation.ts#L39">assertionLibraries/ChaiExpectation.ts:39</a></li>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/e1be08f/src/assertionLibraries/ChaiExpectation.ts#L39">assertionLibraries/ChaiExpectation.ts:39</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
Expand All @@ -201,7 +228,7 @@ <h3>to<wbr>BeTrue</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_assertionlibraries_iexpectation_.iexpectation.html">IExpectation</a>.<a href="../interfaces/_assertionlibraries_iexpectation_.iexpectation.html#tobetrue">toBeTrue</a></p>
<ul>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/08c78d2/src/assertionLibraries/ChaiExpectation.ts#L51">assertionLibraries/ChaiExpectation.ts:51</a></li>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/e1be08f/src/assertionLibraries/ChaiExpectation.ts#L51">assertionLibraries/ChaiExpectation.ts:51</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
Expand All @@ -219,7 +246,7 @@ <h3>to<wbr>Deeply<wbr>Include</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_assertionlibraries_iexpectation_.iexpectation.html">IExpectation</a>.<a href="../interfaces/_assertionlibraries_iexpectation_.iexpectation.html#todeeplyinclude">toDeeplyInclude</a></p>
<ul>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/08c78d2/src/assertionLibraries/ChaiExpectation.ts#L61">assertionLibraries/ChaiExpectation.ts:61</a></li>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/e1be08f/src/assertionLibraries/ChaiExpectation.ts#L61">assertionLibraries/ChaiExpectation.ts:61</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -252,7 +279,7 @@ <h3>to<wbr>Equal</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_assertionlibraries_iexpectation_.iexpectation.html">IExpectation</a>.<a href="../interfaces/_assertionlibraries_iexpectation_.iexpectation.html#toequal">toEqual</a></p>
<ul>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/08c78d2/src/assertionLibraries/ChaiExpectation.ts#L43">assertionLibraries/ChaiExpectation.ts:43</a></li>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/e1be08f/src/assertionLibraries/ChaiExpectation.ts#L43">assertionLibraries/ChaiExpectation.ts:43</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -276,7 +303,7 @@ <h3>to<wbr>Include</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/_assertionlibraries_iexpectation_.iexpectation.html">IExpectation</a>.<a href="../interfaces/_assertionlibraries_iexpectation_.iexpectation.html#toinclude">toInclude</a></p>
<ul>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/08c78d2/src/assertionLibraries/ChaiExpectation.ts#L47">assertionLibraries/ChaiExpectation.ts:47</a></li>
<li>Defined in <a href="https://github.com/microsoftly/BotTester/blob/e1be08f/src/assertionLibraries/ChaiExpectation.ts#L47">assertionLibraries/ChaiExpectation.ts:47</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -354,6 +381,9 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</spa
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private tsd-is-external">
<a href="_assertionlibraries_chaiexpectation_.chaiexpectation.html#subject" class="tsd-kind-icon">subject</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-private tsd-is-external">
<a href="_assertionlibraries_chaiexpectation_.chaiexpectation.html#checkformatchingattachments" class="tsd-kind-icon">check<wbr>For<wbr>Matching<wbr>Attachments</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="_assertionlibraries_chaiexpectation_.chaiexpectation.html#nottobeempty" class="tsd-kind-icon">not<wbr>ToBe<wbr>Empty</a>
</li>
Expand Down
Loading