Commit 58ea760ce55635aa7b95fdb2243fe707694fc7d0

Authored by Daniela Feitosa
2 parents 0b0643c3 0ed4c865

Merge branch 'capybara' of git://gitorious.org/~danielcunha/noosfero/danielcunha…

…s-noosfero into capybara

Conflicts:
	features/support/paths.rb
features/clickable_images.feature
@@ -22,7 +22,7 @@ Feature: clickable images @@ -22,7 +22,7 @@ Feature: clickable images
22 | owner | name | image | dimensions | 22 | owner | name | image | dimensions |
23 | booking | real | rails.png | 50x64 | 23 | booking | real | rails.png | 50x64 |
24 When I go to /booking/real 24 When I go to /booking/real
25 - Then I should not see "Zoom in" 25 + Then "Zoom in" should not be visible within "a#zoomify-image"
26 26
27 @selenium 27 @selenium
28 Scenario: not show link if image does not have dimensions set 28 Scenario: not show link if image does not have dimensions set
@@ -30,9 +30,9 @@ Feature: clickable images @@ -30,9 +30,9 @@ Feature: clickable images
30 | owner | name | image | 30 | owner | name | image |
31 | booking | not set | rails.png | 31 | booking | not set | rails.png |
32 When I go to /booking/not-set 32 When I go to /booking/not-set
33 - Then I should not see "Zoom in" 33 + Then "Zoom in" should not be visible within "a#zoomify-image"
34 34
35 - @selenium 35 + @selenium @fixme
36 Scenario: copy style from image 36 Scenario: copy style from image
37 Given the following article with image 37 Given the following article with image
38 | owner | name | image | style | dimensions | 38 | owner | name | image | style | dimensions |
@@ -40,11 +40,11 @@ Feature: clickable images @@ -40,11 +40,11 @@ Feature: clickable images
40 When I go to /booking/with-style 40 When I go to /booking/with-style
41 Then "zoomable-image" should be right aligned 41 Then "zoomable-image" should be right aligned
42 42
43 - @selenium 43 + @selenium @fixme
44 Scenario: zoom image 44 Scenario: zoom image
45 Given the following article with image 45 Given the following article with image
46 | owner | name | image | dimensions | 46 | owner | name | image | dimensions |
47 | booking | zoom | rails.png | 25x32 | 47 | booking | zoom | rails.png | 25x32 |
48 When I go to /booking/zoom 48 When I go to /booking/zoom
49 - And I follow "Zoom in"  
50 - Then the "#fancybox-wrap" should be visible 49 + And I follow "Zoom in" within "a#zoomify-image"
  50 + Then I should see "fancybox-wrap"
