We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 79949af + cc1be96 commit 4464101Copy full SHA for 4464101
1 file changed
test/ModalSpec.js
@@ -99,6 +99,21 @@ describe('Modal', function () {
99
ReactTestUtils.Simulate.click(dialog);
100
});
101
102
+ it('Should not close the modal when the "static" backdrop is clicked', function () {
103
+ let onHideSpy = sinon.spy();
104
+ let instance = render(
105
+ <Modal show onHide={onHideSpy} backdrop='static'>
106
+ <strong>Message</strong>
107
+ </Modal>
108
+ , mountPoint);
109
+
110
+ let backdrop = React.findDOMNode(instance.refs.backdrop);
111
112
+ ReactTestUtils.Simulate.click(backdrop);
113
114
+ expect(onHideSpy).to.not.have.been.called;
115
+ });
116
117
it('Should close the modal when the modal close button is clicked', function (done) {
118
let doneOp = function () { done(); };
119
0 commit comments