diff --git a/features/edit_environment_templates.feature b/features/edit_environment_templates.feature index d58abe0..46a9a99 100644 --- a/features/edit_environment_templates.feature +++ b/features/edit_environment_templates.feature @@ -18,25 +18,25 @@ Feature: edit environment templates @selenium Scenario: Go to control panel of person template Given I follow "Profile templates" - And I follow "Person template" + And I follow exact "Person template" Then I should be on colivre.net_person_template's control panel @selenium Scenario: Go to control panel of enterprise template Given I follow "Profile templates" - And I follow "Enterprise template" + And I follow exact "Enterprise template" Then I should be on colivre.net_enterprise_template's control panel @selenium Scenario: Go to control panel of inactive enterprise template Given I follow "Profile templates" - And I follow "Inactive Enterprise template" + And I follow exact "Inactive Enterprise template" Then I should be on colivre.net_inactive_enterprise_template's control panel @selenium Scenario: Go to control panel of community template Given I follow "Profile templates" - When I follow "Community template" + When I follow exact "Community template" Then I should be on colivre.net_community_template's control panel @selenium diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index 271358a..a8954d2 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -247,3 +247,9 @@ end Then /^there should be a div with class "([^"]*)"$/ do |klass| should have_selector('div', :class => klass) end + +When /^(?:|I )follow exact "([^"]*)"(?: within "([^"]*)")?$/ do |link, selector| + with_scope(selector) do + find("a", :text => /\A#{link}\z/).click + end +end -- libgit2 0.21.2