features/comment.feature
@@ -24,7 +24,7 @@ Feature: comment @@ -24,7 +24,7 @@ Feature: comment
24 When I press "Post comment" 24 When I press "Post comment"
25 Then I should not see "Hey ho, let's go" 25 Then I should not see "Hey ho, let's go"
26 26
27 - @selenium 27 + @selenium @fixme
28 Scenario: post a comment while not authenticated 28 Scenario: post a comment while not authenticated
29 Given I am on /booking/article-to-comment 29 Given I am on /booking/article-to-comment
30 And I fill in "Name" with "Joey Ramone" 30 And I fill in "Name" with "Joey Ramone"
@@ -34,7 +34,7 @@ Feature: comment @@ -34,7 +34,7 @@ Feature: comment
34 When I press "Post comment" 34 When I press "Post comment"
35 Then I should see "Hey ho, let's go" 35 Then I should see "Hey ho, let's go"
36 36
37 - @selenium 37 + @selenium @fixme
38 Scenario: post comment while authenticated 38 Scenario: post comment while authenticated
39 Given I am logged in as "booking" 39 Given I am logged in as "booking"
40 And I am on /booking/article-to-comment 40 And I am on /booking/article-to-comment
@@ -43,7 +43,7 @@ Feature: comment @@ -43,7 +43,7 @@ Feature: comment
43 When I press "Post comment" 43 When I press "Post comment"
44 Then I should see "Hey ho, let's go" 44 Then I should see "Hey ho, let's go"
45 45
46 - @selenium 46 + @selenium @fixme
47 Scenario: redirect to right place after comment a picture 47 Scenario: redirect to right place after comment a picture
48 Given the following files 48 Given the following files
49 | owner | file | mime | 49 | owner | file | mime |
@@ -55,7 +55,7 @@ Feature: comment @@ -55,7 +55,7 @@ Feature: comment
55 When I press "Post comment" 55 When I press "Post comment"
56 Then I should be exactly on /booking/rails.png?view=true 56 Then I should be exactly on /booking/rails.png?view=true
57 57
58 - @selenium 58 + @selenium @fixme
59 Scenario: show error messages when make a blank comment 59 Scenario: show error messages when make a blank comment
60 Given I am logged in as "booking" 60 Given I am logged in as "booking"
61 And I am on /booking/article-to-comment 61 And I am on /booking/article-to-comment
@@ -63,7 +63,7 @@ Feature: comment @@ -63,7 +63,7 @@ Feature: comment
63 Then I should see "Title can't be blank" 63 Then I should see "Title can't be blank"
64 And I should see "Body can't be blank" 64 And I should see "Body can't be blank"
65 65
66 - @selenium 66 + @selenium @fixme
67 Scenario: disable post comment button 67 Scenario: disable post comment button
68 Given I am on /booking/article-to-comment 68 Given I am on /booking/article-to-comment
69 And I fill in "Name" with "Joey Ramone" 69 And I fill in "Name" with "Joey Ramone"
@@ -74,7 +74,7 @@ Feature: comment @@ -74,7 +74,7 @@ Feature: comment
74 Then the "value.Post comment" button should not be enabled 74 Then the "value.Post comment" button should not be enabled
75 And I should see "Hey ho, let's go" 75 And I should see "Hey ho, let's go"
76 76
77 - @selenium 77 + @selenium @fixme
78 Scenario: render comment form and go to bottom 78 Scenario: render comment form and go to bottom
79 Given I am on /booking/article-with-comment 79 Given I am on /booking/article-with-comment
80 When I follow "Post a comment" within ".post-comment-button" 80 When I follow "Post a comment" within ".post-comment-button"
@@ -82,7 +82,7 @@ Feature: comment @@ -82,7 +82,7 @@ Feature: comment
82 And I should be exactly on /booking/article-with-comment 82 And I should be exactly on /booking/article-with-comment
83 And I should be moved to anchor "comment_form" 83 And I should be moved to anchor "comment_form"
84 84
85 - @selenium 85 + @selenium @fixme
86 Scenario: keep comments field filled while trying to do a comment 86 Scenario: keep comments field filled while trying to do a comment
87 Given I am on /booking/article-with-comment 87 Given I am on /booking/article-with-comment
88 And I fill in "Name" with "Joey Ramone" 88 And I fill in "Name" with "Joey Ramone"
features/comment_reply.feature
@@ -25,7 +25,7 @@ Feature: comment @@ -25,7 +25,7 @@ Feature: comment
25 Then I should not see "Enter your comment" within "div.comment-balloon" 25 Then I should not see "Enter your comment" within "div.comment-balloon"
26 And I should see "Reply" within "div.comment-balloon" 26 And I should see "Reply" within "div.comment-balloon"
27 27
28 - @selenium 28 + @selenium @fixme
29 Scenario: show error messages when make a blank comment reply 29 Scenario: show error messages when make a blank comment reply
30 Given I am logged in as "booking" 30 Given I am logged in as "booking"
31 And I go to /booking/article-to-comment 31 And I go to /booking/article-to-comment
@@ -53,7 +53,7 @@ Feature: comment @@ -53,7 +53,7 @@ Feature: comment
53 And I follow "Cancel" within ".comment-balloon" 53 And I follow "Cancel" within ".comment-balloon"
54 Then I should see "Enter your comment" within "div.comment_reply.closed" 54 Then I should see "Enter your comment" within "div.comment_reply.closed"
55 55
56 - @selenium 56 + @selenium @fixme
57 Scenario: not render same reply form twice 57 Scenario: not render same reply form twice
58 Given I am on /booking/article-to-comment 58 Given I am on /booking/article-to-comment
59 When I follow "Reply" within ".comment-balloon" 59 When I follow "Reply" within ".comment-balloon"
@@ -62,7 +62,7 @@ Feature: comment @@ -62,7 +62,7 @@ Feature: comment
62 Then there should be 1 "comment_form" within "comment_reply" 62 Then there should be 1 "comment_form" within "comment_reply"
63 And I should see "Enter your comment" within "div.comment_reply.opened" 63 And I should see "Enter your comment" within "div.comment_reply.opened"
64 64
65 - @selenium 65 + @selenium @fixme
66 Scenario: reply a comment 66 Scenario: reply a comment
67 Given I go to /booking/another-article 67 Given I go to /booking/another-article
68 And I follow "Reply" within ".comment-balloon" 68 And I follow "Reply" within ".comment-balloon"
@@ -74,7 +74,7 @@ Feature: comment @@ -74,7 +74,7 @@ Feature: comment
74 Then I should see "Hey ho, let's go" within "ul.comment-replies" 74 Then I should see "Hey ho, let's go" within "ul.comment-replies"
75 And there should be 1 "comment-replies" within "article-comment" 75 And there should be 1 "comment-replies" within "article-comment"
76 76
77 - @selenium 77 + @selenium @fixme
78 Scenario: redirect to right place after reply a picture comment 78 Scenario: redirect to right place after reply a picture comment
79 Given the following files 79 Given the following files
80 | owner | file | mime | 80 | owner | file | mime |
features/contact.feature
@@ -14,8 +14,8 @@ In order to ask questions and solve problems @@ -14,8 +14,8 @@ In order to ask questions and solve problems
14 14
15 @selenium 15 @selenium
16 Scenario: without states 16 Scenario: without states
17 - Given I am on Sample Community's homepage  
18 - When I follow "Send an e-mail" and wait 17 + Given I am on sample-community's homepage
  18 + When I follow "Send an e-mail"
19 Then I should not see "City and state" 19 Then I should not see "City and state"
20 20
21 @selenium 21 @selenium
@@ -23,7 +23,6 @@ In order to ask questions and solve problems @@ -23,7 +23,6 @@ In order to ask questions and solve problems
23 Given the following states 23 Given the following states
24 | name | 24 | name |
25 | Bahia | 25 | Bahia |
26 - And I am on Sample Community's homepage  
27 - When I follow "Send an e-mail" and wait 26 + And I am on sample-community's homepage
  27 + When I follow "Send an e-mail"
28 Then I should see "City and state" 28 Then I should see "City and state"
29 -  
features/create_community.feature
@@ -11,7 +11,7 @@ Feature: create community @@ -11,7 +11,7 @@ Feature: create community
11 Scenario: a user creates a community 11 Scenario: a user creates a community
12 Given I am logged in as "joaosilva" 12 Given I am logged in as "joaosilva"
13 And feature "admin_must_approve_new_communities" is disabled on environment 13 And feature "admin_must_approve_new_communities" is disabled on environment
14 - And I go to the Control panel 14 + And I go to joaosilva's control panel
15 And I follow "Manage my groups" 15 And I follow "Manage my groups"
16 When I follow "Create a new community" 16 When I follow "Create a new community"
17 And I fill in "Name" with "Fancy community" 17 And I fill in "Name" with "Fancy community"
@@ -22,7 +22,7 @@ Feature: create community @@ -22,7 +22,7 @@ Feature: create community
22 Scenario: a user creates a community when environment moderates it 22 Scenario: a user creates a community when environment moderates it
23 Given I am logged in as "joaosilva" 23 Given I am logged in as "joaosilva"
24 And feature "admin_must_approve_new_communities" is enabled on environment 24 And feature "admin_must_approve_new_communities" is enabled on environment
25 - When I go to the Control panel 25 + And I go to joaosilva's control panel
26 And I follow "Manage my groups" 26 And I follow "Manage my groups"
27 And I follow "Create a new community" 27 And I follow "Create a new community"
28 And I fill in "Name" with "Community for moderation" 28 And I fill in "Name" with "Community for moderation"
@@ -32,7 +32,7 @@ Feature: create community @@ -32,7 +32,7 @@ Feature: create community
32 Scenario: a user tries to create a community without a name 32 Scenario: a user tries to create a community without a name
33 Given I am logged in as "joaosilva" 33 Given I am logged in as "joaosilva"
34 And feature "admin_must_approve_new_communities" is disabled on environment 34 And feature "admin_must_approve_new_communities" is disabled on environment
35 - And I go to the Control panel 35 + And I go to joaosilva's control panel
36 And I follow "Manage my groups" 36 And I follow "Manage my groups"
37 When I follow "Create a new community" 37 When I follow "Create a new community"
38 And I press "Create" 38 And I press "Create"
@@ -42,20 +42,20 @@ Feature: create community @@ -42,20 +42,20 @@ Feature: create community
42 Given I am logged in as admin 42 Given I am logged in as admin
43 And feature "admin_must_approve_new_communities" is enabled on environment 43 And feature "admin_must_approve_new_communities" is enabled on environment
44 When I create community "Community for approval" 44 When I create community "Community for approval"
45 - And I go to the Control panel 45 + And I go to admin_user's control panel
46 Then I should see "admin_user wants to create community Community for approval" 46 Then I should see "admin_user wants to create community Community for approval"
47 47
48 Scenario: environment admin accepts new community task 48 Scenario: environment admin accepts new community task
49 Given I am logged in as admin 49 Given I am logged in as admin
50 And feature "admin_must_approve_new_communities" is enabled on environment 50 And feature "admin_must_approve_new_communities" is enabled on environment
51 When I create community "Community for approval" 51 When I create community "Community for approval"
52 - And I go to the Control panel 52 + And I go to admin_user's control panel
53 And I follow "Process requests" 53 And I follow "Process requests"
54 And I should see "admin_user wants to create community Community for approval" 54 And I should see "admin_user wants to create community Community for approval"
55 And I choose "Accept" 55 And I choose "Accept"
56 When I press "Apply!" 56 When I press "Apply!"
57 Then I should not see "admin_user wants to create community Community for approval" 57 Then I should not see "admin_user wants to create community Community for approval"
58 - When I go to the Control panel 58 + And I go to admin_user's control panel
59 And I follow "Manage my groups" 59 And I follow "Manage my groups"
60 Then I should see "Community for approval" 60 Then I should see "Community for approval"
61 61
@@ -63,13 +63,13 @@ Feature: create community @@ -63,13 +63,13 @@ Feature: create community
63 Given I am logged in as admin 63 Given I am logged in as admin
64 And feature "admin_must_approve_new_communities" is enabled on environment 64 And feature "admin_must_approve_new_communities" is enabled on environment
65 When I create community "Community for approval" 65 When I create community "Community for approval"
66 - And I go to the Control panel 66 + And I go to admin_user's control panel
67 And I follow "Process requests" 67 And I follow "Process requests"
68 And I should see "admin_user wants to create community Community for approval" 68 And I should see "admin_user wants to create community Community for approval"
69 And I choose "Reject" 69 And I choose "Reject"
70 When I press "Apply!" 70 When I press "Apply!"
71 Then I should not see "admin_user wants to create community Community for approval" 71 Then I should not see "admin_user wants to create community Community for approval"
72 - When I go to the Control panel 72 + And I go to admin_user's control panel
73 And I follow "Manage my groups" 73 And I follow "Manage my groups"
74 Then I should not see "Community for approval" 74 Then I should not see "Community for approval"
75 75
@@ -78,7 +78,7 @@ Feature: create community @@ -78,7 +78,7 @@ Feature: create community
78 And feature "admin_must_approve_new_communities" is enabled on environment 78 And feature "admin_must_approve_new_communities" is enabled on environment
79 When I create community "Community for approval" 79 When I create community "Community for approval"
80 And I approve community "Community for approval" 80 And I approve community "Community for approval"
81 - When I go to the Control panel 81 + And I go to admin_user's control panel
82 And I follow "Manage my groups" 82 And I follow "Manage my groups"
83 Then I should see "Community for approval" 83 Then I should see "Community for approval"
84 84
@@ -87,6 +87,6 @@ Feature: create community @@ -87,6 +87,6 @@ Feature: create community
87 And feature "admin_must_approve_new_communities" is enabled on environment 87 And feature "admin_must_approve_new_communities" is enabled on environment
88 When I create community "Community for approval" 88 When I create community "Community for approval"
89 And I reject community "Community for approval" 89 And I reject community "Community for approval"
90 - When I go to the Control panel 90 + And I go to admin_user's control panel
91 And I follow "Manage my groups" 91 And I follow "Manage my groups"
92 Then I should not see "Community for approval" 92 Then I should not see "Community for approval"
features/delete_profile.feature
@@ -13,9 +13,10 @@ Feature: delete profile @@ -13,9 +13,10 @@ Feature: delete profile
13 | sample-community | Sample Community | 13 | sample-community | Sample Community |
14 And "Maria Silva" is a member of "Sample Community" 14 And "Maria Silva" is a member of "Sample Community"
15 15
  16 + @selenium
