Skip to content

Commit

Permalink
Add test if button bold renders as pressed when there is bold selection
Browse files Browse the repository at this point in the history
Fixes #148
  • Loading branch information
ipeychev committed Mar 24, 2015
1 parent 9608b50 commit 95962d7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ui/react/test/button-bold.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,14 @@ describe('ButtonBold', function() {

assert.strictEqual(data, '<p>There should be a <strong>selection</strong> made bold.</p>');
});

it('should add class which represents pressed button', function() {
bender.tools.selection.setWithHtml(this.nativeEditor, 'A <strong>{selection}</strong> made bold.');

var buttonBold = React.render(<global.AlloyEditor.ButtonBold editor={this.editor} />, this.container);

var buttonDOMNode = React.findDOMNode(buttonBold);

assert.strictEqual($(buttonDOMNode).hasClass('alloy-editor-button-pressed'), true);
});
});

0 comments on commit 95962d7

Please sign in to comment.