Skip to content

Commit

Permalink
Added test for hiddenInput step parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
gamedevsam committed Jul 17, 2018
1 parent 4273207 commit cf90173
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
19 changes: 19 additions & 0 deletions tests/lib/ChatBot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,4 +270,23 @@ describe('ChatBot', () => {
expect(wrapper.find(ChatBotContainer).props().opened).to.be.equal(true);
});
});

describe('Hide Input', () => {
const wrapper = mount(
<ChatBot
steps={[
{
id: '1',
message: 'Hide Input',
hideInput:true,
end: true,
},
]}
/>,
);

it('should be rendered without input', () => {
expect(wrapper.find('input.rsc-input')).to.have.length(0);
});
});
});

0 comments on commit cf90173

Please sign in to comment.