features/step_definitions/projects_steps.rb in wally-0.0.41 vs features/step_definitions/projects_steps.rb in wally-0.0.42

- old
+ new

@@ -4,8 +4,24 @@ Given /^I visit the project page for "([^"]*)"$/ do |project| visit "/projects/#{project}" end +Given /^(\d+) projects exist$/ do |number_of_projects| + number_of_projects.to_i.times do |project_number| + project(project_number + 1) + end +end + Then /^I see a link to the feature "([^"]*)"$/ do |feature| page.should have_link feature +end + +Then /^I can switch to the (\d).+ project$/ do |project_number| + select project_number, :from => 'projects' + + #This is needed because there seems to be a bug in the chrome driver. + #The first time this is called, we get the old url, and the second time we get the new url. + page.current_url + + page.current_url.end_with?(project_number).should be_true end