loopj/jquery-tokeninput — Issue #202: Testing with Cucumber and Capybara?
Author: dtuite
Created: 2011-10-16 18:41:47+00:00
State: open

I'm attempting to test my Tokeninput field with cucumber and [capybara-webkit](https://github.com/thoughtbot/capybara-webkit) (which is just a driver for a headless webkit browser).

I'm struggling to figure out where I should tell cucumber to fill in text (to trigger tokeninput) and how to tell it to click an option on the dropdown list.

If this is my tokeninput enabled form

Event Name

And this is my Cucumber scenario below. What element should I be telling cucumber to type into?

@javascript
Scenario: Creating a bus
Given I am on the events page
# This is the step in question. What element should I be targeting here?
And I fill in "token-input-homepage_event_id" with "Rihan"