From 8f05039291edf6117c197fa0ff0d110025241fc9 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Mon, 19 Oct 2015 16:36:34 -0200 Subject: [PATCH] Complete HotspotMetricResult listing acceptance --- features/repository/show/hotspot_metric_results.feature | 5 +++-- features/step_definitions/repository_steps.rb | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/features/repository/show/hotspot_metric_results.feature b/features/repository/show/hotspot_metric_results.feature index edb3d55..775f301 100644 --- a/features/repository/show/hotspot_metric_results.feature +++ b/features/repository/show/hotspot_metric_results.feature @@ -3,7 +3,7 @@ Feature: Repository hotspot metric results As a regular user I should see the hotspot metric results list - @kalibro_configuration_restart @kalibro_processor_restart @javascript @wip + @kalibro_configuration_restart @kalibro_processor_restart @javascript Scenario: Should show the message when the graphic of the given metric has only a single point Given I am a regular user And I am signed in @@ -17,7 +17,8 @@ Feature: Repository hotspot metric results And I ask for the hotspot metric results of the given module result When I visit the repository show page And I click the "Hotspot Metric Results" h3 - Then I should see a list of hotspot metric results + Then I should have at least one hotspot metric result + And I should see the hotspot metric results messages @kalibro_configuration_restart @kalibro_processor_restart @javascript Scenario: Should show the error message when the process fails diff --git a/features/step_definitions/repository_steps.rb b/features/step_definitions/repository_steps.rb index 305b607..4fa21de 100644 --- a/features/step_definitions/repository_steps.rb +++ b/features/step_definitions/repository_steps.rb @@ -223,3 +223,14 @@ end Then(/^I should be at the Repositories index$/) do expect(page.current_path).to end_with(repositories_path) # We use end_with in order to avoid the language route end + +Then(/^I should have at least one hotspot metric result$/) do + expect(@metric_results.count).to be > 0 +end + +Then(/^I should see the hotspot metric results messages$/) do + @metric_results.each do |metric_result| + expect(page).to have_content(metric_result.message) + end +end + -- libgit2 0.21.2