aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tests/Select.spec.jsx28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/Select.spec.jsx b/tests/Select.spec.jsx
index fd2ec32..2d30098 100644
--- a/tests/Select.spec.jsx
+++ b/tests/Select.spec.jsx
@@ -33,6 +33,34 @@ describe('Select', () => {
33 document.body.removeChild(container); 33 document.body.removeChild(container);
34 }); 34 });
35 35
36 describe('select panel', () => {
37 it('select panel reacts to mouseenter and mouseleave correctly', (done) => {
38 const picker = renderPicker();
39 const input = TestUtils.scryRenderedDOMComponentsWithClass(picker,
40 'rc-time-picker-input')[0];
41 async.series([(next) => {
42 Simulate.click(input);
43 setTimeout(next, 100);
44 }, (next) => {
45 const re = /(^|\s+)rc-time-picker-panel-select-active(\s+|$)/;
46 const selector = TestUtils.scryRenderedDOMComponentsWithClass(picker.panelInstance,
47 'rc-time-picker-panel-select')[0];
48
49 expect(re.test(selector.className)).to.be(false);
50
51 Simulate.mouseEnter(selector);
52 expect(re.test(selector.className)).to.be(true);
53
54 Simulate.mouseLeave(selector);
55 expect(re.test(selector.className)).to.be(false);
56
57 next();
58 }], () => {
59 done();
60 });
61 });
62 });
63
36 describe('select number', () => { 64 describe('select number', () => {
37 it('select number correctly', (done) => { 65 it('select number correctly', (done) => {
38 const picker = renderPicker(); 66 const picker = renderPicker();