Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Choose method dont triggers the 'change' event. #496

Closed
cibernox opened this Issue · 2 comments

2 participants

@cibernox

I have a 3 radio buttons.
I also have a 'change' event binded to that radio buttons via a delegated call.

node.on 'change', ':radio', @enableOrDisableRejectReasonField

When the third radio button, labeled with "Other (specify)", is chosen, a text field next to it should be enabled.
In my test I do that:

# I have a disabled field
page.should have_css '#availability_answer_reject_reason_explanation[disabled]'
# I choose the radio button that should enable that field
choose 'Other (specify)'
find_field('Other (specify)').trigger('change')  #=> I need to manualy trigger the change event only with capybara-webkit
# The field is not disabled now
page.should have_no_css '#availability_answer_reject_reason_explanation[disabled]'

With selenium I have no need to manually trigger the event. Capybara-webkit doesn't seem to fire the change event.

Is this behavior intended or known?

@mhoran
Collaborator

@cibernox, could you try running your tests against the master branch of capybara-webkit? Click code was recently changed, which may exhibit different behavior.

@mhoran
Collaborator

Closing out due to inactivity. Let us know if you're still experiencing the issue. Most of the code related to this behavior has been reworked, so this issue should be resolved.

@mhoran mhoran closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.