From 8eec1318503cbd628c505bf8e7fde633fe960174 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Tue, 22 Apr 2014 21:05:31 -0300 Subject: [PATCH] Fixed acceptance test for metric result graph --- Gemfile.lock | 2 +- features/repository/show/metric_results.feature | 2 +- features/step_definitions/repository_steps.rb | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9d190d0..d8a7a7b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -247,9 +247,9 @@ GEM turbolinks (2.2.2) coffee-rails tzinfo (1.1.0) - thread_safe (~> 0.1) execjs (>= 0.3.0) json (>= 1.8.0) + thread_safe (~> 0.1) warden (1.2.3) rack (>= 1.0) websocket-driver (0.3.2) diff --git a/features/repository/show/metric_results.feature b/features/repository/show/metric_results.feature index 8878641..0676ffb 100644 --- a/features/repository/show/metric_results.feature +++ b/features/repository/show/metric_results.feature @@ -18,7 +18,7 @@ Feature: Repository metric results When I visit the repository show page And I click the "Metric Results" h3 And I see a sample metric's name - When I click on the sample metric's name + And I click on the sample metric's name Then I should see "Loading data. Please, wait." When I wait up for the ajax request Then I should see "There is just a point and it should not be printed into a chart." diff --git a/features/step_definitions/repository_steps.rb b/features/step_definitions/repository_steps.rb index 35129df..ff2ec67 100644 --- a/features/step_definitions/repository_steps.rb +++ b/features/step_definitions/repository_steps.rb @@ -58,12 +58,11 @@ Given(/^I ask for the metric results of the given module result$/) do end Given(/^I see a sample metric's name$/) do - page.save_screenshot("/tmp/picture.png") page.should have_content(@metric_results.first.metric_configuration_snapshot.metric.name) end When(/^I click on the sample metric's name$/) do - click_link @metric_results.first.metric_configuration_snapshot.metric.name + find_link(@metric_results.first.metric_configuration_snapshot.metric.name).trigger('click') end When(/^I set the select field "(.+)" as "(.+)"$/) do |field, text| -- libgit2 0.21.2