Commit bc18aab85cb0258427846e5118c33e779342b26f
Committed by
Rafael Manzo
1 parent
f4e8e073
Exists in
colab
and in
4 other branches
Minor fixes and removed @wip from repository date select feature
Repository metric results waiting for kalibro configurations integration Signed off by: Daniel Paulino Alves <danpaulalves@gmail.com>
Showing
15 changed files
with
50 additions
and
66 deletions
Show diff stats
app/helpers/kalibro_ranges_helper.rb
features/kalibro_range/create.feature
1 | -Feature: Create range | |
2 | - In order to be able to create new ranges | |
1 | +Feature: Create Kalibro Range | |
2 | + In order to be able to create new kalibro ranges | |
3 | 3 | As a metric specialist |
4 | 4 | I should be able to fill up a form with its informations and submit it |
5 | 5 | |
6 | 6 | @kalibro_configuration_restart |
7 | - Scenario: Visiting range creation page when the user own an non-empty reading group | |
7 | + Scenario: Visiting kalibro range creation page when the user owns a non-empty reading group | |
8 | 8 | Given I am a regular user |
9 | 9 | And I am signed in |
10 | 10 | And I own a sample configuration |
... | ... | @@ -20,7 +20,7 @@ Feature: Create range |
20 | 20 | And I should see "Reading" |
21 | 21 | |
22 | 22 | @kalibro_configuration_restart |
23 | - Scenario: Visiting range creation page when the user don't own the reading group and this reading group is empty | |
23 | + Scenario: Visiting kalibro range creation page when the user doesn't own the reading group and this reading group is empty | |
24 | 24 | Given I am a regular user |
25 | 25 | And I am signed in |
26 | 26 | And I own a sample configuration |
... | ... | @@ -36,7 +36,7 @@ Feature: Create range |
36 | 36 | And I should see "The Reading Group of your Metric Configuration belongs to another user and you are not allowed to modify it." |
37 | 37 | |
38 | 38 | @kalibro_configuration_restart |
39 | - Scenario: Visiting range creation page when the user own an empty reading group (testing link to New Reading) | |
39 | + Scenario: Visiting kalibro range creation page when the user owns an empty reading group (testing link to New Reading) | |
40 | 40 | Given I am a regular user |
41 | 41 | And I am signed in |
42 | 42 | And I own a sample configuration |
... | ... | @@ -90,7 +90,7 @@ Feature: Create range |
90 | 90 | And I should see "[666.0, 42.0[ is not a valid range" |
91 | 91 | |
92 | 92 | @kalibro_configuration_restart |
93 | - Scenario: With an invalid beggining (not a number) | |
93 | + Scenario: With an invalid beginning (not a number) | |
94 | 94 | Given I am a regular user |
95 | 95 | And I am signed in |
96 | 96 | And I own a sample configuration |
... | ... | @@ -143,7 +143,7 @@ Feature: Create range |
143 | 143 | And I should see "Beginning There is already a KalibroRange with beginning 2.0! Please, choose another one." |
144 | 144 | |
145 | 145 | @kalibro_configuration_restart @javascript |
146 | - Scenario: Should create range with [-INF, INF] threshold | |
146 | + Scenario: Should create a kalibro range with [-INF, INF] threshold | |
147 | 147 | Given I am a regular user |
148 | 148 | And I am signed in |
149 | 149 | And I own a sample configuration |
... | ... | @@ -161,7 +161,7 @@ Feature: Create range |
161 | 161 | And I should see "INF" |
162 | 162 | |
163 | 163 | @kalibro_configuration_restart @javascript |
164 | - Scenario: Two valid ranges (one with INF) | |
164 | + Scenario: Two valid kalibro ranges (one with INF) | |
165 | 165 | Given I am a regular user |
166 | 166 | And I am signed in |
167 | 167 | And I own a sample configuration |
... | ... | @@ -182,4 +182,4 @@ Feature: Create range |
182 | 182 | When I press the Save button |
183 | 183 | Then I should be at metric configuration sample page |
184 | 184 | And I should see "666" |
185 | - And I should see "INF" | |
186 | 185 | \ No newline at end of file |
186 | + And I should see "INF" | ... | ... |
features/kalibro_range/deletion.feature
1 | -Feature: Range Deletion | |
2 | - In order to be able to remove a range | |
1 | +Feature: Kalibro Range Deletion | |
2 | + In order to be able to remove a kalibro range | |
3 | 3 | As a regular user |
4 | 4 | The system should have an interface to it |
5 | 5 | |
6 | 6 | @kalibro_configuration_restart |
7 | - Scenario: Should delete a range that I own | |
7 | + Scenario: Should delete a kalibro range that I own | |
8 | 8 | Given I am a regular user |
9 | 9 | And I am signed in |
10 | 10 | And I own a sample configuration |
... | ... | @@ -18,7 +18,7 @@ Feature: Range Deletion |
18 | 18 | And I should see "There are no Ranges yet!" |
19 | 19 | |
20 | 20 | @kalibro_configuration_restart |
21 | - Scenario: Should not see the destroy range link in the range that I not own | |
21 | + Scenario: Should not see the destroy kalibro range link in the kalibro range that I do not own | |
22 | 22 | Given I am a regular user |
23 | 23 | And I am signed in |
24 | 24 | And I have a sample configuration | ... | ... |
features/kalibro_range/edit.feature
features/repository/show/date_select.feature
... | ... | @@ -3,12 +3,13 @@ Feature: Date Select |
3 | 3 | As a regular user |
4 | 4 | I should be able to select a specific date |
5 | 5 | |
6 | - @kalibro_configuration_restart @kalibro_processor_restart @javascript @wip | |
6 | + @kalibro_configuration_restart @kalibro_processor_restart @javascript | |
7 | 7 | Scenario: With a specific date selected |
8 | 8 | Given I have a sample project |
9 | 9 | And I have a sample configuration with native metrics |
10 | 10 | And I have a sample repository within the sample project |
11 | 11 | And I start to process that repository |
12 | + And I wait for "60" seconds | |
12 | 13 | And I wait up for a ready processing |
13 | 14 | And I start to process that repository |
14 | 15 | And I wait up for the last processing to get ready |
... | ... | @@ -18,11 +19,10 @@ Feature: Date Select |
18 | 19 | And I set the select field "month" as "1" |
19 | 20 | And I set the select field "year" as "2013" |
20 | 21 | And I press the Search button |
21 | - And I wait for "60" seconds | |
22 | 22 | And I get the Creation date information as "before" |
23 | 23 | When I set the select field "day" as "1" |
24 | 24 | And I set the select field "month" as "1" |
25 | 25 | And I set the select field "year" as "2020" |
26 | 26 | And I press the Search button |
27 | 27 | And I get the Creation date information as "after" |
28 | - Then "before" should be less than "after" | |
29 | 28 | \ No newline at end of file |
29 | + Then "before" should be lesser than "after" | ... | ... |
features/repository/show/metric_results.feature
... | ... | @@ -4,7 +4,7 @@ Feature: Repository metric results |
4 | 4 | I should see the metric results table with its graphics |
5 | 5 | |
6 | 6 | @kalibro_configuration_restart @kalibro_processor_restart @javascript @wip |
7 | - Scenario: Should show the message when the graphic of the given metric have only a single point | |
7 | + Scenario: Should show the message when the graphic of the given metric has only a single point | |
8 | 8 | Given I am a regular user |
9 | 9 | And I am signed in |
10 | 10 | And I have a sample project |
... | ... | @@ -24,7 +24,7 @@ Feature: Repository metric results |
24 | 24 | Then I should see "There is only one point and it will not be printed into a chart." |
25 | 25 | |
26 | 26 | @kalibro_configuration_restart @kalibro_processor_restart @javascript |
27 | - Scenario: Should show the no range message after a process without range | |
27 | + Scenario: Should show no range message after a process without range | |
28 | 28 | Given I am a regular user |
29 | 29 | And I am signed in |
30 | 30 | And I have a sample project | ... | ... |
features/step_definitions/repository_steps.rb
... | ... | @@ -41,36 +41,20 @@ Given(/^I start to process that repository$/) do |
41 | 41 | end |
42 | 42 | |
43 | 43 | Given(/^I wait up for a ready processing$/) do |
44 | - unless Processing.has_ready_processing(@repository.id) | |
45 | - while(true) | |
46 | - if Processing.has_ready_processing(@repository.id) | |
47 | - break | |
48 | - else | |
49 | - sleep(10) | |
50 | - end | |
51 | - end | |
44 | + while !Processing.has_ready_processing(@repository.id) | |
45 | + sleep(10) | |
52 | 46 | end |
53 | 47 | end |
54 | 48 | |
55 | 49 | Given(/^I wait up for the last processing to get ready$/) do |
56 | - while(true) | |
57 | - if Processing.last_processing_of(@repository.id).state == "READY" | |
58 | - break | |
59 | - else | |
60 | - sleep(10) | |
61 | - end | |
50 | + while Processing.last_processing_of(@repository.id).state != "READY" | |
51 | + sleep(10) | |
62 | 52 | end |
63 | 53 | end |
64 | 54 | |
65 | 55 | Given(/^I wait up for a error processing$/) do |
66 | - unless Processing.last_processing_state_of(@repository.id) == "ERROR" | |
67 | - while(true) | |
68 | - if Processing.last_processing_state_of(@repository.id) == "ERROR" | |
69 | - break | |
70 | - else | |
71 | - sleep(10) | |
72 | - end | |
73 | - end | |
56 | + while Processing.last_processing_state_of(@repository.id) != "ERROR" | |
57 | + sleep(10) | |
74 | 58 | end |
75 | 59 | end |
76 | 60 | |
... | ... | @@ -183,7 +167,7 @@ Then(/^I should see the saved repository's content$/) do |
183 | 167 | expect(page).to have_content(@kalibro_configuration.name) |
184 | 168 | end |
185 | 169 | |
186 | -Then(/^"(.*?)" should be less than "(.*?)"$/) do |arg1, arg2| | |
170 | +Then(/^"(.*?)" should be lesser than "(.*?)"$/) do |arg1, arg2| | |
187 | 171 | v1 = eval "@#{arg1}" |
188 | 172 | v2 = eval "@#{arg2}" |
189 | 173 | ... | ... |
spec/controllers/base_metric_configurations_controller_spec.rb
... | ... | @@ -75,7 +75,7 @@ describe InheritsFromBaseMetricConfigurationsController, :type => :controller do |
75 | 75 | it { is_expected.to respond_with(:success) } |
76 | 76 | end |
77 | 77 | |
78 | - context "when the current user doesn't owns the kalibro configuration" do | |
78 | + context "when the current user doesn't own the kalibro configuration" do | |
79 | 79 | before :each do |
80 | 80 | get :new, kalibro_configuration_id: kalibro_configuration.id |
81 | 81 | end | ... | ... |
spec/controllers/compound_metric_configurations_controller_spec.rb
... | ... | @@ -20,7 +20,7 @@ describe CompoundMetricConfigurationsController, :type => :controller do |
20 | 20 | it { is_expected.to render_template(:new) } |
21 | 21 | end |
22 | 22 | |
23 | - context "when the current user doesn't owns the kalibro configuration" do | |
23 | + context "when the current user doesn't own the kalibro configuration" do | |
24 | 24 | before :each do |
25 | 25 | get :new, kalibro_configuration_id: kalibro_configuration.id |
26 | 26 | end |
... | ... | @@ -88,7 +88,7 @@ describe CompoundMetricConfigurationsController, :type => :controller do |
88 | 88 | describe 'edit' do |
89 | 89 | let(:compound_metric_configuration) { FactoryGirl.build(:compound_metric_configuration_with_id) } |
90 | 90 | |
91 | - context 'with an User logged in' do | |
91 | + context 'with a User logged in' do | |
92 | 92 | before do |
93 | 93 | sign_in FactoryGirl.create(:user) |
94 | 94 | end | ... | ... |
spec/controllers/kalibro_ranges_controller_spec.rb
... | ... | @@ -23,7 +23,7 @@ describe KalibroRangesController, :type => :controller do |
23 | 23 | it { is_expected.to render_template(:new) } |
24 | 24 | end |
25 | 25 | |
26 | - context "when the current user doesn't owns the metric configuration" do | |
26 | + context "when the current user doesn't own the metric configuration" do | |
27 | 27 | before :each do |
28 | 28 | get :new, kalibro_configuration_id: kalibro_configuration.id, metric_configuration_id: kalibro_range.metric_configuration_id |
29 | 29 | end |
... | ... | @@ -41,7 +41,7 @@ describe KalibroRangesController, :type => :controller do |
41 | 41 | sign_in FactoryGirl.create(:user) |
42 | 42 | end |
43 | 43 | |
44 | - context 'when the current user owns the mezuro range' do | |
44 | + context 'when the current user owns the kalibro range' do | |
45 | 45 | before :each do |
46 | 46 | subject.expects(:metric_configuration_owner?).returns true |
47 | 47 | end |
... | ... | @@ -113,12 +113,12 @@ describe KalibroRangesController, :type => :controller do |
113 | 113 | let(:kalibro_range) { FactoryGirl.build(:kalibro_range_with_id, metric_configuration_id: metric_configuration.id) } |
114 | 114 | let(:reading) { FactoryGirl.build(:reading_with_id, reading_group_id: metric_configuration.reading_group_id) } |
115 | 115 | |
116 | - context 'with an User logged in' do | |
116 | + context 'with a User logged in' do | |
117 | 117 | before do |
118 | 118 | sign_in FactoryGirl.create(:user) |
119 | 119 | end |
120 | 120 | |
121 | - context 'when the user owns the mezuro range' do | |
121 | + context 'when the user owns the kalibro range' do | |
122 | 122 | before :each do |
123 | 123 | subject.expects(:metric_configuration_owner?).returns true |
124 | 124 | subject.expects(:find_resource).with(KalibroRange, kalibro_range.id).returns(kalibro_range) |
... | ... | @@ -130,7 +130,7 @@ describe KalibroRangesController, :type => :controller do |
130 | 130 | it { is_expected.to render_template(:edit) } |
131 | 131 | end |
132 | 132 | |
133 | - context 'when the user does not own the mezuro range' do | |
133 | + context 'when the user does not own the kalibro range' do | |
134 | 134 | let!(:reading_group) { FactoryGirl.build(:reading_group, id: metric_configuration.reading_group_id) } |
135 | 135 | |
136 | 136 | before do |
... | ... | @@ -163,7 +163,7 @@ describe KalibroRangesController, :type => :controller do |
163 | 163 | sign_in FactoryGirl.create(:user) |
164 | 164 | end |
165 | 165 | |
166 | - context 'when user owns the mezuro range' do | |
166 | + context 'when user owns the kalibro range' do | |
167 | 167 | before :each do |
168 | 168 | subject.expects(:metric_configuration_owner?).returns true |
169 | 169 | end |
... | ... | @@ -194,7 +194,7 @@ describe KalibroRangesController, :type => :controller do |
194 | 194 | end |
195 | 195 | end |
196 | 196 | |
197 | - context 'when the user does not own the mezuro range' do | |
197 | + context 'when the user does not own the kalibro range' do | |
198 | 198 | before :each do |
199 | 199 | post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_range: kalibro_range_params |
200 | 200 | end | ... | ... |
spec/controllers/metric_configurations_controller_spec.rb
1 | 1 | require 'rails_helper' |
2 | 2 | |
3 | 3 | describe MetricConfigurationsController, :type => :controller do |
4 | - let!(:kalibro_configuration) { FactoryGirl.build(:kalibro_configuration_with_id) } | |
4 | + let(:kalibro_configuration) { FactoryGirl.build(:kalibro_configuration_with_id) } | |
5 | 5 | describe 'choose_metric' do |
6 | 6 | let(:metric_collector) { FactoryGirl.build(:metric_collector) } |
7 | 7 | before :each do |
... | ... | @@ -40,7 +40,7 @@ describe MetricConfigurationsController, :type => :controller do |
40 | 40 | it { is_expected.to render_template(:new) } |
41 | 41 | end |
42 | 42 | |
43 | - context "when the current user doesn't owns the kalibro configuration" do | |
43 | + context "when the current user doesn't own the kalibro configuration" do | |
44 | 44 | before :each do |
45 | 45 | post :new, kalibro_configuration_id: kalibro_configuration.id, metric_name: "Lines of Code", metric_collector_name: metric_collector.name |
46 | 46 | end |
... | ... | @@ -109,7 +109,7 @@ describe MetricConfigurationsController, :type => :controller do |
109 | 109 | describe 'edit' do |
110 | 110 | let(:metric_configuration) { FactoryGirl.build(:metric_configuration_with_id) } |
111 | 111 | |
112 | - context 'with an User logged in' do | |
112 | + context 'with a User logged in' do | |
113 | 113 | before do |
114 | 114 | sign_in FactoryGirl.create(:user) |
115 | 115 | end |
... | ... | @@ -196,7 +196,7 @@ describe MetricConfigurationsController, :type => :controller do |
196 | 196 | describe 'destroy' do |
197 | 197 | let(:metric_configuration) { FactoryGirl.build(:metric_configuration_with_id) } |
198 | 198 | |
199 | - context 'with an User logged in' do | |
199 | + context 'with a User logged in' do | |
200 | 200 | before do |
201 | 201 | sign_in FactoryGirl.create(:user) |
202 | 202 | end | ... | ... |
spec/controllers/projects_controller_spec.rb
... | ... | @@ -88,7 +88,7 @@ describe ProjectsController, :type => :controller do |
88 | 88 | @subject = FactoryGirl.build(:project_with_id) |
89 | 89 | end |
90 | 90 | |
91 | - context 'with an User logged in' do | |
91 | + context 'with a User logged in' do | |
92 | 92 | before do |
93 | 93 | sign_in FactoryGirl.create(:user) |
94 | 94 | @ownership = FactoryGirl.build(:project_ownership) | ... | ... |
spec/controllers/reading_groups_controller_spec.rb
... | ... | @@ -74,7 +74,7 @@ describe ReadingGroupsController, :type => :controller do |
74 | 74 | @subject = FactoryGirl.build(:reading_group_with_id) |
75 | 75 | end |
76 | 76 | |
77 | - context 'with an User logged in' do | |
77 | + context 'with a User logged in' do | |
78 | 78 | before do |
79 | 79 | sign_in FactoryGirl.create(:user) |
80 | 80 | @ownership = FactoryGirl.build(:reading_group_ownership) |
... | ... | @@ -140,7 +140,7 @@ describe ReadingGroupsController, :type => :controller do |
140 | 140 | @subject = FactoryGirl.build(:reading_group_with_id) |
141 | 141 | end |
142 | 142 | |
143 | - context 'with an User logged in' do | |
143 | + context 'with a User logged in' do | |
144 | 144 | before do |
145 | 145 | @user = FactoryGirl.create(:user) |
146 | 146 | @ownership = FactoryGirl.build(:reading_group_ownership) | ... | ... |
spec/controllers/readings_controller_spec.rb
... | ... | @@ -66,7 +66,7 @@ describe ReadingsController, :type => :controller do |
66 | 66 | describe 'edit' do |
67 | 67 | let(:reading) { FactoryGirl.build(:reading_with_id) } |
68 | 68 | |
69 | - context 'with an User logged in' do | |
69 | + context 'with a User logged in' do | |
70 | 70 | before do |
71 | 71 | sign_in FactoryGirl.create(:user) |
72 | 72 | end |
... | ... | @@ -160,7 +160,7 @@ describe ReadingsController, :type => :controller do |
160 | 160 | describe 'destroy' do |
161 | 161 | let(:reading) { FactoryGirl.build(:reading_with_id) } |
162 | 162 | |
163 | - context 'with an User logged in' do | |
163 | + context 'with a User logged in' do | |
164 | 164 | before do |
165 | 165 | sign_in FactoryGirl.create(:user) |
166 | 166 | end | ... | ... |
spec/controllers/repositories_controller_spec.rb
... | ... | @@ -4,7 +4,7 @@ describe RepositoriesController, :type => :controller do |
4 | 4 | let(:project) { FactoryGirl.build(:project_with_id) } |
5 | 5 | |
6 | 6 | describe 'new' do |
7 | - context 'with an User logged in' do | |
7 | + context 'with a User logged in' do | |
8 | 8 | before :each do |
9 | 9 | sign_in FactoryGirl.create(:user) |
10 | 10 | end | ... | ... |