Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for Enzyme 3 #9

Open
mrbinky3000 opened this issue Dec 12, 2017 · 1 comment
Open

Tests for Enzyme 3 #9

mrbinky3000 opened this issue Dec 12, 2017 · 1 comment

Comments

@mrbinky3000
Copy link

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?

@BarthesSimpson
Copy link

@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();
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants