Sha256: d3cbd007d36c972faeabeeacec0d12e7fc80f8aaca2bf00901ec38f4e9510879

Contents?: true

Size: 1.04 KB

Versions: 22

Compression:

Stored size: 1.04 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 "Name"$/ do
  Then %{I should see in this order: A Header, B Header, C 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.4.11 features/step_definitions/sorting_steps.rb
noodall-ui-0.4.10 features/step_definitions/sorting_steps.rb
noodall-ui-0.4.9 features/step_definitions/sorting_steps.rb
noodall-ui-0.4.8 features/step_definitions/sorting_steps.rb
noodall-ui-0.4.7 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.5 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.4 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.3 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.2 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.1 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.0 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.0.pre.10 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.0.pre.9 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.0.pre.8 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.0.pre.7 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.0.pre.6 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.0.pre.5 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.0.pre.4 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.0.pre.3 features/step_definitions/sorting_steps.rb
noodall-ui-0.5.0.pre.2 features/step_definitions/sorting_steps.rb