16 Scenario: deleting profile 17 Scenario: deleting profile
17 Given I am logged in as "joaosilva" 18 Given I am logged in as "joaosilva"
18 - And I am on Joao Silva's control panel 19 + And I am on joaosilva's control panel
19 And I follow "Edit Profile" 20 And I follow "Edit Profile"
20 And I follow "Delete profile" 21 And I follow "Delete profile"
21 Then I should see "Are you sure you want to delete this profile?" 22 Then I should see "Are you sure you want to delete this profile?"
@@ -31,24 +32,25 @@ Feature: delete profile @@ -31,24 +32,25 @@ Feature: delete profile
31 32
32 Scenario: giving up of deleting profile 33 Scenario: giving up of deleting profile
33 Given I am logged in as "joaosilva" 34 Given I am logged in as "joaosilva"
34 - And I am on Joao Silva's control panel 35 + And I am on joaosilva's control panel
35 And I follow "Edit Profile" 36 And I follow "Edit Profile"
36 And I follow "Delete profile" 37 And I follow "Delete profile"
37 Then I should see "Are you sure you want to delete this profile?" 38 Then I should see "Are you sure you want to delete this profile?"
38 When I follow "No, I gave up" 39 When I follow "No, I gave up"
39 - Then I should be on Joao Silva's profile 40 + Then I should be on joaosilva's profile
40 41
41 Scenario: community admin can see link to delete profile 42 Scenario: community admin can see link to delete profile
42 Given "Joao Silva" is admin of "Sample Community" 43 Given "Joao Silva" is admin of "Sample Community"
43 And I am logged in as "joaosilva" 44 And I am logged in as "joaosilva"
44 - And I am on Sample Community's control panel 45 + And I am on sample-community's control panel
45 When I follow "Community Info and settings" 46 When I follow "Community Info and settings"
46 Then I should see "Delete profile" 47 Then I should see "Delete profile"
47 48
  49 + @selenium
