Sha256: 862f72e43de6cef1fa4da85f50eb5aa7d6a6d8e2accbfe3aae34337cc365758a

Contents?: true

Size: 1.19 KB

Versions: 19

Compression:

Stored size: 1.19 KB

Contents

def filter_dialog
  dialog(Redcar::ApplicationSWT::FilterListDialogController::FilterListDialog)
end

def filter_dialog_items
  filter_dialog.list.get_items.to_a
end

Then /^there should be a filter dialog open$/ do
  Swt.sync_exec do
    filter_dialog.should_not be_nil
  end
end

Then /^there should be no filter dialog open$/ do
  Swt.sync_exec do
    filter_dialog.should be_nil
  end
end

When /^I set the filter to "(.*)"$/ do |text|
  Swt.sync_exec do
    filter_dialog.text.set_text(text)
  end
end

When /^I select in the filter dialog$/ do
  Swt.sync_exec do
    filter_dialog.controller.selected
  end
end

When /^I wait "(.*)" seconds?$/ do |time|
  s = Time.now + time.to_f
  sleep 0.1 until Time.now > s
end

Then /^the filter dialog should have (no|\d+) entr(?:y|ies)$/ do |num|
  Swt.sync_exec do
    num = (num == "no" ? 0 : num.to_i)
    filter_dialog_items.length.should == num
  end
end

Then /^I should see "(.*)" at (\d+) the filter dialog$/ do |text, pos|
  Swt.sync_exec do
    pos = pos.to_i
    filter_dialog_items[pos].should == text
  end
end

Then /^I should not see "(.*)" in the filter dialog$/ do |text|
  Swt.sync_exec do
    filter_dialog_items.include?(text).should be_false
end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
redcar-0.13 plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.13.5dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.13.4dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.13.3dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.13.2dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.13.1dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-0.12.1 plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.13.0dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-0.12 plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.12.27dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.12.26dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.12.25dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.12.24dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.12.23dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.12.22dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.12.21dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.12.20dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.12.19dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb
redcar-dev-0.12.18dev plugins/application/features/step_definitions/filter_list_dialog_steps.rb