forked from LucasBassetti/react-simple-chatbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lucas Bassetti
authored and
Lucas Bassetti
committed
Apr 15, 2017
1 parent
51a24a0
commit a8df1d3
Showing
6 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react'; | ||
import { describe, it } from 'mocha'; | ||
import { expect } from 'chai'; | ||
import { shallow } from 'enzyme'; | ||
import { CustomStep } from '../../../lib/steps/steps'; | ||
|
||
const Example = () => ( | ||
<div className="example"> | ||
Example | ||
</div> | ||
); | ||
|
||
describe('CustomStep', () => { | ||
const steps = { | ||
step1: { | ||
id: '1', | ||
component: <Example />, | ||
}, | ||
}; | ||
const step = steps.step1; | ||
const settings = { | ||
step, | ||
steps, | ||
style: { | ||
border: 0, | ||
}, | ||
previousStep: step, | ||
triggerNextStep: () => {}, | ||
}; | ||
|
||
const wrapper = shallow(<CustomStep {...settings} />); | ||
wrapper.setState({ loading: false }); | ||
|
||
it('should render', () => { | ||
expect(wrapper.hasClass('custom-step')).to.be.equal(true); | ||
}); | ||
|
||
it('should render without border', () => { | ||
expect(wrapper.find('.custom-step').prop('style').border).to.be.equal(0); | ||
}); | ||
|
||
it('should render with Example component', () => { | ||
expect(wrapper.find(Example)).to.have.length(1); | ||
}); | ||
}); |