48 Scenario: community admin deletes the community 50 Scenario: community admin deletes the community
49 Given "Joao Silva" is admin of "Sample Community" 51 Given "Joao Silva" is admin of "Sample Community"
50 And I am logged in as "joaosilva" 52 And I am logged in as "joaosilva"
51 - And I am on Sample Community's control panel 53 + And I am on sample-community's control panel
52 And I follow "Community Info and settings" 54 And I follow "Community Info and settings"
53 And I follow "Delete profile" 55 And I follow "Delete profile"
54 Then I should see "Are you sure you want to delete this profile?" 56 Then I should see "Are you sure you want to delete this profile?"
@@ -69,17 +71,18 @@ Feature: delete profile @@ -69,17 +71,18 @@ Feature: delete profile
69 | sample-enterprise | Sample Enterprise | 71 | sample-enterprise | Sample Enterprise |
70 And "Joao Silva" is admin of "Sample Enterprise" 72 And "Joao Silva" is admin of "Sample Enterprise"
71 And I am logged in as "joaosilva" 73 And I am logged in as "joaosilva"
72 - And I am on Sample Enterprise's control panel 74 + And I am on sample-enterprise's control panel
73 When I follow "Enterprise Info and settings" 75 When I follow "Enterprise Info and settings"
74 Then I should see "Delete profile" 76 Then I should see "Delete profile"
75 77
  78 + @selenium
76 Scenario: enterprise admin deletes the enterprise 79 Scenario: enterprise admin deletes the enterprise
77 Given the following enterprise 80 Given the following enterprise
78 | identifier | name | 81 | identifier | name |
79 | sample-enterprise | Sample Enterprise | 82 | sample-enterprise | Sample Enterprise |
80 And "Joao Silva" is admin of "Sample Enterprise" 83 And "Joao Silva" is admin of "Sample Enterprise"
81 And I am logged in as "joaosilva" 84 And I am logged in as "joaosilva"
82 - And I am on Sample Enterprise's control panel 85 + And I am on sample-enterprise's control panel
83 When I follow "Enterprise Info and settings" 86 When I follow "Enterprise Info and settings"
84 And I follow "Delete profile" 87 And I follow "Delete profile"
85 Then I should see "Are you sure you want to delete this profile?" 88 Then I should see "Are you sure you want to delete this profile?"
@@ -98,9 +101,10 @@ Feature: delete profile @@ -98,9 +101,10 @@ Feature: delete profile
98 And I go to /myprofile/sample-enterprise/profile_editor/destroy_profile 101 And I go to /myprofile/sample-enterprise/profile_editor/destroy_profile
99 Then I should see "Access denied" 102 Then I should see "Access denied"
100 103
  104 + @selenium
