Sha256: 1674195d2578e05e7081a56956e86cdd93b875502285131bdbdf4b725fbe7dca

Contents?: true

Size: 1.32 KB

Versions: 26

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)
  Then %{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

26 entries across 26 versions & 1 rubygems

Version Path
noodall-ui-0.4.11 features/step_definitions/draft_steps.rb
noodall-ui-0.4.10 features/step_definitions/draft_steps.rb
noodall-ui-0.4.9 features/step_definitions/draft_steps.rb
noodall-ui-0.4.8 features/step_definitions/draft_steps.rb
noodall-ui-0.4.7 features/step_definitions/draft_steps.rb
noodall-ui-0.5.5 features/step_definitions/draft_steps.rb
noodall-ui-0.5.4 features/step_definitions/draft_steps.rb
noodall-ui-0.5.3 features/step_definitions/draft_steps.rb
noodall-ui-0.5.2 features/step_definitions/draft_steps.rb
noodall-ui-0.5.1 features/step_definitions/draft_steps.rb
noodall-ui-0.5.0 features/step_definitions/draft_steps.rb
noodall-ui-0.5.0.pre.10 features/step_definitions/draft_steps.rb
noodall-ui-0.5.0.pre.9 features/step_definitions/draft_steps.rb
noodall-ui-0.5.0.pre.8 features/step_definitions/draft_steps.rb
noodall-ui-0.5.0.pre.7 features/step_definitions/draft_steps.rb
noodall-ui-0.5.0.pre.6 features/step_definitions/draft_steps.rb
noodall-ui-0.5.0.pre.5 features/step_definitions/draft_steps.rb
noodall-ui-0.5.0.pre.4 features/step_definitions/draft_steps.rb
noodall-ui-0.5.0.pre.3 features/step_definitions/draft_steps.rb
noodall-ui-0.5.0.pre.2 features/step_definitions/draft_steps.rb