Commit adfced57aec84fd73e3d742fdfc6a4967d753321

Authored by Renan Fichberg
Committed by Rafael Manzo
1 parent f54ae5f3

Initiated acceptance test for metric's graphic.

Also, there are two new steps being worked on.

Signed-off By: Fellipe Souto Sampaio <fllsouto@gmail.com>
features/repository/show.feature
@@ -89,4 +89,17 @@ Feature: Show Repository @@ -89,4 +89,17 @@ Feature: Show Repository
89 And I ask for the module result of the given processing 89 And I ask for the module result of the given processing
90 When I visit the repository show page 90 When I visit the repository show page
91 And I click on the sample child's name 91 And I click on the sample child's name
92 - Then I should see a sample child's name  
93 \ No newline at end of file 92 \ No newline at end of file
  93 + Then I should see a sample child's name
  94 +
  95 + @kalibro_restart @wip
  96 + Scenario: Should show the graphic of a given metric
  97 + Given I am a regular user
  98 + And I am signed in
  99 + And I have a sample project
  100 + And I have a sample configuration with native metrics
  101 + And I have a sample repository within the sample project
  102 + And I start to process that repository
  103 + And I wait up for a ready processing
  104 + And I ask for the last ready processing of the given repository
  105 + And I see a sample metric's name
  106 + When I click on the sample metric's name
94 \ No newline at end of file 107 \ No newline at end of file
features/step_definitions/repository_steps.rb
@@ -47,6 +47,14 @@ Given(/^I ask for the module result of the given processing$/) do @@ -47,6 +47,14 @@ Given(/^I ask for the module result of the given processing$/) do
47 @module_result = ModuleResult.find @processing.results_root_id 47 @module_result = ModuleResult.find @processing.results_root_id
48 end 48 end
49 49
  50 +Given(/^I see a sample metric's name$/) do
  51 + page.should have_content(metric_configuration.metric.name)
  52 +end
  53 +
  54 +When(/^I click on the sample metric's name$/) do
  55 + click_link @metric_configuration.metric.name
  56 +end
  57 +
50 When(/^I set the select field "(.+)" as "(.+)"$/) do |field, text| 58 When(/^I set the select field "(.+)" as "(.+)"$/) do |field, text|
51 select text, from: field 59 select text, from: field
52 end 60 end