Commit f3710ebf62c8a27a29e5f9307b5ab4beabd58e9a
Committed by
Rafael Manzo
1 parent
686bd88d
Exists in
colab
and in
4 other branches
Finished Acceptance tests for repository new attributes
Signed-off By: Rafael Manzo <rr.manzo@gmail.com> Signed-off By: Renan Fichberg <rfichberg@gmail.com>
Showing
3 changed files
with
9 additions
and
2 deletions
Show diff stats
app/helpers/repository_helper.rb
... | ... | @@ -8,6 +8,10 @@ module RepositoryHelper |
8 | 8 | end |
9 | 9 | |
10 | 10 | def periodicity_option(periodicity) |
11 | - periodicity_options.select {|option| option.last == periodicity}.first.first | |
11 | + periodicity_label = periodicity_options.select {|option| option.last == periodicity}.first | |
12 | + unless periodicity_label.nil? | |
13 | + return periodicity_label.first | |
14 | + end | |
15 | + return "Undefined" | |
12 | 16 | end |
13 | 17 | end |
14 | 18 | \ No newline at end of file | ... | ... |
features/repository/show.feature
... | ... | @@ -3,7 +3,7 @@ Feature: Show Repository |
3 | 3 | As a regular user |
4 | 4 | I should see it's informations |
5 | 5 | |
6 | - @kalibro_restart @javascript @wip | |
6 | + @kalibro_restart @javascript | |
7 | 7 | Scenario: Testing the repository values |
8 | 8 | Given I have a sample project |
9 | 9 | And I have a sample configuration with native metrics | ... | ... |
features/step_definitions/repository_steps.rb
... | ... | @@ -102,6 +102,9 @@ Then(/^I should see the given repository's content$/) do |
102 | 102 | page.should have_content(@repository.description) |
103 | 103 | page.should have_content(@repository.name) |
104 | 104 | page.should have_content(@repository.license) |
105 | + page.should have_content(@repository.address) | |
106 | + page.should have_content(@configuration.name) | |
107 | + page.should have_content("1 day") # The given repository periodicity | |
105 | 108 | end |
106 | 109 | |
107 | 110 | Then(/^I should see a loaded graphic for the sample metric$/) do | ... | ... |