forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPopoverSpec.js
More file actions
22 lines (17 loc) · 771 Bytes
/
PopoverSpec.js
File metadata and controls
22 lines (17 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import ReactDOM from 'react-dom';
import Popover from '../src/Popover';
describe('Popover', () => {
it('Should output a popover title and content', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Popover id="test-popover" title="Popover title">
<strong>Popover Content</strong>
</Popover>
);
assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'popover-title'));
assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'popover-content'));
assert.ok(ReactTestUtils.findRenderedDOMComponentWithTag(instance, 'strong'));
assert.equal(ReactDOM.findDOMNode(instance).style.display, 'block');
});
});