Sha256: 4881709a2a333efb0ecf9373f2e0e146e4458538779169d87de50bb592e38f42

Contents?: true

Size: 1.14 KB

Versions: 4

Compression:

Stored size: 1.14 KB

Contents

When(/^I get the first item from the ordered list$/) do
  @element = @page.ol_id_element[0]
end

Then(/^the list item's text should be "(.*?)"$/) do |text|
  expect(@element.text).to eql text
end

When(/^I locate the ordered list by "(.*?)"$/) do |how|
  @list = @page.send "ol_#{how}_element"
end

When(/^I get the first item from the list$/) do
  @element = @list[0]
end

Then(/^the list should contain (\d+) items$/) do |items|
  expect(@list.items).to eql items.to_i
end

Then(/^each item should contain "(.*?)"$/) do |text|
  @list.each do |item|
    expect(item.text).to include text
  end
end

When(/^I search for the ordered list by "(.*?)" and "(.*?)"$/) do |param1, param2|
  @list = @page.send "ol_#{param1}_#{param2}_element"
end

Then(/^the list items text should be "(.*?)"$/) do |expected_text|
  expect(@element.text).to eql expected_text
end

When(/^I retrieve a ordered list element$/) do
  @element = @page.ol_id_element
end

When(/^I search for the ordered list while the script is executing$/) do
  @list = @page.ordered_list_element(:id => 'ol_id')
end

Then(/^I should see that the ordered list exists$/) do
  expect(@page.ol_id?).to be true
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
druid-ts-1.1.5 features/step_definations/ordered_list_steps.rb
druid-ts-1.1.4 features/step_definations/ordered_list_steps.rb
druid-ts-1.1.3 features/step_definations/ordered_list_steps.rb
druid-ts-1.1.2 features/step_definations/ordered_list_steps.rb