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

Fill credit card input with force in checkout spec #2911

Merged
merged 1 commit into from
Oct 12, 2018

Conversation

kennyadsl
Copy link
Member

This fixes the flaky spec described into #2910.

Capybara fill_in sometime does not fill the input with all the string provided so this fix will fill it with JS bypassing the default behavior.

@kennyadsl kennyadsl added the WIP label Oct 11, 2018
@kennyadsl kennyadsl self-assigned this Oct 11, 2018
This fixes the flaky spec described into solidusio#2910.

Capybara fill_in sometime does not fill the input with the whole
string. This commit will fill it with js bypassing the default
behavior.
@kennyadsl
Copy link
Member Author

I'm re-pushing this branch several times to see if this really fixes it

@kennyadsl
Copy link
Member Author

This seems to work, I don't love it but can't find any other solution at the moment. WDYT?

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

I think this is a very good solution. Dealing with user input and JavaScript acting on it is never easy. Thanks for looking into it, Alberto!

@tvdeyen tvdeyen merged commit 4904d0c into solidusio:master Oct 12, 2018
@tvdeyen
Copy link
Member

tvdeyen commented Oct 12, 2018

Merged because all PRs are currently suffering of breaking builds.

@kennyadsl kennyadsl deleted the fix-flaky-spec branch October 18, 2018 14:40
kennyadsl added a commit to nebulab/solidus that referenced this pull request Apr 4, 2019
These input are controlled by a js plugin (payment.js) that
messes up with Capybara and gives us a lot of flaky specs.

By using this hacky solution we are sure input are filled correctly,
see also solidusio#2911.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants