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

Use Capybara's #find to enter the password #923

Merged
merged 1 commit into from Jan 4, 2017
Merged

Conversation

monfresh
Copy link
Contributor

@monfresh monfresh commented Jan 4, 2017

Why: Sometimes, there is a delay long enough between when Capybara
clicks the confirmation link in the user's email and when the password
page appears, that causes sign_up_and_2fa_as_a_user_would to fail
intermittently on Travis.

How: Modify the spec such that Capybara waits (up to the
default_max_wait_time) for the element to appear. This can be done
by using the find method (which incorporates waiting by default,
unlike fill_in) or adding a presence expectation for any element on
the screen before attempting to fill in the password field. I opted for
the former.

**Why**: Sometimes, there is a delay long enough between when Capybara
clicks the confirmation link in the user's email and when the password
page appears, that causes `sign_up_and_2fa_as_a_user_would` to fail
intermittently on Travis.

**How**: Modify the spec such that Capybara waits (up to the
`default_max_wait_time`) for the element to appear. This can be done
by using the `find` method (which incorporates waiting by default,
unlike `fill_in`) or adding a presence expectation for any element on
the screen before attempting to fill in the password field. I opted for
the former.
Copy link
Contributor

@pkarman pkarman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pkarman pkarman merged commit a93b2f8 into master Jan 4, 2017
@pkarman pkarman deleted the mb-fix-flickering-spec branch January 4, 2017 22:12
amoose pushed a commit that referenced this pull request Feb 7, 2017
**Why**: Sometimes, there is a delay long enough between when Capybara
clicks the confirmation link in the user's email and when the password
page appears, that causes `sign_up_and_2fa_as_a_user_would` to fail
intermittently on Travis.

**How**: Modify the spec such that Capybara waits (up to the
`default_max_wait_time`) for the element to appear. This can be done
by using the `find` method (which incorporates waiting by default,
unlike `fill_in`) or adding a presence expectation for any element on
the screen before attempting to fill in the password field. I opted for
the former.
amoose pushed a commit that referenced this pull request Feb 24, 2017
**Why**: Sometimes, there is a delay long enough between when Capybara
clicks the confirmation link in the user's email and when the password
page appears, that causes `sign_up_and_2fa_as_a_user_would` to fail
intermittently on Travis.

**How**: Modify the spec such that Capybara waits (up to the
`default_max_wait_time`) for the element to appear. This can be done
by using the `find` method (which incorporates waiting by default,
unlike `fill_in`) or adding a presence expectation for any element on
the screen before attempting to fill in the password field. I opted for
the former.
amoose pushed a commit that referenced this pull request Feb 28, 2017
**Why**: Sometimes, there is a delay long enough between when Capybara
clicks the confirmation link in the user's email and when the password
page appears, that causes `sign_up_and_2fa_as_a_user_would` to fail
intermittently on Travis.

**How**: Modify the spec such that Capybara waits (up to the
`default_max_wait_time`) for the element to appear. This can be done
by using the `find` method (which incorporates waiting by default,
unlike `fill_in`) or adding a presence expectation for any element on
the screen before attempting to fill in the password field. I opted for
the former.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants