Commit b5aea848b610362710a54869a10b59e30a8ad6a0
1 parent
d7212652
Exists in
colab
and in
4 other branches
Refactored "I should see" cucumber step
Showing
7 changed files
with
28 additions
and
28 deletions
Show diff stats
features/homepage.feature
@@ -5,16 +5,16 @@ Feature: Homepage | @@ -5,16 +5,16 @@ Feature: Homepage | ||
5 | 5 | ||
6 | Scenario: Before signing in | 6 | Scenario: Before signing in |
7 | Given I am at the homepage | 7 | Given I am at the homepage |
8 | - Then I should see Login | ||
9 | - And I should see Sign Up | ||
10 | - And I should see Latest projects | ||
11 | - And I should see Project | 8 | + Then I should see "Login" |
9 | + And I should see "Sign Up" | ||
10 | + And I should see "Latest projects" | ||
11 | + And I should see "Project" | ||
12 | 12 | ||
13 | Scenario: Signed in | 13 | Scenario: Signed in |
14 | Given I am a regular user | 14 | Given I am a regular user |
15 | And I am signed in | 15 | And I am signed in |
16 | And I am at the homepage | 16 | And I am at the homepage |
17 | - Then I should see Edit | ||
18 | - And I should see Logout | ||
19 | - And I should see Latest projects | ||
20 | - And I should see Project | ||
21 | \ No newline at end of file | 17 | \ No newline at end of file |
18 | + Then I should see "Edit" | ||
19 | + And I should see "Logout" | ||
20 | + And I should see "Latest projects" | ||
21 | + And I should see "Project" | ||
22 | \ No newline at end of file | 22 | \ No newline at end of file |
features/project/create.feature
@@ -8,7 +8,7 @@ Feature: Project Creation | @@ -8,7 +8,7 @@ Feature: Project Creation | ||
8 | Given I am at the All Projects page | 8 | Given I am at the All Projects page |
9 | When I click the New Project link | 9 | When I click the New Project link |
10 | Then I should be in the Login page | 10 | Then I should be in the Login page |
11 | - And I should see You need to sign in or sign up before continuing. | 11 | + And I should see "You need to sign in or sign up before continuing." |
12 | 12 | ||
13 | @kalibro_restart | 13 | @kalibro_restart |
14 | Scenario: project creation | 14 | Scenario: project creation |
@@ -18,8 +18,8 @@ Feature: Project Creation | @@ -18,8 +18,8 @@ Feature: Project Creation | ||
18 | And I fill the Name field with "Kalibro" | 18 | And I fill the Name field with "Kalibro" |
19 | And I fill the Description field with "Web Service to collect metrics" | 19 | And I fill the Description field with "Web Service to collect metrics" |
20 | When I press the Save button | 20 | When I press the Save button |
21 | - Then I should see Kalibro | ||
22 | - And I should see Web Service to collect metrics | 21 | + Then I should see "Kalibro" |
22 | + And I should see "Web Service to collect metrics" | ||
23 | 23 | ||
24 | @kalibro_restart | 24 | @kalibro_restart |
25 | Scenario: project creation with already taken name | 25 | Scenario: project creation with already taken name |
@@ -30,7 +30,7 @@ Feature: Project Creation | @@ -30,7 +30,7 @@ Feature: Project Creation | ||
30 | And I fill the Name field with "Kalibro" | 30 | And I fill the Name field with "Kalibro" |
31 | And I fill the Description field with "Web Service to collect metrics" | 31 | And I fill the Description field with "Web Service to collect metrics" |
32 | When I press the Save button | 32 | When I press the Save button |
33 | - Then I should see There's already | 33 | + Then I should see "There's already" |
34 | 34 | ||
35 | @kalibro_restart | 35 | @kalibro_restart |
36 | Scenario: project creation with blank name | 36 | Scenario: project creation with blank name |
@@ -40,4 +40,4 @@ Feature: Project Creation | @@ -40,4 +40,4 @@ Feature: Project Creation | ||
40 | And I fill the Name field with " " | 40 | And I fill the Name field with " " |
41 | And I fill the Description field with "Web Service to collect metrics" | 41 | And I fill the Description field with "Web Service to collect metrics" |
42 | When I press the Save button | 42 | When I press the Save button |
43 | - Then I should see Name can't be blank | ||
44 | \ No newline at end of file | 43 | \ No newline at end of file |
44 | + Then I should see "Name can't be blank" | ||
45 | \ No newline at end of file | 45 | \ No newline at end of file |
features/project/edition.feature
@@ -27,7 +27,7 @@ Feature: Project | @@ -27,7 +27,7 @@ Feature: Project | ||
27 | And I have a sample project | 27 | And I have a sample project |
28 | And I am at the All Projects page | 28 | And I am at the All Projects page |
29 | When I visit the sample project edit page | 29 | When I visit the sample project edit page |
30 | - Then I should see You're not allowed to do this operation | 30 | + Then I should see "You're not allowed to do this operation" |
31 | 31 | ||
32 | @kalibro_restart | 32 | @kalibro_restart |
33 | Scenario: Filling up the form | 33 | Scenario: Filling up the form |
@@ -48,8 +48,8 @@ Feature: Project | @@ -48,8 +48,8 @@ Feature: Project | ||
48 | And I fill the Name field with "Kalibro" | 48 | And I fill the Name field with "Kalibro" |
49 | And I fill the Description field with "Web Service to collect metrics" | 49 | And I fill the Description field with "Web Service to collect metrics" |
50 | When I press the Save button | 50 | When I press the Save button |
51 | - Then I should see Kalibro | ||
52 | - And I should see Web Service to collect metrics | 51 | + Then I should see "Kalibro" |
52 | + And I should see "Web Service to collect metrics" | ||
53 | 53 | ||
54 | @kalibro_restart | 54 | @kalibro_restart |
55 | Scenario: With project name already taken | 55 | Scenario: With project name already taken |
@@ -60,7 +60,7 @@ Feature: Project | @@ -60,7 +60,7 @@ Feature: Project | ||
60 | And I am at the sample project edit page | 60 | And I am at the sample project edit page |
61 | And I fill the Name field with "Qt-Calculator" | 61 | And I fill the Name field with "Qt-Calculator" |
62 | When I press the Save button | 62 | When I press the Save button |
63 | - Then I should see There's already | 63 | + Then I should see "There's already" |
64 | 64 | ||
65 | @kalibro_restart | 65 | @kalibro_restart |
66 | Scenario: Editing just the description | 66 | Scenario: Editing just the description |
@@ -70,7 +70,7 @@ Feature: Project | @@ -70,7 +70,7 @@ Feature: Project | ||
70 | And I am at the sample project edit page | 70 | And I am at the sample project edit page |
71 | And I fill the Description field with "Web Service to collect metrics" | 71 | And I fill the Description field with "Web Service to collect metrics" |
72 | When I press the Save button | 72 | When I press the Save button |
73 | - And I should see Web Service to collect metrics | 73 | + And I should see "Web Service to collect metrics" |
74 | 74 | ||
75 | @kalibro_restart | 75 | @kalibro_restart |
76 | Scenario: With blank project name | 76 | Scenario: With blank project name |
@@ -80,4 +80,4 @@ Feature: Project | @@ -80,4 +80,4 @@ Feature: Project | ||
80 | And I am at the sample project edit page | 80 | And I am at the sample project edit page |
81 | And I fill the Name field with " " | 81 | And I fill the Name field with " " |
82 | When I press the Save button | 82 | When I press the Save button |
83 | - Then I should see Name can't be blank | 83 | + Then I should see "Name can't be blank" |
features/project/listing.feature
@@ -6,9 +6,9 @@ Feature: Project listing | @@ -6,9 +6,9 @@ Feature: Project listing | ||
6 | Scenario: Listing projects | 6 | Scenario: Listing projects |
7 | Given I am at the homepage | 7 | Given I am at the homepage |
8 | When I click the Project link | 8 | When I click the Project link |
9 | - Then I should see Listing Projects | ||
10 | - And I should see Name | ||
11 | - And I should see Description | 9 | + Then I should see "Listing Projects" |
10 | + And I should see "Name" | ||
11 | + And I should see "Description" | ||
12 | 12 | ||
13 | @kalibro_restart | 13 | @kalibro_restart |
14 | Scenario: Should list the existing projects | 14 | Scenario: Should list the existing projects |
@@ -25,6 +25,6 @@ Feature: Project listing | @@ -25,6 +25,6 @@ Feature: Project listing | ||
25 | And I have a sample project | 25 | And I have a sample project |
26 | And I am at the All Projects page | 26 | And I am at the All Projects page |
27 | When I click the Show link | 27 | When I click the Show link |
28 | - Then I should see Name | ||
29 | - And I should see Description | 28 | + Then I should see "Name" |
29 | + And I should see "Description" | ||
30 | And the sample project should be there | 30 | And the sample project should be there |
31 | \ No newline at end of file | 31 | \ No newline at end of file |
features/step_definitions/homepage_steps.rb
@@ -10,6 +10,6 @@ Given(/^I am a regular user$/) do | @@ -10,6 +10,6 @@ Given(/^I am a regular user$/) do | ||
10 | @user = FactoryGirl.create(:user) | 10 | @user = FactoryGirl.create(:user) |
11 | end | 11 | end |
12 | 12 | ||
13 | -Then(/^I should see (.+)$/) do |text| | 13 | +Then(/^I should see "(.+)"$/) do |text| |
14 | page.should have_content(text) | 14 | page.should have_content(text) |
15 | end | 15 | end |
16 | \ No newline at end of file | 16 | \ No newline at end of file |
features/user_update.feature
@@ -11,5 +11,5 @@ Feature: User update | @@ -11,5 +11,5 @@ Feature: User update | ||
11 | And I fill the Name field with "Rafael Manzo" | 11 | And I fill the Name field with "Rafael Manzo" |
12 | And I fill the Current password field with "password" | 12 | And I fill the Current password field with "password" |
13 | And I press the Update button | 13 | And I press the Update button |
14 | - Then I should see You updated your account successfully | 14 | + Then I should see "You updated your account successfully" |
15 | And my name should have changed to Rafael Manzo | 15 | And my name should have changed to Rafael Manzo |
16 | \ No newline at end of file | 16 | \ No newline at end of file |
spec/factories/repositories.rb
@@ -5,14 +5,14 @@ FactoryGirl.define do | @@ -5,14 +5,14 @@ FactoryGirl.define do | ||
5 | description "A simple calculator" | 5 | description "A simple calculator" |
6 | license "GPLv3" | 6 | license "GPLv3" |
7 | process_period 1 | 7 | process_period 1 |
8 | - type "SVN" | 8 | + type "SUBVERSION" |
9 | address "svn://svn.code.sf.net/p/qt-calculator/code/trunk" | 9 | address "svn://svn.code.sf.net/p/qt-calculator/code/trunk" |
10 | configuration_id 1 | 10 | configuration_id 1 |
11 | project_id 1 | 11 | project_id 1 |
12 | send_email "test@test.com" | 12 | send_email "test@test.com" |
13 | end | 13 | end |
14 | 14 | ||
15 | - factory :another_repository, class: KalibroEntities::Entities::Repository, parent: :repository do | 15 | + factory :another_repository, class: Repository, parent: :repository do |
16 | id 2 | 16 | id 2 |
17 | end | 17 | end |
18 | end | 18 | end |
19 | \ No newline at end of file | 19 | \ No newline at end of file |