Created
January 25, 2019 16:36
-
-
Save ahuggins/e862d5fdfd4cf8b73d707b84f17b1b72 to your computer and use it in GitHub Desktop.
Real World Example of Wrapper issues
This file contains hidden or 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
| import React from 'react'; | |
| import { render, mount, shallow } from 'enzyme'; | |
| import EditDatasource from './EditDatasource'; | |
| describe('tests for EditDatasource', function () { | |
| it.only('changes the datasource.type when a select button is clicked', function () { | |
| const wrap = mount( | |
| <EditDatasource | |
| notify={notify} | |
| navigate={navigate} | |
| action={actionSetup()} /> | |
| ); | |
| expect(wrap.state().datasource.type === 'datawarehouse').to.be.true; | |
| wrap.find('.manualUpload').simulate('click'); | |
| expect(wrap.state().datasource.type === 'manual').to.be.true; | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment