Sha256: 880eadadb4618d8af4a34a28496366523bcb3e4808111b9ce8dd0325febe3110

Contents?: true

Size: 700 Bytes

Versions: 1

Compression:

Stored size: 700 Bytes

Contents

When /^I fill in the input with "([^"]*)" within the dialog box$/ do |text|
  input_selector = 'div.x-window input'

  field = find(input_selector)
  field.set(text)

  # fire keyup event for trigger the autocomplete
  Capybara.current_session.execute_script <<-JS
    $("#{input_selector}").focus().trigger($.Event('keyup'));
  JS
end

When /^I press "([^"]*)" within the dialog box$/ do |button|
  When %{I press "#{button}" within "div.x-window"}
end

Then /^I should see the window titled "([^"]*)"$/ do |title|
  page.find("div.x-window span.x-window-header-text").text.should == title
end

Then /^I should not see the window$/ do
  page.should have_no_css('div.x-window', :visible => true)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rwiki-0.2.5 features/step_definitions/dialog_box_steps.rb