Commit e0a45ee75dfa4c412d295af7ef01a621c8a3f50c
1 parent
ef85b420
Exists in
master
and in
23 other branches
chat.feature
Showing
3 changed files
with
21 additions
and
20 deletions
Show diff stats
features/chat.feature
| ... | ... | @@ -17,7 +17,8 @@ Feature: chat |
| 17 | 17 | Scenario: provide link to open chat |
| 18 | 18 | Given feature "xmpp_chat" is enabled on environment |
| 19 | 19 | And I am logged in as "tame" |
| 20 | - Then I should see "Open chat" link | |
| 20 | + And I wait | |
| 21 | + Then I should see "Open chat" within "a#openchat" | |
| 21 | 22 | |
| 22 | 23 | @selenium |
| 23 | 24 | Scenario: provide the chat online users content |
| ... | ... | @@ -30,18 +31,18 @@ Feature: chat |
| 30 | 31 | Given the profile "tame" has no blocks |
| 31 | 32 | And feature "xmpp_chat" is enabled on environment |
| 32 | 33 | And I am logged in as "tame" |
| 33 | - And I go to Tame's profile | |
| 34 | - When I click "#chat-online-users-title" | |
| 34 | + And I go to tame's profile | |
| 35 | + When I follow "chat-online-users-title" | |
| 35 | 36 | Then I should see "Maria Silva" |
| 36 | 37 | And I should see "Jose Silva" |
| 37 | 38 | |
| 38 | 39 | Scenario: not provide link to chat when environment not support that |
| 39 | 40 | Given I am logged in as "tame" |
| 40 | - Then I should not see "Open chat" link | |
| 41 | + Then I should not see "Open chat" within "a#openchat" | |
| 41 | 42 | |
| 42 | 43 | Scenario: not provide link to chat when the user is logged out |
| 43 | - Given I am on Tame's homepage | |
| 44 | - Then I should not see "Open chat" link | |
| 44 | + Given I am on tame's homepage | |
| 45 | + Then I should not see "Open chat" within "a#openchat" | |
| 45 | 46 | |
| 46 | 47 | @selenium |
| 47 | 48 | Scenario: not provide the chat online users list when environment not support that |
| ... | ... | @@ -71,8 +72,8 @@ Feature: chat |
| 71 | 72 | Given the profile "tame" has no blocks |
| 72 | 73 | And feature "xmpp_chat" is enabled on environment |
| 73 | 74 | And I am logged in as "tame" |
| 74 | - And I go to Tame's profile | |
| 75 | - When I click "#chat-online-users-title" | |
| 75 | + And I go to tame's profile | |
| 76 | + When I follow "chat-online-users-title" | |
| 76 | 77 | And I follow "Maria Silva" |
| 77 | 78 | And I select window "noosfero_chat" |
| 78 | 79 | Then I should see "Chat - Colivre.net - Friends online (0)" |
| ... | ... | @@ -83,7 +84,7 @@ Feature: chat |
| 83 | 84 | And I am logged in as "tame" |
| 84 | 85 | When I follow "Open chat" |
| 85 | 86 | And I select window "noosfero_chat" |
| 86 | - Then I should see "Offline" link | |
| 87 | + Then I should see "Offline" within "a" | |
| 87 | 88 | |
| 88 | 89 | @selenium |
| 89 | 90 | Scenario: view options to change my chat status through menu |
| ... | ... | @@ -107,8 +108,8 @@ Feature: chat |
| 107 | 108 | And "Tame" is a member of "Autoramas" |
| 108 | 109 | And feature "xmpp_chat" is enabled on environment |
| 109 | 110 | And I am logged in as "tame" |
| 110 | - When I go to Autoramas's profile | |
| 111 | - Then I should see "Enter chat room" link | |
| 111 | + When I go to autoramas's profile | |
| 112 | + Then I should see "Enter chat room" | |
| 112 | 113 | |
| 113 | 114 | @selenium |
| 114 | 115 | Scenario: not see link to open chatroom of a community if not a member |
| ... | ... | @@ -117,8 +118,8 @@ Feature: chat |
| 117 | 118 | | autoramas | Autoramas | |
| 118 | 119 | And feature "xmpp_chat" is enabled on environment |
| 119 | 120 | And I am logged in as "tame" |
| 120 | - When I go to Autoramas's profile | |
| 121 | - Then I should not see "Enter chat room" link | |
| 121 | + When I go to autoramas's profile | |
| 122 | + Then I should not see "Enter chat room" within "a" | |
| 122 | 123 | |
| 123 | 124 | @selenium |
| 124 | 125 | Scenario: not see link to open chatroom of a community if xmpp_chat disabled |
| ... | ... | @@ -127,8 +128,8 @@ Feature: chat |
| 127 | 128 | | autoramas | Autoramas | |
| 128 | 129 | And "Tame" is a member of "Autoramas" |
| 129 | 130 | And I am logged in as "tame" |
| 130 | - When I go to Autoramas's profile | |
| 131 | - Then I should not see "Enter chat room" link | |
| 131 | + When I go to autoramas's profile | |
| 132 | + Then I should not see "Enter chat room" within "a" | |
| 132 | 133 | |
| 133 | 134 | @selenium |
| 134 | 135 | Scenario: open chatroom of a community in a new window |
| ... | ... | @@ -138,7 +139,7 @@ Feature: chat |
| 138 | 139 | | autoramas | Autoramas | |
| 139 | 140 | And "Tame" is a member of "Autoramas" |
| 140 | 141 | And I am logged in as "tame" |
| 141 | - When I go to Autoramas's profile | |
| 142 | + When I go to autoramas's profile | |
| 142 | 143 | And I follow "Enter chat room" |
| 143 | 144 | And I select window "noosfero_chat" |
| 144 | 145 | Then I should see "Chat - Colivre.net - Friends online (0)" | ... | ... |
features/support/paths.rb
| ... | ... | @@ -49,10 +49,7 @@ module NavigationHelpers |
| 49 | 49 | '/profile/%s/sitemap' % Profile.find_by_name($1).identifier |
| 50 | 50 | |
| 51 | 51 | when /^(.*)'s profile$/ |
| 52 | - '/profile/%s' % Profile.find_by_name($1).identifier | |
| 53 | - | |
| 54 | - when /^the profile$/ | |
| 55 | - '/profile/%s' % User.find_by_id(session[:user]).login | |
| 52 | + '/profile/' + $1 | |
| 56 | 53 | |
| 57 | 54 | when /^(.*)'s join page/ |
| 58 | 55 | '/profile/%s/join' % Profile.find_by_name($1).identifier | ... | ... |