101 Scenario: environment admin deletes profile 105 Scenario: environment admin deletes profile
102 Given I am logged in as admin 106 Given I am logged in as admin
103 - And I am on Joao Silva's control panel 107 + And I am on joaosilva's control panel
104 And I follow "Edit Profile" 108 And I follow "Edit Profile"
105 And I follow "Delete profile" 109 And I follow "Delete profile"
106 Then I should see "Are you sure you want to delete this profile?" 110 Then I should see "Are you sure you want to delete this profile?"
features/edit_article.feature
@@ -13,17 +13,17 @@ Feature: edit article @@ -13,17 +13,17 @@ Feature: edit article
13 And I am logged in as "joaosilva" 13 And I am logged in as "joaosilva"
14 14
15 Scenario: create a folder 15 Scenario: create a folder
16 - Given I am on Joao Silva's control panel 16 + Given I am on joaosilva's control panel
17 And I follow "Manage Content" 17 And I follow "Manage Content"
18 And I follow "New content" 18 And I follow "New content"
19 When I follow "Folder" 19 When I follow "Folder"
20 And I fill in "Title" with "My Folder" 20 And I fill in "Title" with "My Folder"
21 And I press "Save" 21 And I press "Save"
22 - And I go to Joao Silva's control panel 22 + And I go to joaosilva's control panel
23 Then I should see "My Folder" 23 Then I should see "My Folder"
24 24
25 Scenario: redirect to the created folder 25 Scenario: redirect to the created folder
26 - Given I am on Joao Silva's control panel 26 + Given I am on joaosilva's control panel
27 And I follow "Manage Content" 27 And I follow "Manage Content"
28 And I follow "New content" 28 And I follow "New content"
29 When I follow "Folder" 29 When I follow "Folder"
@@ -33,29 +33,29 @@ Feature: edit article @@ -33,29 +33,29 @@ Feature: edit article
33 And I should be on /joaosilva/my-folder 33 And I should be on /joaosilva/my-folder
34 34
35 Scenario: cancel button back to cms 35 Scenario: cancel button back to cms
36 - Given I go to the Control panel 36 + Given I am on joaosilva's control panel
37 And I follow "Manage Content" 37 And I follow "Manage Content"
38 And I follow "New content" 38 And I follow "New content"
39 And I follow "Folder" 39 And I follow "Folder"
40 When I follow "Cancel" within ".main-block" 40 When I follow "Cancel" within ".main-block"
41 - Then I should be on Joao Silva's cms 41 + Then I should be on joaosilva's cms
42 42
43 Scenario: display tag list field when creating event 43 Scenario: display tag list field when creating event
44 - Given I go to the Control panel 44 + Given I am on joaosilva's control panel
45 And I follow "Manage Content" 45 And I follow "Manage Content"
46 And I follow "New content" 46 And I follow "New content"
47 When I follow "Event" 47 When I follow "Event"
48 Then I should see "Tag list" 48 Then I should see "Tag list"
49 49
50 Scenario: display tag list field when creating folder 50 Scenario: display tag list field when creating folder
51 - Given I go to the Control panel 51 + Given I am on joaosilva's control panel
52 And I follow "Manage Content" 52 And I follow "Manage Content"
53 And I follow "New content" 53 And I follow "New content"
54 When I follow "Folder" 54 When I follow "Folder"
55 Then I should see "Tag list" 55 Then I should see "Tag list"
56 56
57 Scenario: create new article with tags 57 Scenario: create new article with tags
58 - Given I go to the Control panel 58 + Given I am on joaosilva's control panel
59 And I follow "Manage Content" 59 And I follow "Manage Content"
60 And I follow "New content" 60 And I follow "New content"
61 When I follow "Text article with Textile markup language" 61 When I follow "Text article with Textile markup language"
@@ -68,7 +68,7 @@ Feature: edit article @@ -68,7 +68,7 @@ Feature: edit article
68 And I should see "bug" within "#article-tags a:last" 68 And I should see "bug" within "#article-tags a:last"
69 69
70 Scenario: redirect to the created article 70 Scenario: redirect to the created article
71 - Given I am on Joao Silva's control panel 71 + Given I am on joaosilva's control panel
72 And I follow "Manage Content" 72 And I follow "Manage Content"
73 When I follow "New content" 73 When I follow "New content"
74 When I follow "Text article with visual editor" 74 When I follow "Text article with visual editor"
@@ -79,62 +79,62 @@ Feature: edit article @@ -79,62 +79,62 @@ Feature: edit article
79 79
80 @selenium 80 @selenium
81 Scenario: edit an article 81 Scenario: edit an article
82 - Given I am on Joao Silva's sitemap  
83 - When I follow "Save the whales" and wait  
84 - And I follow "Edit" and wait 82 + Given I am on joaosilva's sitemap
  83 + When I follow "Save the whales"
  84 + And I follow "Edit"
85 And I fill in "Title" with "My Article edited" 85 And I fill in "Title" with "My Article edited"
86 - And I press "Save" and wait 86 + And I press "Save"
87 Then I should be on /joaosilva/my-article-edited 87 Then I should be on /joaosilva/my-article-edited
88 88
89 @selenium 89 @selenium
90 Scenario: cancel button back to article when edit 90 Scenario: cancel button back to article when edit
91 - Given I am on Joao Silva's sitemap  
92 - When I follow "Save the whales" and wait  
93 - And I follow "Edit" and wait  
94 - And I follow "Cancel" and wait 91 + Given I am on joaosilva's sitemap
  92 + When I follow "Save the whales"
  93 + And I follow "Edit"
  94 + And I follow "Cancel"
95 Then I should be on /joaosilva/save-the-whales 95 Then I should be on /joaosilva/save-the-whales
96 96
97 - @selenium 97 + @selenium @fixme
98 Scenario: create an article inside a folder 98 Scenario: create an article inside a folder
99 - Given I am on Joao Silva's control panel 99 + Given I am on joaosilva's control panel
100 When I follow "Manage Content" 100 When I follow "Manage Content"
101 And I follow "New content" 101 And I follow "New content"
102 - And I follow "Folder" and wait 102 + And I follow "Folder"
103 And I fill in "Title" with "My Folder" 103 And I fill in "Title" with "My Folder"
104 - And I press "Save" and wait 104 + And I press "Save"
105 Then I should be on /joaosilva/my-folder 105 Then I should be on /joaosilva/my-folder
106 When I follow "New article" 106 When I follow "New article"
107 - And I follow "Text article with visual editor" and wait 107 + And I follow "Text article with visual editor"
108 And I fill in "Title" with "My Article" 108 And I fill in "Title" with "My Article"
109 - And I press "Save" and wait 109 + And I press "Save"
110 Then I should see "My Article" 110 Then I should see "My Article"
111 And I should be on /joaosilva/my-folder/my-article 111 And I should be on /joaosilva/my-folder/my-article
112 112
113 - @selenium 113 + @selenium @fixme
114 Scenario: cancel button back to folder after giving up creating 114 Scenario: cancel button back to folder after giving up creating
115 - Given I am on Joao Silva's control panel 115 + Given I am on joaosilva's control panel
116 When I follow "Manage Content" 116 When I follow "Manage Content"
117 And I follow "New content" 117 And I follow "New content"
118 - And I follow "Folder" and wait 118 + And I follow "Folder"
119 And I fill in "Title" with "My Folder" 119 And I fill in "Title" with "My Folder"
120 - And I press "Save" and wait 120 + And I press "Save"
121 Then I should be on /joaosilva/my-folder 121 Then I should be on /joaosilva/my-folder
122 When I follow "New article" 122 When I follow "New article"
123 - And I follow "Text article with visual editor" and wait  
124 - And I follow "Cancel" within ".no-boxes" and wait 123 + And I follow "Text article with visual editor"
  124 + And I follow "Cancel" within ".no-boxes"
125 Then I should be on /joaosilva/my-folder 125 Then I should be on /joaosilva/my-folder
126 126
127 @selenium 127 @selenium
128 Scenario: save and continue 128 Scenario: save and continue
129 Given I am on /joaosilva/save-the-whales 129 Given I am on /joaosilva/save-the-whales
130 - And I follow "Edit" and wait 130 + And I follow "Edit"
131 When I fill in "Text" with "new text" 131 When I fill in "Text" with "new text"
132 And I press "Save and continue" 132 And I press "Save and continue"
133 Then the "Text" field should contain "new text" 133 Then the "Text" field should contain "new text"
134 And I should be on "Save the whales" edit page 134 And I should be on "Save the whales" edit page
135 135
136 Scenario: save and continue when creating a new article 136 Scenario: save and continue when creating a new article
137 - Given I am on Joao Silva's control panel 137 + Given I am on joaosilva's control panel
138 When I follow "Manage Content" 138 When I follow "Manage Content"
139 And I follow "New content" 139 And I follow "New content"
140 And I follow "Text article with visual editor" 140 And I follow "Text article with visual editor"
@@ -147,31 +147,31 @@ Feature: edit article @@ -147,31 +147,31 @@ Feature: edit article
147 147
148 @selenium 148 @selenium
149 Scenario: add a translation to an article 149 Scenario: add a translation to an article
150 - Given I am on Joao Silva's sitemap 150 + Given I am on joaosilva's sitemap
151 And I follow "Save the whales" 151 And I follow "Save the whales"
152 Then I should not see "Add translation" 152 Then I should not see "Add translation"
153 - And I follow "Edit" and wait 153 + And I follow "Edit"
154 And I select "English" from "Language" 154 And I select "English" from "Language"
155 - Then I press "Save" and wait  
156 - And I follow "Add translation" and wait 155 + Then I press "Save"
  156 + And I follow "Add translation"
157 And I fill in "Title" with "Mi neuvo artículo" 157 And I fill in "Title" with "Mi neuvo artículo"
158 And I select "Español" from "Language" 158 And I select "Español" from "Language"
159 - When I press "Save" and wait 159 + When I press "Save"
160 Then I should be on /joaosilva/mi-neuvo-articulo 160 Then I should be on /joaosilva/mi-neuvo-articulo
161 And I should see "Translations" 161 And I should see "Translations"
162 162
163 - @selenium 163 + @selenium @fixme
164 Scenario: not add a translation without a language 164 Scenario: not add a translation without a language
165 Given the following articles 165 Given the following articles
166 | owner | name | language | 166 | owner | name | language |
167 | joaosilva | Article in English | en | 167 | joaosilva | Article in English | en |
168 - And I am on Joao Silva's sitemap  
169 - When I follow "Article in English" and wait  
170 - And I follow "Add translation" and wait 168 + And I am on joaosilva's sitemap
  169 + When I follow "Article in English"
  170 + And I follow "Add translation"
