Commit 646114cab32ea8e256503b25020007c1d3d338ca

Authored by Beatriz Rezener
1 parent 49023ea1

Generalizing click show link step #128.

Signed-off-by:Beatriz Rezener <beatrizrezener@gmail.com>
Signed-off-by:Joao Gabriel <joaogabrieldebrittoesilva@gmail.com>
features/compound_metric_configuration/create.feature
@@ -24,7 +24,7 @@ Feature: Compound Metric Configuration Creation @@ -24,7 +24,7 @@ Feature: Compound Metric Configuration Creation
24 And I set the select field "Scope" as "Class" 24 And I set the select field "Scope" as "Class"
25 And I set the select field "Reading Group" as "Scholar" 25 And I set the select field "Reading Group" as "Scholar"
26 And I press the Save button 26 And I press the Save button
27 - When I click the show link of the Coumpound Metric 27 + When I click the show link of "My Compound Metric"
28 Then I should see "My Compound Metric" 28 Then I should see "My Compound Metric"
29 And I should see "mcm" 29 And I should see "mcm"
30 And I should see "8" 30 And I should see "8"
features/step_definitions/compound_metric_configuration_steps.rb
@@ -22,8 +22,8 @@ When(/^I click the edit link of the Coumpound Metric$/) do @@ -22,8 +22,8 @@ When(/^I click the edit link of the Coumpound Metric$/) do
22 page.find('tr', :text => @compound_metric_configuration.metric.name).click_link('Edit') 22 page.find('tr', :text => @compound_metric_configuration.metric.name).click_link('Edit')
23 end 23 end
24 24
25 -When(/^I click the show link of the Coumpound Metric$/) do  
26 - page.find('tr', :text => "My Compound Metric").click_link('Show') 25 +When(/^I click the show link of "(.*?)"$/) do |name|
  26 + page.find('tr', :text => name).click_link('Show')
27 end 27 end
28 28
29 Then(/^I should be at compound metric configuration sample page$/) do 29 Then(/^I should be at compound metric configuration sample page$/) do