Commit 9e0ca98aeb2879e62e8c43677102f83f591f2258
Exists in
colab
and in
4 other branches
Merge branch 'missing_tests' into dev
Showing
3 changed files
with
70 additions
and
1 deletions
Show diff stats
Gemfile.lock
... | ... | @@ -0,0 +1,44 @@ |
1 | +Feature: Project | |
2 | + In Order to have a good interaction with the website | |
3 | + As a regular user | |
4 | + I should see and manage projects | |
5 | + | |
6 | + Scenario: Listing projects | |
7 | + Given I am at the homepage | |
8 | + When I click the All Projects link | |
9 | + Then I should see Listing Projects | |
10 | + And I should see Name | |
11 | + And I should see Description | |
12 | + | |
13 | + # This will fail until do the authentication to project. | |
14 | + @wip | |
15 | + Scenario: Should not create project without login | |
16 | + Given I am at the All Projects page | |
17 | + Then I should not see New Project | |
18 | + | |
19 | + Scenario: Should list the existing projects | |
20 | + Given I am a regular user | |
21 | + And I am signed in | |
22 | + And I have a sample project | |
23 | + And I am at the All Projects page | |
24 | + Then the sample project should be there | |
25 | + | |
26 | + Scenario: Should show the existing project | |
27 | + Given I am a regular user | |
28 | + And I am signed in | |
29 | + And I have a sample project | |
30 | + And I am at the All Projects page | |
31 | + When I click the Show link | |
32 | + Then I should see Name | |
33 | + And I should see Description | |
34 | + And I should see Back | |
35 | + And the sample project should be there | |
36 | + | |
37 | + @wip | |
38 | + Scenario: Should back to the All Projects page from show project view | |
39 | + Given I am a regular user | |
40 | + And I am signed in | |
41 | + And I have a sample project | |
42 | + And I am at the Sample Project page | |
43 | + When I click the Back link | |
44 | + Then I should be in the All Projects page | ... | ... |
... | ... | @@ -0,0 +1,24 @@ |
1 | +Given(/^I am at the All Projects page$/) do | |
2 | + visit projects_path | |
3 | +end | |
4 | + | |
5 | +Given(/^I have a sample project$/) do | |
6 | + @project = FactoryGirl.create(:project) | |
7 | +end | |
8 | + | |
9 | +Given(/^I am at the Sample Project page$/) do | |
10 | + visit "#{projects_path}/#{@project.id}" | |
11 | +end | |
12 | + | |
13 | +Then(/^I should not see (.+)$/) do |text| | |
14 | + page.should_not have_content(text) | |
15 | +end | |
16 | + | |
17 | +Then(/^the sample project should be there$/) do | |
18 | + page.should have_content(@project.name) | |
19 | + page.should have_content(@project.description) | |
20 | +end | |
21 | + | |
22 | +Then(/^I should be in the All Projects page$/) do | |
23 | + page.should have_content("Listing Projects") | |
24 | +end | ... | ... |