Sha256: 34739da3beed19e7c63c4e720e4d691d921e35c009befd4201d3ca7af0f3c75d

Contents?: true

Size: 1.32 KB

Versions: 10

Compression:

Stored size: 1.32 KB

Contents

Given /^I make some changes$/ do
  fill_in 'Title', :with => 'A new version'
end

Then /^the live page should be at version (\d+)$/ do |version|
  @_content = Noodall::Node.find(@_content.id) # Reload the model to remove memoized versions (reload does not do this)
  visit node_path(@_content)
  version = @_content.version_at(version.to_i)
  page.should have_content(version.content(:title))
end

Then /^the form should contain version (\d+)$/ do |version|
  @_content = Noodall::Node.find(@_content.id) # Reload the model to remove memoized versions (reload does not do this)
  version = @_content.version_at(version.to_i)
  step %{the "Title" field should contain "#{version.content(:title)}"}
end

Then /^I should see a list of previous versions$/ do
  page.should have_css("table#versions-list tr", :count => @_content.all_versions.count)
end

When /^I follow "([^"]*)" within version (\d+)$/ do |link_name, version_number|
  within "tr:contains('Version #{version_number}')" do
    click_link link_name
  end
end

Given /^content exists with several versions$/ do
  @_content = Factory(:page_a)
  3.times do |i|
    @_content.title = "Title #{i}"
    @_content.save
  end
end

Then /^I should see version (\d+) of the content$/ do |version|
  version = @_content.version_at(version.to_i)
  page.should have_content(version.content(:title))
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
noodall-ui-0.5.15 features/step_definitions/draft_steps.rb
noodall-ui-0.5.14 features/step_definitions/draft_steps.rb
noodall-ui-0.5.13 features/step_definitions/draft_steps.rb
noodall-ui-0.5.12 features/step_definitions/draft_steps.rb
noodall-ui-0.5.11 features/step_definitions/draft_steps.rb
noodall-ui-0.5.10 features/step_definitions/draft_steps.rb
noodall-ui-0.5.9 features/step_definitions/draft_steps.rb
noodall-ui-0.5.8 features/step_definitions/draft_steps.rb
noodall-ui-0.5.7 features/step_definitions/draft_steps.rb
noodall-ui-0.5.6 features/step_definitions/draft_steps.rb