1 | import React from 'react';
|
2 | import {shallow, mount, render} from 'enzyme';
|
3 | import {expect} from 'chai';
|
4 | import InputGroup from '../src/index';
|
5 |
|
6 |
|
7 |
|
8 | describe('Enzyme Shallow', function() {
|
9 | it('InputGroup should be exist', function() {
|
10 | let inputgroup = shallow(<InputGroup/>);
|
11 | expect(inputgroup.hasClass('u-input-group')).to.equal(true);
|
12 | })
|
13 | })
|
14 | describe('InputGroup的附属组件', function() {
|
15 | it('InputGroupButton 作为 InputGroup的附属组件Button', function() {
|
16 | let inputgroupbutton = shallow(<InputGroup.Button/>);
|
17 | expect(inputgroupbutton.hasClass('u-input-group-btn')).to.equal(true);
|
18 | })
|
19 | it('InputGroupAddon 作为 InputGroup的附属组件Addon', function() {
|
20 | let inputgroupaddon = shallow(<InputGroup.Addon/>);
|
21 | expect(inputgroupaddon.hasClass('u-input-group-addon')).to.equal(true);
|
22 | })
|
23 | })
|