Skip to content
Browse files

step defs to sort docs in a worklist on the author column and to chec…

…k that the order is correct
  • Loading branch information...
1 parent 0368261 commit 3a5a96c813b41180bb3d7dd3c1350aa6f1126bde @jorahood committed Sep 22, 2011
Showing with 16 additions and 0 deletions.
  1. +16 −0 features/step_definitions/all_steps.rb
16 features/step_definitions/all_steps.rb
@@ -110,6 +110,16 @@ def frame_id
And %{I press "save"}
+Given /^the worklist displays the author column$/ do
+ check('Author:')
+ click_button('save')
+When /^I sort the worklist by author$/ do
+ # see Capybara::Node::Finders#find
+ page.find('th.header', :text => 'Author').click
#with single quotes since we may need double quotes in the string
Given /^(?:|I )fill in "([^"]*)" with '([^']*)'$/ do |field, string|
fill_in(field, :with => string)
@@ -187,3 +197,9 @@ def frame_id
Then /^(?:|I )should see element (.*)$/ do |element|
page.should have_xpath("//#{element}")
+Then /^the documents should appear in this order:$/ do |docs|
+ docs.hashes.each_with_index do |doc, i|
+ steps %{Then I should see "#{doc[:id]}" within "#workListItems tbody tr:nth-child(#{i + 1})"}
+ end

0 comments on commit 3a5a96c

Please sign in to comment.
Something went wrong with that request. Please try again.