Commit d4d5dea2759a011b02505a864b82f014ec793533
1 parent
5addb278
Exists in
master
and in
28 other branches
edit-environment-templates-feature: follow exact match to avoid random failures
Showing
2 changed files
with
10 additions
and
4 deletions
Show diff stats
features/edit_environment_templates.feature
... | ... | @@ -18,25 +18,25 @@ Feature: edit environment templates |
18 | 18 | @selenium |
19 | 19 | Scenario: Go to control panel of person template |
20 | 20 | Given I follow "Profile templates" |
21 | - And I follow "Person template" | |
21 | + And I follow exact "Person template" | |
22 | 22 | Then I should be on colivre.net_person_template's control panel |
23 | 23 | |
24 | 24 | @selenium |
25 | 25 | Scenario: Go to control panel of enterprise template |
26 | 26 | Given I follow "Profile templates" |
27 | - And I follow "Enterprise template" | |
27 | + And I follow exact "Enterprise template" | |
28 | 28 | Then I should be on colivre.net_enterprise_template's control panel |
29 | 29 | |
30 | 30 | @selenium |
31 | 31 | Scenario: Go to control panel of inactive enterprise template |
32 | 32 | Given I follow "Profile templates" |
33 | - And I follow "Inactive Enterprise template" | |
33 | + And I follow exact "Inactive Enterprise template" | |
34 | 34 | Then I should be on colivre.net_inactive_enterprise_template's control panel |
35 | 35 | |
36 | 36 | @selenium |
37 | 37 | Scenario: Go to control panel of community template |
38 | 38 | Given I follow "Profile templates" |
39 | - When I follow "Community template" | |
39 | + When I follow exact "Community template" | |
40 | 40 | Then I should be on colivre.net_community_template's control panel |
41 | 41 | |
42 | 42 | @selenium | ... | ... |
features/step_definitions/web_steps.rb
... | ... | @@ -247,3 +247,9 @@ end |
247 | 247 | Then /^there should be a div with class "([^"]*)"$/ do |klass| |
248 | 248 | should have_selector('div', :class => klass) |
249 | 249 | end |
250 | + | |
251 | +When /^(?:|I )follow exact "([^"]*)"(?: within "([^"]*)")?$/ do |link, selector| | |
252 | + with_scope(selector) do | |
253 | + find("a", :text => /\A#{link}\z/).click | |
254 | + end | |
255 | +end | ... | ... |