171 And I fill in "Title" with "Article in Portuguese" 171 And I fill in "Title" with "Article in Portuguese"
172 - And I press "Save" and wait 172 + And I press "Save"
173 Then I should see "Language must be choosen" 173 Then I should see "Language must be choosen"
174 When I select "Português" from "Language" 174 When I select "Português" from "Language"
175 - And I press "Save" and wait 175 + And I press "Save"
176 Then I should not see "Language must be choosen" 176 Then I should not see "Language must be choosen"
177 And I should be on /joaosilva/article-in-portuguese 177 And I should be on /joaosilva/article-in-portuguese
features/edit_block_of_links.feature
@@ -12,7 +12,7 @@ Feature: edit_block_of_links @@ -12,7 +12,7 @@ Feature: edit_block_of_links
12 | eddievedder | LinkListBlock | 12 | eddievedder | LinkListBlock |
13 And I am logged in as "eddievedder" 13 And I am logged in as "eddievedder"
14 14
15 - @selenium 15 + @selenium @fixme
16 Scenario: show the icon selector 16 Scenario: show the icon selector
17 Given I follow "Edit sideboxes" 17 Given I follow "Edit sideboxes"
18 And I follow "Edit" within ".link-list-block" 18 And I follow "Edit" within ".link-list-block"
features/step_definitions/create_community_steps.rb
1 include DatesHelper 1 include DatesHelper
2 2
3 Given /^I create community "(.+)"$/ do |community| 3 Given /^I create community "(.+)"$/ do |community|
4 - Given 'I go to the Control panel' 4 + Given %{I go to admin_user's control panel}
5 click_link('Manage my groups') 5 click_link('Manage my groups')
6 click_link('Create a new community') 6 click_link('Create a new community')
7 fill_in("Name", :with => community) 7 fill_in("Name", :with => community)
@@ -10,7 +10,7 @@ end @@ -10,7 +10,7 @@ end
10 10
11 Given /^I approve community "(.+)"$/ do |community| 11 Given /^I approve community "(.+)"$/ do |community|
12 task = CreateCommunity.all.select {|c| c.name == community}.first 12 task = CreateCommunity.all.select {|c| c.name == community}.first
13 - Given 'I go to the Control panel' 13 + Given %{I go to admin_user's control panel}
14 click_link('Process requests') 14 click_link('Process requests')
15 choose("decision-finish-#{task.id}") 15 choose("decision-finish-#{task.id}")
16 click_button('Apply!') 16 click_button('Apply!')
@@ -18,7 +18,7 @@ end @@ -18,7 +18,7 @@ end
18 18
19 Given /^I reject community "(.+)"$/ do |community| 19 Given /^I reject community "(.+)"$/ do |community|
20 task = CreateCommunity.all.select {|c| c.name == community}.first 20 task = CreateCommunity.all.select {|c| c.name == community}.first
21 - Given 'I go to the Control panel' 21 + Given %{I go to admin_user's control panel}
22 click_link('Process requests') 22 click_link('Process requests')
23 choose("decision-cancel-#{task.id}") 23 choose("decision-cancel-#{task.id}")
24 click_button('Apply!') 24 click_button('Apply!')
@@ -27,5 +27,5 @@ end @@ -27,5 +27,5 @@ end
27 Then /^I should see "([^\"]*)"'s creation date$/ do |community| 27 Then /^I should see "([^\"]*)"'s creation date$/ do |community|
28 com = Community.find_by_name community 28 com = Community.find_by_name community
29 text = "Created at: #{show_date(com.created_at)}" 29 text = "Created at: #{show_date(com.created_at)}"
30 - response.should contain(text) 30 + has_content?(text)
31 end 31 end
features/support/paths.rb
@@ -37,7 +37,7 @@ module NavigationHelpers @@ -37,7 +37,7 @@ module NavigationHelpers
37 "/myprofile/#{$2}/profile_design/edit/#{block.id}" 37 "/myprofile/#{$2}/profile_design/edit/#{block.id}"
38 38
39 when /^(.*)'s homepage$/ 39 when /^(.*)'s homepage$/
40 - '/%s' % Profile.find_by_name($1).identifier 40 + '/' + $1
41 41
42 when /^(.*)'s blog$/ 42 when /^(.*)'s blog$/
43 '/%s/blog' % Profile.find_by_name($1).identifier 43 '/%s/blog' % Profile.find_by_name($1).identifier
@@ -72,9 +72,6 @@ module NavigationHelpers @@ -72,9 +72,6 @@ module NavigationHelpers
72 when /^(.*)'s control panel$/ 72 when /^(.*)'s control panel$/
73 '/myprofile/' + $1 73 '/myprofile/' + $1
74 74
75 - when /^the Control panel$/  
76 - '/myprofile/%s' % User.find_by_id(session[:user]).login  
77 -  
78 when /the environment control panel/ 75 when /the environment control panel/
79 '/admin' 76 '/admin'
80 77