Commit 19edc2321b4b87a70fd05c7b5016253646ed3568
Committed by
Rafael Manzo
1 parent
9176570d
Exists in
colab
and in
4 other branches
Fixing repository creation acceptance tests
Signed off by: Daniel Alves <danpaulalves@gmail.com>
Showing
6 changed files
with
16 additions
and
14 deletions
Show diff stats
Gemfile.lock
app/models/repository.rb
app/views/repositories/_form.html.erb
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 | |
43 | 43 | <div class="form-row"> |
44 | 44 | <div class="field-container"> |
45 | - <%= f.label :scm_type, class: 'control-label' %> | |
45 | + <%= f.label :scm_type, 'Type', class: 'control-label' %> | |
46 | 46 | <%= f.select( :scm_type, @repository_types, class: 'tooltip-control' ) %> |
47 | 47 | </div> |
48 | 48 | <div class="help-container"> |
... | ... | @@ -66,8 +66,8 @@ |
66 | 66 | |
67 | 67 | <div class="form-row"> |
68 | 68 | <div class="field-container"> |
69 | - <%= f.label :process_period, 'Process Period', class: 'control-label' %> | |
70 | - <%= f.select( :process_period, periodicity_options, class: 'tooltip-control' ) %> | |
69 | + <%= f.label :period, 'Process Period', class: 'control-label' %> | |
70 | + <%= f.select( :period, periodicity_options, class: 'tooltip-control' ) %> | |
71 | 71 | </div> |
72 | 72 | <div class="help-container"> |
73 | 73 | <p> |
... | ... | @@ -78,9 +78,9 @@ |
78 | 78 | |
79 | 79 | <div class="form-row"> |
80 | 80 | <div class="field-container"> |
81 | - <%= f.label :configuration, class: 'control-label' %> | |
82 | - <% configuration_list = KalibroGatekeeperClient::Entities::Configuration.all.map { |conf| [conf.name, conf.id] } %> | |
83 | - <%= f.select( :configuration_id, configuration_list, class: 'tooltip-control' ) %> | |
81 | + <%= f.label :configuration, 'Configuration', class: 'control-label' %> | |
82 | + <% configuration_list = KalibroClient::Entities::Configurations::KalibroConfiguration.all.map { |conf| [conf.name, conf.id] } %> | |
83 | + <%= f.select( :kalibro_configuration_id, configuration_list, class: 'tooltip-control' ) %> | |
84 | 84 | </div> |
85 | 85 | <div class="help-container"> |
86 | 86 | <p> | ... | ... |
app/views/repositories/show.html.erb
features/repository/create.feature
... | ... | @@ -16,7 +16,7 @@ Scenario: repository creation |
16 | 16 | And I set the select field "Type" as "GIT" |
17 | 17 | And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git" |
18 | 18 | And I set the select field "Process Period" as "1 day" |
19 | - And I set the select field "repository_configuration_id" as "Java" | |
19 | + And I set the select field "repository_kalibro_configuration_id" as "Java" | |
20 | 20 | When I press the Save button |
21 | 21 | Then I should see the saved repository's content |
22 | 22 | |
... | ... | @@ -32,7 +32,7 @@ Scenario: repository creation blank validations |
32 | 32 | And I set the select field "License" as "ISC License (ISC)" |
33 | 33 | And I set the select field "Type" as "GIT" |
34 | 34 | And I set the select field "Process Period" as "1 day" |
35 | - And I set the select field "repository_configuration_id" as "Java" | |
35 | + And I set the select field "repository_kalibro_configuration_id" as "Java" | |
36 | 36 | When I press the Save button |
37 | 37 | Then I should see "Name can't be blank" |
38 | 38 | And I should see "Address can't be blank" |
... | ... | @@ -51,6 +51,6 @@ Scenario: repository creation with name already taken |
51 | 51 | And I set the select field "Type" as "GIT" |
52 | 52 | And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git" |
53 | 53 | And I set the select field "Process Period" as "1 day" |
54 | - And I set the select field "repository_configuration_id" as "Java" | |
54 | + And I set the select field "repository_kalibro_configuration_id" as "Java" | |
55 | 55 | When I press the Save button |
56 | - Then I should see "Name There is already a Repository with name KalibroEntities! Please, choose another one." | |
57 | 56 | \ No newline at end of file |
57 | + Then I should see "Name should be unique within project" | ... | ... |
features/step_definitions/repository_steps.rb
... | ... | @@ -136,7 +136,7 @@ Then(/^I should see a sample child's name$/) do |
136 | 136 | end |
137 | 137 | |
138 | 138 | Then(/^I should see the given repository's content$/) do |
139 | - expect(page).to have_content(@repository.type) | |
139 | + expect(page).to have_content(@repository.scm_type) | |
140 | 140 | expect(page).to have_content(@repository.description) |
141 | 141 | expect(page).to have_content(@repository.name) |
142 | 142 | expect(page).to have_content(@repository.license) |
... | ... | @@ -165,7 +165,7 @@ end |
165 | 165 | |
166 | 166 | Then(/^I should see the saved repository's content$/) do |
167 | 167 | @repository = Repository.all.last # suposing the last repository created is the only created too. |
168 | - expect(page).to have_content(@repository.type) | |
168 | + expect(page).to have_content(@repository.scm_type) | |
169 | 169 | expect(page).to have_content(@repository.description) |
170 | 170 | expect(page).to have_content(@repository.name) |
171 | 171 | expect(page).to have_content(@repository.license) | ... | ... |