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 | 13 | click_link ("Mezuro configuration") |
14 | 14 | |
15 | 15 | fields.rows_hash.each do |name, value| |
16 | - if name != "Clone" | |
16 | + if name != "Clone" | |
17 | 17 | When %{I fill in "#{name}" with "#{value}"} |
18 | 18 | end |
19 | 19 | end |
... | ... | @@ -94,3 +94,15 @@ When /^I fill the fields with the new following data$/ do |fields| |
94 | 94 | end |
95 | 95 | end |
96 | 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 | 2 | Feature: Repository |
2 | 3 | As a Mezuro user |
3 | 4 | I want to create, edit, remove and process a repository |
... | ... | @@ -20,9 +21,13 @@ Feature: Repository |
20 | 21 | | name | Sample Configuration| |
21 | 22 | | description | Sample Description | |
22 | 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 | 31 | Scenario: I want to see the Mezuro repository input form |
27 | 32 | When I follow "Add Repository" |
28 | 33 | Then I should see "Name" |
... | ... | @@ -34,6 +39,7 @@ Feature: Repository |
34 | 39 | And I should see "Configuration" |
35 | 40 | And I should see "Add" button |
36 | 41 | |
42 | + @selenium | |
37 | 43 | Scenario: I want to add a repository with no name |
38 | 44 | Given I follow "Add Repository" |
39 | 45 | When I fill the fields with the new following data |
... | ... | @@ -46,7 +52,8 @@ Feature: Repository |
46 | 52 | | repository_configuration_id | Sample Configuration | |
47 | 53 | And I press "Add" |
48 | 54 | Then I should see "Please fill all fields marked with (*)." inside an alert |
49 | - | |
55 | + | |
56 | + @selenium | |
50 | 57 | Scenario: I want to add a repository with no address |
51 | 58 | Given I follow "Add Repository" |
52 | 59 | When I fill the fields with the new following data |
... | ... | @@ -60,6 +67,7 @@ Feature: Repository |
60 | 67 | And I press "Add" |
61 | 68 | Then I should see "Please fill all fields marked with (*)." inside an alert |
62 | 69 | |
70 | + @selenium | |
63 | 71 | Scenario: I want to add a repository with a invalid address for git repository |
64 | 72 | Given I follow "Add Repository" |
65 | 73 | When I fill the fields with the new following data |
... | ... | @@ -74,4 +82,4 @@ Feature: Repository |
74 | 82 | Then I should see "Address does not match type GIT chosen." inside an alert |
75 | 83 | |
76 | 84 | #Scenario: I want to add a repository with valid attributes |
77 | - | |
85 | + | ... | ... |