Commit 17ee95711baa4b6909eda5b38569de285300641a
Committed by
Rafael Manzo
1 parent
aa7af57c
Exists in
colab
and in
4 other branches
Working on graphic acceptance test.
It seems the local repository processing is not working properly for the acceptance tests. Signed-off By: Guilherme Rojas V. de Lima <guilhermehrojas@gmail.com>
Showing
2 changed files
with
15 additions
and
5 deletions
Show diff stats
features/repository/show.feature
@@ -101,5 +101,9 @@ Feature: Show Repository | @@ -101,5 +101,9 @@ Feature: Show Repository | ||
101 | And I start to process that repository | 101 | And I start to process that repository |
102 | And I wait up for a ready processing | 102 | And I wait up for a ready processing |
103 | And I ask for the last ready processing of the given repository | 103 | And I ask for the last ready processing of the given repository |
104 | + And I ask for the module result of the given processing | ||
105 | + And I ask for the metric results of the given module result | ||
106 | + When I visit the repository show page | ||
104 | And I see a sample metric's name | 107 | And I see a sample metric's name |
105 | - When I click on the sample metric's name | ||
106 | \ No newline at end of file | 108 | \ No newline at end of file |
109 | + When I click on the sample metric's name | ||
110 | + |
features/step_definitions/repository_steps.rb
@@ -8,11 +8,13 @@ Given(/^I have a sample configuration with native metrics$/) do | @@ -8,11 +8,13 @@ Given(/^I have a sample configuration with native metrics$/) do | ||
8 | end | 8 | end |
9 | 9 | ||
10 | Given(/^I have a sample repository within the sample project$/) do | 10 | Given(/^I have a sample repository within the sample project$/) do |
11 | - @repository = FactoryGirl.create(:repository, {project_id: @project.id, configuration_id: @configuration.id, id: nil}) | 11 | + @repository = FactoryGirl.create(:repository, {project_id: @project.id, |
12 | + configuration_id: @configuration.id, id: nil}) | ||
12 | end | 13 | end |
13 | 14 | ||
14 | Given(/^I have a sample repository within the sample project named "(.+)"$/) do |name| | 15 | Given(/^I have a sample repository within the sample project named "(.+)"$/) do |name| |
15 | - @repository = FactoryGirl.create(:repository, {project_id: @project.id, configuration_id: @configuration.id, id: nil, name: name}) | 16 | + @repository = FactoryGirl.create(:repository, {project_id: @project.id, |
17 | + configuration_id: @configuration.id, id: nil, name: name}) | ||
16 | end | 18 | end |
17 | 19 | ||
18 | Given(/^I start to process that repository$/) do | 20 | Given(/^I start to process that repository$/) do |
@@ -47,12 +49,16 @@ Given(/^I ask for the module result of the given processing$/) do | @@ -47,12 +49,16 @@ Given(/^I ask for the module result of the given processing$/) do | ||
47 | @module_result = ModuleResult.find @processing.results_root_id | 49 | @module_result = ModuleResult.find @processing.results_root_id |
48 | end | 50 | end |
49 | 51 | ||
52 | +Given(/^I ask for the metric results of the given module result$/) do | ||
53 | + @metric_results = @module_result.metric_results | ||
54 | +end | ||
55 | + | ||
50 | Given(/^I see a sample metric's name$/) do | 56 | Given(/^I see a sample metric's name$/) do |
51 | - page.should have_content(metric_configuration.metric.name) | 57 | + page.should have_content(@metric_results.first.metric_configuration_snapshot.metric.name) |
52 | end | 58 | end |
53 | 59 | ||
54 | When(/^I click on the sample metric's name$/) do | 60 | When(/^I click on the sample metric's name$/) do |
55 | - click_link @metric_configuration.metric.name | 61 | + click_link @metric_results.first.metric_configuration_snapshot.metric.name |
56 | end | 62 | end |
57 | 63 | ||
58 | When(/^I set the select field "(.+)" as "(.+)"$/) do |field, text| | 64 | When(/^I set the select field "(.+)" as "(.+)"$/) do |field, text| |