Commit 9a35368c6164421435b1d1d98032b3f26dbde895
Committed by
Paulo Meireles
1 parent
faab6427
Exists in
master
and in
29 other branches
[Mezuro] Fixed repository acceptance tests with a mezuro step
Showing
2 changed files
with
26 additions
and
6 deletions
Show diff stats
features/step_definitions/mezuro_steps.rb
@@ -13,7 +13,7 @@ When /^I create a Mezuro configuration with the following data$/ do |fields| | @@ -13,7 +13,7 @@ When /^I create a Mezuro configuration with the following data$/ do |fields| | ||
13 | click_link ("Mezuro configuration") | 13 | click_link ("Mezuro configuration") |
14 | 14 | ||
15 | fields.rows_hash.each do |name, value| | 15 | fields.rows_hash.each do |name, value| |
16 | - if name != "Clone" | 16 | + if name != "Clone" |
17 | When %{I fill in "#{name}" with "#{value}"} | 17 | When %{I fill in "#{name}" with "#{value}"} |
18 | end | 18 | end |
19 | end | 19 | end |
@@ -94,3 +94,15 @@ When /^I fill the fields with the new following data$/ do |fields| | @@ -94,3 +94,15 @@ When /^I fill the fields with the new following data$/ do |fields| | ||
94 | end | 94 | end |
95 | end | 95 | end |
96 | end | 96 | end |
97 | + | ||
98 | +When /^I have a Mezuro metric configuration with previous created configuration and reading group/ do | ||
99 | + Kalibro::MetricConfiguration.create({ | ||
100 | + :code => 'amloc1', | ||
101 | + :metric => {:name => 'Total Coupling Factor', :compound => "false", :scope => 'SOFTWARE', :language => ['JAVA']}, | ||
102 | + :base_tool_name => "Analizo", | ||
103 | + :weight => "1.0", | ||
104 | + :aggregation_form => 'AVERAGE', | ||
105 | + :reading_group_id => Kalibro::ReadingGroup.all.last.id, | ||
106 | + :configuration_id => Kalibro::Configuration.all.last.id | ||
107 | + }) | ||
108 | +end |
plugins/mezuro/features/repository.feature
1 | +@kalibro_restart | ||
1 | Feature: Repository | 2 | Feature: Repository |
2 | As a Mezuro user | 3 | As a Mezuro user |
3 | I want to create, edit, remove and process a repository | 4 | I want to create, edit, remove and process a repository |
@@ -20,9 +21,13 @@ Feature: Repository | @@ -20,9 +21,13 @@ Feature: Repository | ||
20 | | name | Sample Configuration| | 21 | | name | Sample Configuration| |
21 | | description | Sample Description | | 22 | | description | Sample Description | |
22 | | user | joaosilva | | 23 | | user | joaosilva | |
23 | - And I am on article "Sample Project" | ||
24 | - And I should be on /mycommunity/sample-project | ||
25 | - | 24 | + And I have a Mezuro reading group with the following data |
25 | + | name | Sample Reading group | | ||
26 | + | description | Sample Description | | ||
27 | + | user | joaosilva | | ||
28 | + And I have a Mezuro metric configuration with previous created configuration and reading group | ||
29 | + And I am on article "Sample Project" | ||
30 | + | ||
26 | Scenario: I want to see the Mezuro repository input form | 31 | Scenario: I want to see the Mezuro repository input form |
27 | When I follow "Add Repository" | 32 | When I follow "Add Repository" |
28 | Then I should see "Name" | 33 | Then I should see "Name" |
@@ -34,6 +39,7 @@ Feature: Repository | @@ -34,6 +39,7 @@ Feature: Repository | ||
34 | And I should see "Configuration" | 39 | And I should see "Configuration" |
35 | And I should see "Add" button | 40 | And I should see "Add" button |
36 | 41 | ||
42 | + @selenium | ||
37 | Scenario: I want to add a repository with no name | 43 | Scenario: I want to add a repository with no name |
38 | Given I follow "Add Repository" | 44 | Given I follow "Add Repository" |
39 | When I fill the fields with the new following data | 45 | When I fill the fields with the new following data |
@@ -46,7 +52,8 @@ Feature: Repository | @@ -46,7 +52,8 @@ Feature: Repository | ||
46 | | repository_configuration_id | Sample Configuration | | 52 | | repository_configuration_id | Sample Configuration | |
47 | And I press "Add" | 53 | And I press "Add" |
48 | Then I should see "Please fill all fields marked with (*)." inside an alert | 54 | Then I should see "Please fill all fields marked with (*)." inside an alert |
49 | - | 55 | + |
56 | + @selenium | ||
50 | Scenario: I want to add a repository with no address | 57 | Scenario: I want to add a repository with no address |
51 | Given I follow "Add Repository" | 58 | Given I follow "Add Repository" |
52 | When I fill the fields with the new following data | 59 | When I fill the fields with the new following data |
@@ -60,6 +67,7 @@ Feature: Repository | @@ -60,6 +67,7 @@ Feature: Repository | ||
60 | And I press "Add" | 67 | And I press "Add" |
61 | Then I should see "Please fill all fields marked with (*)." inside an alert | 68 | Then I should see "Please fill all fields marked with (*)." inside an alert |
62 | 69 | ||
70 | + @selenium | ||
63 | Scenario: I want to add a repository with a invalid address for git repository | 71 | Scenario: I want to add a repository with a invalid address for git repository |
64 | Given I follow "Add Repository" | 72 | Given I follow "Add Repository" |
65 | When I fill the fields with the new following data | 73 | When I fill the fields with the new following data |
@@ -74,4 +82,4 @@ Feature: Repository | @@ -74,4 +82,4 @@ Feature: Repository | ||
74 | Then I should see "Address does not match type GIT chosen." inside an alert | 82 | Then I should see "Address does not match type GIT chosen." inside an alert |
75 | 83 | ||
76 | #Scenario: I want to add a repository with valid attributes | 84 | #Scenario: I want to add a repository with valid attributes |
77 | - | 85 | + |