Sha256: 0f5a505affd20f0063c0a3873ca9ec0e8d94cf0fc9252ee00b0536adde058998

Contents?: true

Size: 1.05 KB

Versions: 22

Compression:

Stored size: 1.05 KB

Contents

Given /^some nodes exist$/ do 
  Time.stub!(:now).and_return(Time.parse("01/01/2010 13:37"))
  f = Factory.build(:node)
  f.title = "A Header"
  f.save
  
  Time.stub!(:now).and_return(Time.parse("01/01/2010 14:37"))
  f = Factory.build(:node)
  f.title = "B Header"
  f.save
  
  Time.stub!(:now).and_return(Time.parse("01/01/2010 15:37"))
  f = Factory.build(:page_a)
  f.title = "C Header"
  f.save
  
end

Then /^the nodes should be ordered by "Title"$/ do
  Then %{I should see in this order: C Header, B Header, A Header}
end


Then /^the nodes should be ordered by "Type"$/ do
  Then %{I should see in this order: Page A, Noodall/Node, Noodall/Node}
end


Then /^the nodes should be ordered by "Updated"$/ do
  Then %{I should see in this order: 15:37:00, 14:37:00, 13:37:00 }
end

Then /^(?:|I )should see in this order(?: within "([^\"]*)")?: (.*)$/ do |selector, text|
  order = Regexp.new(text.gsub(', ', '.*'), Regexp::MULTILINE)

  with_scope(selector) do
    raise "Did not find keywords (#{text}) in the requested order!" unless page.body =~ order
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
noodall-ui-0.3.20 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.19 features/step_definitions/sorting_steps.rb
noodall-ui-0.4.5 features/step_definitions/sorting_steps.rb
noodall-ui-0.4.4 features/step_definitions/sorting_steps.rb
noodall-ui-0.4.1 features/step_definitions/sorting_steps.rb
noodall-ui-0.4.0 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.17 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.16 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.15 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.14 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.13 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.12 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.11 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.8 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.7 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.6 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.5 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.4 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.3 features/step_definitions/sorting_steps.rb
noodall-ui-0.3.2 features/step_definitions/sorting_steps.rb