diff --git a/src/SplitButton.jsx b/src/SplitButton.jsx index 6958ff673d..f20f0e0f8f 100644 --- a/src/SplitButton.jsx +++ b/src/SplitButton.jsx @@ -56,6 +56,7 @@ var SplitButton = React.createClass({ id={null}> {this.props.dropdownTitle} +   ); diff --git a/test/SplitButtonSpec.jsx b/test/SplitButtonSpec.jsx index c26a2b18eb..5bd8779a4b 100644 --- a/test/SplitButtonSpec.jsx +++ b/test/SplitButtonSpec.jsx @@ -29,10 +29,12 @@ describe('SplitButton', function () { assert.equal(button.nodeName, 'BUTTON'); assert.equal(button.type, 'button'); assert.ok(dropdownButton.className.match(/\bdropdown-toggle\b/)); - assert.ok(dropdownButton.lastChild.className.match(/\bcaret\b/)); assert.equal(button.innerText.trim(), 'Title'); - assert.ok(dropdownButton.firstChild.className.match(/\bsr-only\b/)); - assert.equal(dropdownButton.firstChild.innerText.trim(), 'Toggle dropdown'); + assert.ok(dropdownButton.childNodes[0].className.match(/\bsr-only\b/)); + assert.equal(dropdownButton.childNodes[0].innerText.trim(), 'Toggle dropdown'); + assert.ok(dropdownButton.childNodes[1].className.match(/\bcaret\b/)); + assert.equal(dropdownButton.childNodes[2].style.letterSpacing, '-0.3em'); + assert.equal(dropdownButton.childNodes.length, 3); }); it('Should render menu correctly', function () {