From 96f365d5e3bc2d9bd77346b0d1bf475d86e790f4 Mon Sep 17 00:00:00 2001 From: Ion Biziiac Date: Mon, 19 May 2014 11:04:29 +0300 Subject: [PATCH] Fix the failing cukes in project_creation_with_type.feature --- features/project_types/project_creation_with_type.feature | 2 +- features/step_definitions/web_steps.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/features/project_types/project_creation_with_type.feature b/features/project_types/project_creation_with_type.feature index 44080ddc95..dac8488af3 100644 --- a/features/project_types/project_creation_with_type.feature +++ b/features/project_types/project_creation_with_type.feature @@ -46,7 +46,7 @@ Feature: Project creation with support for project type Scenario: The admin may create a project with a project type Given I am already admin When I go to the admin page - And I follow "Projects" + And I follow the first link matching "Projects" And I follow "New project" Then I fill in "Fancy Pants" for "Name" And I fill in "fancy-pants" for "Identifier" diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index 1bee1dd168..fdeb83b199 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -435,6 +435,10 @@ When /^(?:|I )click on the first button matching "([^"]*)"$/ do |button| first(:button, button).click end +When /^(?:|I )follow the first link matching "([^"]*)"$/ do |link| + first(:link, link).click +end + def find_lowest_containing_element text, selector elements = []