redux-form-test icon indicating copy to clipboard operation
redux-form-test copied to clipboard

Tests for Enzyme 3

Open mrbinky3000 opened this issue 6 years ago • 1 comments

This repo has been very helpful in the past. I wonder if you could update it for react 16, enzyme 3 and redux-form 7?

mrbinky3000 avatar Dec 12 '17 15:12 mrbinky3000

@tylercollier in case it's helpful, after a long day of trying various approaches, I found my integration tests only work if I use process.nextTick, for example:


    const nameInput = page.find('#project_name');
    nameInput.simulate('blur');
    process.nextTick(() => {
      const formGroup = page.find('FormGroup[controlId="project_name"]');
      expect(formGroup.props().validationState).toBe('error');
      expect(
        formGroup.text().indexOf('Project Name is required')
      ).toBeTruthy();
      done();
    });

BarthesSimpson avatar Jan 25 '18 03:01 BarthesSimpson