You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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);
});
});
});
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: