when i test my component with onTouchTap I gotReactWrapper::simulate() event 'touchTap' does not exist
and if run test with simulate('click'),i will can't get anything
here is my test code
injectTapEventPlugin();
const expect = chai.expect;
// let store;
let app;
describe('login', () => {
beforeEach(() => {
app = mount (
<Provider store={store}>
<App>
<LoginWrapper />
</App>
</Provider>
)
})
describe('Enzyme Mount', function () {
it('Add a new Todo', function (done) {
const nameInput = app.find(TextField).get(0);
const passwordInput = app.find(TextField).get(1);
nameInput.setState({'uid':'demo'});
passwordInput.setState({'pwd':'daemon'})
app.find(ArrowRight).simulate('touchTap');
const check = () => {
console.log(JSON.parse((localStorage.getItem('AUTH'))).loggedIn,'))');
expect(JSON.parse((localStorage.getItem('AUTH'))).loggedIn).to.equal(true);
//expect(JSON.parse((localStorage.getItem('AUTH'))).loggedIn).to.equal(true);
done();
}
setTimeout(check, 4000);
console.log(JSON.parse((localStorage.getItem('AUTH'))).loggedIn);
});
});
});
when i test my component with onTouchTap I got
ReactWrapper::simulate() event 'touchTap' does not exist
and if run test with simulate('click'),i will can't get anything here is my test code