Commit f776b5f6e6c721fd01a04be44a20e7390046dc28
Exists in
master
and in
29 other branches
Merge branch 'capybara' of git://gitorious.org/~danielcunha/noosfero/danielcunha…
…s-noosfero into capybara Conflicts: features/step_definitions/noosfero_steps.rb
Showing
14 changed files
with
62 additions
and
59 deletions
Show diff stats
features/export_users.feature
@@ -9,15 +9,13 @@ Feature: export users | @@ -9,15 +9,13 @@ Feature: export users | ||
9 | 9 | ||
10 | Scenario: Export users as XML | 10 | Scenario: Export users as XML |
11 | Given I am logged in as admin | 11 | Given I am logged in as admin |
12 | - When I follow "Administration" | ||
13 | - And I follow "Users" | 12 | + When I go to /admin/users |
14 | And I follow "[XML]" | 13 | And I follow "[XML]" |
15 | Then I should see "ultraje" | 14 | Then I should see "ultraje" |
16 | 15 | ||
17 | Scenario: Export users as CSV | 16 | Scenario: Export users as CSV |
18 | Given I am logged in as admin | 17 | Given I am logged in as admin |
19 | - When I follow "Administration" | ||
20 | - And I follow "Users" | 18 | + When I go to /admin/users |
21 | And I follow "[CSV]" | 19 | And I follow "[CSV]" |
22 | Then I should see "name;email" | 20 | Then I should see "name;email" |
23 | And I should see "ultraje" | 21 | And I should see "ultraje" |
features/featured_products_block.feature
@@ -23,7 +23,7 @@ Feature: featured_products_block | @@ -23,7 +23,7 @@ Feature: featured_products_block | ||
23 | | redemoinho | automobile | Moto | Very long description of and auto-mobile moto to be truncated | true | | 23 | | redemoinho | automobile | Moto | Very long description of and auto-mobile moto to be truncated | true | |
24 | And I am logged in as "eddievedder" | 24 | And I am logged in as "eddievedder" |
25 | 25 | ||
26 | - @selenium | 26 | + @selenium @fixme |
27 | Scenario: select a product to be featured | 27 | Scenario: select a product to be featured |
28 | And I follow "Manage my groups" | 28 | And I follow "Manage my groups" |
29 | And I follow "Control panel of this group" | 29 | And I follow "Control panel of this group" |
@@ -35,7 +35,7 @@ Feature: featured_products_block | @@ -35,7 +35,7 @@ Feature: featured_products_block | ||
35 | And I should not see "float_to_currency" | 35 | And I should not see "float_to_currency" |
36 | And I should not see "product_path" | 36 | And I should not see "product_path" |
37 | 37 | ||
38 | - @selenium | 38 | + @selenium @fixme |
39 | Scenario: display block with long description | 39 | Scenario: display block with long description |
40 | Given I follow "Manage my groups" | 40 | Given I follow "Manage my groups" |
41 | And I follow "Control panel of this group" | 41 | And I follow "Control panel of this group" |
features/forum.feature
@@ -10,18 +10,18 @@ Feature: forum | @@ -10,18 +10,18 @@ Feature: forum | ||
10 | And "joaosilva" has no articles | 10 | And "joaosilva" has no articles |
11 | And I am logged in as "joaosilva" | 11 | And I am logged in as "joaosilva" |
12 | 12 | ||
13 | - @selenium | 13 | + @selenium @ignore-hidden-elements |
14 | Scenario: create a forum | 14 | Scenario: create a forum |
15 | - Given I am on Joao Silva's control panel | 15 | + Given I am on joaosilva's control panel |
16 | And I follow "Manage Content" | 16 | And I follow "Manage Content" |
17 | And I follow "New content" | 17 | And I follow "New content" |
18 | - When I follow "Forum" and wait | 18 | + When I follow "Forum" |
19 | And I fill in "Title" with "My Forum" | 19 | And I fill in "Title" with "My Forum" |
20 | - And I press "Save" and wait | 20 | + And I press "Save" |
21 | Then I should see "Configure forum" | 21 | Then I should see "Configure forum" |
22 | 22 | ||
23 | Scenario: redirect to forum after create forum from cms | 23 | Scenario: redirect to forum after create forum from cms |
24 | - Given I go to the Control panel | 24 | + Given I go to joaosilva's control panel |
25 | And I follow "Manage Content" | 25 | And I follow "Manage Content" |
26 | And I follow "New content" | 26 | And I follow "New content" |
27 | When I follow "Forum" | 27 | When I follow "Forum" |
@@ -30,13 +30,13 @@ Feature: forum | @@ -30,13 +30,13 @@ Feature: forum | ||
30 | Then I should be on /joaosilva/forum-from-cms | 30 | Then I should be on /joaosilva/forum-from-cms |
31 | 31 | ||
32 | Scenario: create multiple forums | 32 | Scenario: create multiple forums |
33 | - Given I go to the Control panel | 33 | + Given I go to joaosilva's control panel |
34 | And I follow "Manage Content" | 34 | And I follow "Manage Content" |
35 | And I follow "New content" | 35 | And I follow "New content" |
36 | And I follow "Forum" | 36 | And I follow "Forum" |
37 | And I fill in "Title" with "Forum One" | 37 | And I fill in "Title" with "Forum One" |
38 | And I press "Save" | 38 | And I press "Save" |
39 | - Then I go to the Control panel | 39 | + Then I go to joaosilva's control panel |
40 | And I follow "Manage Content" | 40 | And I follow "Manage Content" |
41 | And I follow "New content" | 41 | And I follow "New content" |
42 | And I follow "Forum" | 42 | And I follow "Forum" |
@@ -46,7 +46,7 @@ Feature: forum | @@ -46,7 +46,7 @@ Feature: forum | ||
46 | And I should be on /joaosilva/forum-two | 46 | And I should be on /joaosilva/forum-two |
47 | 47 | ||
48 | Scenario: cancel button back to cms | 48 | Scenario: cancel button back to cms |
49 | - Given I go to the Control panel | 49 | + Given I go to joaosilva's control panel |
50 | And I follow "Manage Content" | 50 | And I follow "Manage Content" |
51 | And I follow "New content" | 51 | And I follow "New content" |
52 | And I follow "Forum" | 52 | And I follow "Forum" |
@@ -54,7 +54,7 @@ Feature: forum | @@ -54,7 +54,7 @@ Feature: forum | ||
54 | Then I should be on /myprofile/joaosilva/cms | 54 | Then I should be on /myprofile/joaosilva/cms |
55 | 55 | ||
56 | Scenario: cancel button back to myprofile | 56 | Scenario: cancel button back to myprofile |
57 | - Given I go to the Control panel | 57 | + Given I go to joaosilva's control panel |
58 | And I follow "Manage Content" | 58 | And I follow "Manage Content" |
59 | And I follow "New content" | 59 | And I follow "New content" |
60 | And I follow "Forum" | 60 | And I follow "Forum" |
@@ -66,8 +66,8 @@ Feature: forum | @@ -66,8 +66,8 @@ Feature: forum | ||
66 | Given the following forums | 66 | Given the following forums |
67 | | owner | name | | 67 | | owner | name | |
68 | | joaosilva | Forum One | | 68 | | joaosilva | Forum One | |
69 | - And I visit "/joaosilva/forum-one" and wait | ||
70 | - When I follow "Configure forum" and wait | 69 | + And I go to /joaosilva/forum-one |
70 | + When I follow "Configure forum" | ||
71 | Then I should be on edit "Forum One" by joaosilva | 71 | Then I should be on edit "Forum One" by joaosilva |
72 | 72 | ||
73 | Scenario: last topic update by unautenticated user should not link | 73 | Scenario: last topic update by unautenticated user should not link |
@@ -94,4 +94,4 @@ Feature: forum | @@ -94,4 +94,4 @@ Feature: forum | ||
94 | | article | author | title | body | | 94 | | article | author | title | body | |
95 | | Post one | joaosilva | Hi all | Hi all | | 95 | | Post one | joaosilva | Hi all | Hi all | |
96 | When I go to /joaosilva/forum | 96 | When I go to /joaosilva/forum |
97 | - Then I should see "Joao" linking to "http:///joaosilva" | 97 | + Then I should see "Joao" linking to "http://localhost/joaosilva" |
features/gallery_navigation.feature
@@ -23,7 +23,7 @@ Feature: gallery_navigation | @@ -23,7 +23,7 @@ Feature: gallery_navigation | ||
23 | @selenium | 23 | @selenium |
24 | Scenario: view next image when follow next link | 24 | Scenario: view next image when follow next link |
25 | Given I am on /marciopunk/my-gallery/other-pic.jpg?view=true | 25 | Given I am on /marciopunk/my-gallery/other-pic.jpg?view=true |
26 | - When I follow "Next »" and wait | 26 | + When I follow "Next »" |
27 | Then I should see "rails.png" within ".title" | 27 | Then I should see "rails.png" within ".title" |
28 | 28 | ||
29 | Scenario: not link to next when in last image | 29 | Scenario: not link to next when in last image |
@@ -38,7 +38,7 @@ Feature: gallery_navigation | @@ -38,7 +38,7 @@ Feature: gallery_navigation | ||
38 | @selenium | 38 | @selenium |
39 | Scenario: view previous image when follow previous link | 39 | Scenario: view previous image when follow previous link |
40 | Given I am on /marciopunk/my-gallery/rails.png?view=true | 40 | Given I am on /marciopunk/my-gallery/rails.png?view=true |
41 | - When I follow "« Previous" and wait | 41 | + When I follow "« Previous" |
42 | Then I should see "other-pic.jpg" within ".title" | 42 | Then I should see "other-pic.jpg" within ".title" |
43 | 43 | ||
44 | Scenario: not link to previous when in first image | 44 | Scenario: not link to previous when in first image |
@@ -71,8 +71,8 @@ Feature: gallery_navigation | @@ -71,8 +71,8 @@ Feature: gallery_navigation | ||
71 | @selenium | 71 | @selenium |
72 | Scenario: image title in window title | 72 | Scenario: image title in window title |
73 | Given I am logged in as "marciopunk" | 73 | Given I am logged in as "marciopunk" |
74 | - When I visit "/marciopunk/other-gallery/rails.png?view=true" and wait | ||
75 | - And I follow "Edit" and wait | 74 | + When I go to /marciopunk/other-gallery/rails.png?view=true |
75 | + And I follow "Edit" | ||
76 | And I fill in "Title" with "Rails is cool" | 76 | And I fill in "Title" with "Rails is cool" |
77 | - And I press "Save" and wait | ||
78 | - Then The page title should contain "Rails is cool" | 77 | + And I press "Save" |
78 | + Then I should see "Rails is cool" within "title" |
features/http_caching.feature
@@ -35,13 +35,13 @@ Feature: HTTP caching | @@ -35,13 +35,13 @@ Feature: HTTP caching | ||
35 | Then the response should be valid for 90 minutes | 35 | Then the response should be valid for 90 minutes |
36 | 36 | ||
37 | Scenario: profile pages, default configuaration | 37 | Scenario: profile pages, default configuaration |
38 | - When I go to João Silva's homepage | 38 | + When I go to joao's homepage |
39 | Then the response should be valid for 15 minutes | 39 | Then the response should be valid for 15 minutes |
40 | 40 | ||
41 | Scenario: profile pages, custom configuration | 41 | Scenario: profile pages, custom configuration |
42 | Given the following environment configuration | 42 | Given the following environment configuration |
43 | | profile_cache_in_minutes | 90 | | 43 | | profile_cache_in_minutes | 90 | |
44 | - When I go to João Silva's homepage | 44 | + When I go to joao's homepage |
45 | Then the response should be valid for 90 minutes | 45 | Then the response should be valid for 90 minutes |
46 | 46 | ||
47 | Scenario: account controller should not be cached at all | 47 | Scenario: account controller should not be cached at all |
@@ -50,7 +50,7 @@ Feature: HTTP caching | @@ -50,7 +50,7 @@ Feature: HTTP caching | ||
50 | 50 | ||
51 | Scenario: profile administration | 51 | Scenario: profile administration |
52 | Given I am logged in as "joao" | 52 | Given I am logged in as "joao" |
53 | - When I go to João Silva's control panel | 53 | + When I go to joao's control panel |
54 | Then there must be no cache at all | 54 | Then there must be no cache at all |
55 | 55 | ||
56 | Scenario: environment administration | 56 | Scenario: environment administration |
features/internationalization.feature
@@ -28,6 +28,7 @@ Feature: internationalization | @@ -28,6 +28,7 @@ Feature: internationalization | ||
28 | When I follow "Português" | 28 | When I follow "Português" |
29 | Then the site should be in Portuguese | 29 | Then the site should be in Portuguese |
30 | 30 | ||
31 | + @fixme | ||
31 | Scenario: language set by previous users | 32 | Scenario: language set by previous users |
32 | Given a user accessed in English before | 33 | Given a user accessed in English before |
33 | And my browser prefers Portuguese | 34 | And my browser prefers Portuguese |
features/invitation.feature
@@ -46,8 +46,7 @@ Feature: invitation | @@ -46,8 +46,7 @@ Feature: invitation | ||
46 | Then I should see "Invite your friends to join 26 Bsslines" link | 46 | Then I should see "Invite your friends to join 26 Bsslines" link |
47 | 47 | ||
48 | Scenario: not see link to invite members to community if has no rights | 48 | Scenario: not see link to invite members to community if has no rights |
49 | - Given I am not logged in | ||
50 | - And I am logged in as "josesantos" | 49 | + Given I am logged in as "josesantos" |
51 | When I am on /profile/26-bsslines/members | 50 | When I am on /profile/26-bsslines/members |
52 | Then I should not see "Invite your friends to join 26 Bsslines" link | 51 | Then I should not see "Invite your friends to join 26 Bsslines" link |
53 | 52 | ||
@@ -65,8 +64,7 @@ Feature: invitation | @@ -65,8 +64,7 @@ Feature: invitation | ||
65 | Then I should not see "Invite your friends to join Beatles For Sale" link | 64 | Then I should not see "Invite your friends to join Beatles For Sale" link |
66 | 65 | ||
67 | Scenario: deny access if user has no right to invite members | 66 | Scenario: deny access if user has no right to invite members |
68 | - Given I am not logged in | ||
69 | - And I am logged in as "josesantos" | 67 | + Given I am logged in as "josesantos" |
70 | When I am on /profile/26-bsslines/invite/friends | 68 | When I am on /profile/26-bsslines/invite/friends |
71 | Then I should see "Access denied" | 69 | Then I should see "Access denied" |
72 | 70 | ||
@@ -92,20 +90,20 @@ Feature: invitation | @@ -92,20 +90,20 @@ Feature: invitation | ||
92 | And I press "Invite my friends!" | 90 | And I press "Invite my friends!" |
93 | Given there are no pending jobs | 91 | Given there are no pending jobs |
94 | When I am logged in as "josesantos" | 92 | When I am logged in as "josesantos" |
95 | - And I go to the Control panel | 93 | + And I go to josesantos's control panel |
96 | And I should see "josesilva invited you to join 26 Bsslines." | 94 | And I should see "josesilva invited you to join 26 Bsslines." |
97 | 95 | ||
98 | Scenario: noosfero user accepts to join community | 96 | Scenario: noosfero user accepts to join community |
99 | Given I invite email "santos@invalid.br" to join community "26 Bsslines" | 97 | Given I invite email "santos@invalid.br" to join community "26 Bsslines" |
100 | And there are no pending jobs | 98 | And there are no pending jobs |
101 | When I am logged in as "josesantos" | 99 | When I am logged in as "josesantos" |
102 | - And I go to the Control panel | 100 | + And I go to josesantos's control panel |
103 | And I follow "Process requests" | 101 | And I follow "Process requests" |
104 | And I should see "josesilva invited you to join 26 Bsslines." | 102 | And I should see "josesilva invited you to join 26 Bsslines." |
105 | And I choose "Accept" | 103 | And I choose "Accept" |
106 | When I press "Apply!" | 104 | When I press "Apply!" |
107 | Then I should not see "josesilva invited you to join 26 Bsslines." | 105 | Then I should not see "josesilva invited you to join 26 Bsslines." |
108 | - When I go to the Control panel | 106 | + When I go to josesantos's control panel |
109 | And I follow "Manage my groups" | 107 | And I follow "Manage my groups" |
110 | Then I should see "26 Bsslines" | 108 | Then I should see "26 Bsslines" |
111 | 109 | ||
@@ -113,19 +111,19 @@ Feature: invitation | @@ -113,19 +111,19 @@ Feature: invitation | ||
113 | Given I invite email "santos@invalid.br" to join community "26 Bsslines" | 111 | Given I invite email "santos@invalid.br" to join community "26 Bsslines" |
114 | And there are no pending jobs | 112 | And there are no pending jobs |
115 | When I am logged in as "josesantos" | 113 | When I am logged in as "josesantos" |
116 | - And I go to the Control panel | 114 | + And I go to josesantos's control panel |
117 | And I follow "Process requests" | 115 | And I follow "Process requests" |
118 | And I should see "josesilva invited you to join 26 Bsslines." | 116 | And I should see "josesilva invited you to join 26 Bsslines." |
119 | And I choose "Reject" | 117 | And I choose "Reject" |
120 | When I press "Apply!" | 118 | When I press "Apply!" |
121 | Then I should not see "josesilva invited you to join 26 Bsslines." | 119 | Then I should not see "josesilva invited you to join 26 Bsslines." |
122 | - When I go to the Control panel | 120 | + And I go to josesantos's control panel |
123 | And I follow "Manage my groups" | 121 | And I follow "Manage my groups" |
124 | Then I should not see "26 Bsslines" | 122 | Then I should not see "26 Bsslines" |
125 | 123 | ||
126 | Scenario: noosfero user receives a task when a user invites to be friend | 124 | Scenario: noosfero user receives a task when a user invites to be friend |
127 | Given I am on josesilva's control panel | 125 | Given I am on josesilva's control panel |
128 | - And I follow "Manage Friends" | 126 | + And I follow "Manage friends" |
129 | And I follow "Invite people from my e-mail contacts" | 127 | And I follow "Invite people from my e-mail contacts" |
130 | And I press "Next" | 128 | And I press "Next" |
131 | And I fill in "manual_import_addresses" with "santos@invalid.br" | 129 | And I fill in "manual_import_addresses" with "santos@invalid.br" |
@@ -133,34 +131,38 @@ Feature: invitation | @@ -133,34 +131,38 @@ Feature: invitation | ||
133 | And I press "Invite my friends!" | 131 | And I press "Invite my friends!" |
134 | Given there are no pending jobs | 132 | Given there are no pending jobs |
135 | When I am logged in as "josesantos" | 133 | When I am logged in as "josesantos" |
136 | - And I go to the Control panel | 134 | + And I go to josesantos's control panel |
137 | And I follow "Process requests" | 135 | And I follow "Process requests" |
138 | Then I should see "josesilva wants to be your friend." | 136 | Then I should see "josesilva wants to be your friend." |
139 | 137 | ||
140 | Scenario: noosfero user accepts to be friend | 138 | Scenario: noosfero user accepts to be friend |
141 | - Given I invite email "santos@invalid.br" to be my friend | 139 | + Given I am logged in as "josesilva" |
140 | + And I go to josesilva's control panel | ||
141 | + And I invite email "santos@invalid.br" to be my friend | ||
142 | And there are no pending jobs | 142 | And there are no pending jobs |
143 | When I am logged in as "josesantos" | 143 | When I am logged in as "josesantos" |
144 | - And I go to the Control panel | 144 | + And I go to josesantos's control panel |
145 | And I follow "Process requests" | 145 | And I follow "Process requests" |
146 | And I should see "josesilva wants to be your friend." | 146 | And I should see "josesilva wants to be your friend." |
147 | And I choose "Accept" | 147 | And I choose "Accept" |
148 | When I press "Apply!" | 148 | When I press "Apply!" |
149 | And I should not see "josesilva wants to be your friend." | 149 | And I should not see "josesilva wants to be your friend." |
150 | - When I go to the Control panel | 150 | + When I go to josesantos's control panel |
151 | And I follow "Manage friends" | 151 | And I follow "Manage friends" |
152 | Then I should see "josesilva" | 152 | Then I should see "josesilva" |
153 | 153 | ||
154 | Scenario: noosfero user rejects to be friend | 154 | Scenario: noosfero user rejects to be friend |
155 | - Given I invite email "santos@invalid.br" to be my friend | 155 | + Given I am logged in as "josesilva" |
156 | + And I go to josesilva's control panel | ||
157 | + And I invite email "santos@invalid.br" to be my friend | ||
156 | And there are no pending jobs | 158 | And there are no pending jobs |
157 | When I am logged in as "josesantos" | 159 | When I am logged in as "josesantos" |
158 | - And I go to the Control panel | 160 | + And I go to josesantos's control panel |
159 | And I follow "Process requests" | 161 | And I follow "Process requests" |
160 | And I should see "josesilva wants to be your friend." | 162 | And I should see "josesilva wants to be your friend." |
161 | And I choose "Reject" | 163 | And I choose "Reject" |
162 | When I press "Apply!" | 164 | When I press "Apply!" |
163 | And I should not see "josesilva wants to be your friend." | 165 | And I should not see "josesilva wants to be your friend." |
164 | - When I go to the Control panel | 166 | + When I go to josesantos's control panel |
165 | And I follow "Manage friends" | 167 | And I follow "Manage friends" |
166 | Then I should not see "josesilva" | 168 | Then I should not see "josesilva" |
features/language_redirection.feature
@@ -26,9 +26,9 @@ Feature: language redirection | @@ -26,9 +26,9 @@ Feature: language redirection | ||
26 | # Testing the web UI | 26 | # Testing the web UI |
27 | Given I am logged in as "manuel" | 27 | Given I am logged in as "manuel" |
28 | And my browser prefers English | 28 | And my browser prefers English |
29 | - And I go to manuel's profile editor | 29 | + And I go to /myprofile/manuel/profile_editor/edit |
30 | And I check "Automaticaly redirect the visitor to the article translated to his/her language" | 30 | And I check "Automaticaly redirect the visitor to the article translated to his/her language" |
31 | - And I press "save" | 31 | + And I press "Save" |
32 | When I go to /manuel/meu-artigo | 32 | When I go to /manuel/meu-artigo |
33 | Then the site should be in English | 33 | Then the site should be in English |
34 | 34 |
features/location.feature
@@ -16,13 +16,14 @@ Feature: Location | @@ -16,13 +16,14 @@ Feature: Location | ||
16 | | state | | 16 | | state | |
17 | | city | | 17 | | city | |
18 | | zip_code | | 18 | | zip_code | |
19 | - And I go to the Control panel | 19 | + And I go to zezinho's control panel |
20 | And I follow "Location" | 20 | And I follow "Location" |
21 | When I fill in "Address" with "Rua Marechal Floriano, 28" | 21 | When I fill in "Address" with "Rua Marechal Floriano, 28" |
22 | And I select "Brazil" from "Country" | 22 | And I select "Brazil" from "Country" |
23 | And I fill in "State" with "Bahia" | 23 | And I fill in "State" with "Bahia" |
24 | And I fill in "City" with "Salvador" | 24 | And I fill in "City" with "Salvador" |
25 | - And I fill in "ZIP Code" with "40110010" | 25 | + And I fill in "ZIP code" with "40110010" |
26 | + And I follow "Locate in the map" | ||
26 | And I press "Save" | 27 | And I press "Save" |
27 | Then "zezinho" should have the following data | 28 | Then "zezinho" should have the following data |
28 | | address | country | state | city | zip_code | | 29 | | address | country | state | city | zip_code | |
@@ -38,14 +39,14 @@ Feature: Location | @@ -38,14 +39,14 @@ Feature: Location | ||
38 | Given the following <plural> | 39 | Given the following <plural> |
39 | | identifier | name | owner | | 40 | | identifier | name | owner | |
40 | | mycollective | My Collective | zezinho | | 41 | | mycollective | My Collective | zezinho | |
41 | - And I am on My Collective's control panel | 42 | + And I am on mycollective's control panel |
42 | And I follow "Location" | 43 | And I follow "Location" |
43 | And I select "Brazil" from "Country" | 44 | And I select "Brazil" from "Country" |
44 | And I fill in the following: | 45 | And I fill in the following: |
45 | | Address | Rua Marechal Floriano, 28 | | 46 | | Address | Rua Marechal Floriano, 28 | |
46 | | State | Bahia | | 47 | | State | Bahia | |
47 | | City | Salvador | | 48 | | City | Salvador | |
48 | - | ZIP Code | 40110010 | | 49 | + | ZIP code | 40110010 | |
49 | When I press "Save" | 50 | When I press "Save" |
50 | Then "mycollective" should have the following data | 51 | Then "mycollective" should have the following data |
51 | | address | country | state | city | zip_code | | 52 | | address | country | state | city | zip_code | |
features/step_definitions/custom_web_steps.rb
@@ -12,6 +12,11 @@ Then /^I should not see "([^"]*)" link$/ do |text| | @@ -12,6 +12,11 @@ Then /^I should not see "([^"]*)" link$/ do |text| | ||
12 | page.should have_no_css('a', :text => text) | 12 | page.should have_no_css('a', :text => text) |
13 | end | 13 | end |
14 | 14 | ||
15 | +When /^I should see "([^\"]+)" linking to "([^\"]+)"$/ do |text, href| | ||
16 | + page.should have_selector("a:contains('#{text}')") | ||
17 | + page.should have_selector("a[href='#{href}']") | ||
18 | +end | ||
19 | + | ||
15 | When /^I reload and wait for the page$/ do | 20 | When /^I reload and wait for the page$/ do |
16 | raise "Why why need this? Remove!" | 21 | raise "Why why need this? Remove!" |
17 | visit page.driver.browser.current_url | 22 | visit page.driver.browser.current_url |
features/step_definitions/http_caching_steps.rb
1 | Then /^the response should be valid for (.+) minutes$/ do |n| | 1 | Then /^the response should be valid for (.+) minutes$/ do |n| |
2 | - response.headers['Cache-Control'].split(/,\s*/).should include("max-age=#{n.to_i * 60}") | 2 | + page.response_headers['Cache-Control'].split(/,\s*/).should include("max-age=#{n.to_i * 60}") |
3 | end | 3 | end |
4 | 4 | ||
5 | Then /^the cache should be public/ do | 5 | Then /^the cache should be public/ do |
6 | - response.headers['Cache-Control'].split(/,\s*/).should include("public") | 6 | + page.response_headers['Cache-Control'].split(/,\s*/).should include("public") |
7 | end | 7 | end |
8 | 8 | ||
9 | Then /^there must be no cache at all$/ do | 9 | Then /^there must be no cache at all$/ do |
10 | - parts = response.headers['Cache-Control'].split(/,\s*/) | 10 | + parts = page.response_headers['Cache-Control'].split(/,\s*/) |
11 | parts.should include('must-revalidate') | 11 | parts.should include('must-revalidate') |
12 | parts.should include('max-age=0') | 12 | parts.should include('max-age=0') |
13 | end | 13 | end |
features/step_definitions/internationalization_steps.rb
@@ -40,7 +40,7 @@ Given /^my browser prefers (.*)$/ do |lang| | @@ -40,7 +40,7 @@ Given /^my browser prefers (.*)$/ do |lang| | ||
40 | end | 40 | end |
41 | 41 | ||
42 | Then /^the site should be in (.*)$/ do |lang| | 42 | Then /^the site should be in (.*)$/ do |lang| |
43 | - response.should have_selector("html[lang=#{language_to_code(lang)}]") | ||
44 | - response.body.should match(/<strong>#{native_name(lang)}<\/strong>/) | 43 | + page.should have_selector("html[lang=#{language_to_code(lang)}]") |
44 | + page.body.should match(/<strong>#{native_name(lang)}<\/strong>/) | ||
45 | end | 45 | end |
46 | 46 |
features/step_definitions/invitation_steps.rb
@@ -9,7 +9,6 @@ Given /^I invite email "(.+)" to join community "(.+)"$/ do |email, community| | @@ -9,7 +9,6 @@ Given /^I invite email "(.+)" to join community "(.+)"$/ do |email, community| | ||
9 | end | 9 | end |
10 | 10 | ||
11 | Given /^I invite email "(.+)" to be my friend$/ do |email| | 11 | Given /^I invite email "(.+)" to be my friend$/ do |email| |
12 | - Given "I go to the Control panel" | ||
13 | click_link('Manage friends') | 12 | click_link('Manage friends') |
14 | click_link('Invite people from my e-mail contacts') | 13 | click_link('Invite people from my e-mail contacts') |
15 | click_button('Next') | 14 | click_button('Next') |
features/support/paths.rb
@@ -57,9 +57,6 @@ module NavigationHelpers | @@ -57,9 +57,6 @@ module NavigationHelpers | ||
57 | when /^(.*)'s leave page/ | 57 | when /^(.*)'s leave page/ |
58 | '/profile/%s/leave' % Profile.find_by_name($1).identifier | 58 | '/profile/%s/leave' % Profile.find_by_name($1).identifier |
59 | 59 | ||
60 | - when /^(.*)'s profile editor$/ | ||
61 | - "myprofile/manuel/profile_editor/edit" | ||
62 | - | ||
63 | when /^login page$/ | 60 | when /^login page$/ |
64 | '/account/login' | 61 | '/account/login' |
65 | 62 |