Commit db58be722f4febd7ef8d10e420cef261b8ae46b7

Authored by Guilherme Rojas V. de Lima
Committed by Rafael Manzo
1 parent c5da7ea3

Acceptance tests

Signed-off-by: Renan Fichberg <rfichberg@gmail.com>
features/project/show.feature
... ... @@ -7,11 +7,13 @@ Feature: Show Project
7 7 Scenario: Considering the project has no repositories
8 8 Given I have a sample project
9 9 When I am at the Sample Project page
10   - Then I should see There are no repositories yet!
  10 + Then I should see "There are no repositories yet!"
11 11  
12   -@kalibro_restart @wip
  12 +@kalibro_restart
13 13 Scenario: Considering the project has repositories
14 14 Given I have a sample project
  15 + And I have a sample configuration with native metrics
  16 + And I have a sample repository within the sample project
15 17 When I am at the Sample Project page
16 18 Then I should not see There are no repositories yet!
17 19  
... ...
features/repository/create.feature
... ... @@ -32,4 +32,8 @@ Scenario: repository creation
32 32 And I fill the Address field with "https://github.com/mezuro/kalibro_entities.git"
33 33 And I set the select field Configuration as the sample configuration
34 34 When I press the Create Repository button
35   - Then I should see a the created repository
  35 + Then I should be in the Sample Project page
  36 + And I should not see There are no repositories yet!
  37 + And I should see "Kalibro"
  38 + And I should see "GIT"
  39 + And I should see "https://github.com/mezuro/kalibro_entities.git"
... ...
features/repository/show.feature
... ... @@ -9,7 +9,7 @@ Feature: Show Repository
9 9 And I am signed in
10 10 And I have a sample project
11 11 And I have a sample configuration with native metrics
12   - And I have a sample repository wihin the sample project
  12 + And I have a sample repository within the sample project
13 13 And I start to process that repository
14 14 And I wait up for a ready processing
15 15 When I visit the repository show page
... ... @@ -29,7 +29,7 @@ Feature: Show Repository
29 29 And I am signed in
30 30 And I have a sample project
31 31 And I have a sample configuration with native metrics
32   - And I have a sample repository wihin the sample project
  32 + And I have a sample repository within the sample project
33 33 And I start to process that repository
34 34 When I visit the repository show page
35 35 Then I should see the sample repository name
... ...
features/step_definitions/project_steps.rb
... ... @@ -59,6 +59,11 @@ Then(/^I should be in the Edit Project page$/) do
59 59 page.should have_content("Edit Project")
60 60 end
61 61  
  62 +Then(/^I should be in the Sample Project page$/) do
  63 + page.should have_content(@project.name)
  64 + page.should have_content(@project.description)
  65 +end
  66 +
62 67 Then(/^I should be in the Login page$/) do
63 68 page.should have_content("Sign in")
64 69 end
... ...
features/step_definitions/repository_steps.rb
... ... @@ -7,7 +7,7 @@ Given(/^I have a sample configuration with native metrics$/) do
7 7 configuration_id: @configuration.id})
8 8 end
9 9  
10   -Given(/^I have a sample repository wihin the sample project$/) do
  10 +Given(/^I have a sample repository within the sample project$/) do
11 11 @repository = FactoryGirl.create(:repository, {project_id: @project.id, configuration_id: @configuration.id, id: nil})
12 12 end
13 13  
... ... @@ -45,4 +45,4 @@ end
45 45  
46 46 Then(/^I should see the sample repository name$/) do
47 47 page.should have_content(@repository.name)
48 48 -end
  49 +end
49 50 \ No newline at end of file
... ...