Commit 8eec1318503cbd628c505bf8e7fde633fe960174

Authored by Rafael Manzo
1 parent 44ab39dd

Fixed acceptance test for metric result graph

Gemfile.lock
... ... @@ -247,9 +247,9 @@ GEM
247 247 turbolinks (2.2.2)
248 248 coffee-rails
249 249 tzinfo (1.1.0)
250   - thread_safe (~> 0.1)
251 250 execjs (>= 0.3.0)
252 251 json (>= 1.8.0)
  252 + thread_safe (~> 0.1)
253 253 warden (1.2.3)
254 254 rack (>= 1.0)
255 255 websocket-driver (0.3.2)
... ...
features/repository/show/metric_results.feature
... ... @@ -18,7 +18,7 @@ Feature: Repository metric results
18 18 When I visit the repository show page
19 19 And I click the "Metric Results" h3
20 20 And I see a sample metric's name
21   - When I click on the sample metric's name
  21 + And I click on the sample metric's name
22 22 Then I should see "Loading data. Please, wait."
23 23 When I wait up for the ajax request
24 24 Then I should see "There is just a point and it should not be printed into a chart."
... ...
features/step_definitions/repository_steps.rb
... ... @@ -58,12 +58,11 @@ Given(/^I ask for the metric results of the given module result$/) do
58 58 end
59 59  
60 60 Given(/^I see a sample metric's name$/) do
61   - page.save_screenshot("/tmp/picture.png")
62 61 page.should have_content(@metric_results.first.metric_configuration_snapshot.metric.name)
63 62 end
64 63  
65 64 When(/^I click on the sample metric's name$/) do
66   - click_link @metric_results.first.metric_configuration_snapshot.metric.name
  65 + find_link(@metric_results.first.metric_configuration_snapshot.metric.name).trigger('click')
67 66 end
68 67  
69 68 When(/^I set the select field "(.+)" as "(.+)"$/) do |field, text|
... ...