Commit 9a98d064070059bf2aaa52bc45da246964f85d05

Authored by Rodrigo Souto
1 parent 4a10fc12

Fixed test: features/balloon.feature

features/balloon.feature
@@ -17,28 +17,24 @@ Feature: balloon @@ -17,28 +17,24 @@ Feature: balloon
17 17
18 @selenium 18 @selenium
19 Scenario: I should not see trigger by default 19 Scenario: I should not see trigger by default
20 - Given the following blocks  
21 - | owner | type |  
22 - | environment | PeopleBlock |  
23 - And feature "show_balloon_with_profile_links_when_clicked" is enabled on environment  
24 - When I go to the homepage 20 + Given feature "show_balloon_with_profile_links_when_clicked" is enabled on environment
  21 + When I go to /search/people
25 Then I should not see "Friends" 22 Then I should not see "Friends"
26 23
27 - @selenium-fixme 24 + @selenium
28 Scenario: I should see balloon when clicked on people block trigger 25 Scenario: I should see balloon when clicked on people block trigger
29 - Given the following blocks  
30 - | owner | type |  
31 - | environment | PeopleBlock |  
32 - And feature "show_balloon_with_profile_links_when_clicked" is enabled on environment  
33 - When I go to the homepage  
34 - And I follow "Profile links" 26 + Given feature "show_balloon_with_profile_links_when_clicked" is enabled on environment
  27 + And I go to /search/people
  28 + And display ".person-trigger"
  29 + When I follow "Profile links"
35 Then I should see "Friends" 30 Then I should see "Friends"
36 31
37 - @selenium-fixme 32 + @selenium
38 Scenario: I should see balloon when clicked on community block trigger 33 Scenario: I should see balloon when clicked on community block trigger
39 Given feature "show_balloon_with_profile_links_when_clicked" is enabled on environment 34 Given feature "show_balloon_with_profile_links_when_clicked" is enabled on environment
40 - When I go to /search/communities  
41 - And I follow "Profile links" 35 + And I go to /search/communities
  36 + And display ".community-trigger"
  37 + When I follow "Profile links"
42 Then I should see "Members" 38 Then I should see "Members"
43 39
44 @selenium 40 @selenium
@@ -53,10 +49,11 @@ Feature: balloon @@ -53,10 +49,11 @@ Feature: balloon
53 When I go to /assets/communities 49 When I go to /assets/communities
54 Then I should not see "Members" 50 Then I should not see "Members"
55 51
56 - @selenium-fixme 52 + @selenium
57 Scenario: I should see balloon when clicked on page trigger 53 Scenario: I should see balloon when clicked on page trigger
58 Given feature "show_balloon_with_profile_links_when_clicked" is enabled on environment 54 Given feature "show_balloon_with_profile_links_when_clicked" is enabled on environment
59 - When I go to /assets/communities  
60 - And I follow "Profile links" 55 + And I go to /assets/communities
  56 + And display ".community-trigger"
  57 + When I follow "Profile links"
61 Then I should see "Members" 58 Then I should see "Members"
62 And I should see "Agenda" 59 And I should see "Agenda"
features/browse.feature
@@ -20,7 +20,7 @@ Feature: browse @@ -20,7 +20,7 @@ Feature: browse
20 Given I should not see "More recent" 20 Given I should not see "More recent"
21 And I should not see "More active" 21 And I should not see "More active"
22 And I should not see "More popular" 22 And I should not see "More popular"
23 - And display "submenu-people-trigger" 23 + And display "#submenu-people-trigger"
24 When I follow "submenu-people-trigger" 24 When I follow "submenu-people-trigger"
25 Then I should see "More recent" 25 Then I should see "More recent"
26 And I should see "More active" 26 And I should see "More active"
@@ -34,7 +34,7 @@ Feature: browse @@ -34,7 +34,7 @@ Feature: browse
34 And I should not see "More popular" 34 And I should not see "More popular"
35 And I should not see "Invite friends" 35 And I should not see "Invite friends"
36 And I should not see "My friends" 36 And I should not see "My friends"
37 - And display "submenu-people-trigger" 37 + And display "#submenu-people-trigger"
38 When I follow "submenu-people-trigger" 38 When I follow "submenu-people-trigger"
39 Then I should see "More recent" 39 Then I should see "More recent"
40 And I should see "More active" 40 And I should see "More active"
@@ -61,7 +61,7 @@ Feature: browse @@ -61,7 +61,7 @@ Feature: browse
61 And I should not see "More popular" 61 And I should not see "More popular"
62 And I should not see "My communities" 62 And I should not see "My communities"
63 And I should not see "New community" 63 And I should not see "New community"
64 - And display "submenu-communities-trigger" 64 + And display "#submenu-communities-trigger"
65 When I follow "submenu-communities-trigger" 65 When I follow "submenu-communities-trigger"
66 Then I should see "More recent" 66 Then I should see "More recent"
67 And I should see "More active" 67 And I should see "More active"
@@ -74,7 +74,7 @@ Feature: browse @@ -74,7 +74,7 @@ Feature: browse
74 Given I should not see "More recent" 74 Given I should not see "More recent"
75 And I should not see "More active" 75 And I should not see "More active"
76 And I should not see "More popular" 76 And I should not see "More popular"
77 - And display "submenu-communities-trigger" 77 + And display "#submenu-communities-trigger"
78 When I follow "submenu-communities-trigger" 78 When I follow "submenu-communities-trigger"
79 Then I should see "More recent" 79 Then I should see "More recent"
80 And I should see "More active" 80 And I should see "More active"
@@ -95,7 +95,7 @@ Feature: browse @@ -95,7 +95,7 @@ Feature: browse
95 Given I should not see "Most commented" 95 Given I should not see "Most commented"
96 And I should not see "More viewed" 96 And I should not see "More viewed"
97 And I should not see "More recent" 97 And I should not see "More recent"
98 - And display "submenu-contents-trigger" 98 + And display "#submenu-contents-trigger"
99 When I follow "submenu-contents-trigger" 99 When I follow "submenu-contents-trigger"
100 Then I should see "Most commented" 100 Then I should see "Most commented"
101 And I should see "More viewed" 101 And I should see "More viewed"
features/step_definitions/web_steps.rb
@@ -228,5 +228,8 @@ Then /^show me the page$/ do @@ -228,5 +228,8 @@ Then /^show me the page$/ do
228 end 228 end
229 229
230 Then /^display "([^\"]*)"$/ do |element| 230 Then /^display "([^\"]*)"$/ do |element|
231 - evaluate_script("document.getElementById('#{element}').style.display = 'inline';") 231 + # Need this " && false " work-around because this version of selenium doesn't
  232 + # have the execute_script method which does not returns the script. Checout:
  233 + # * https://github.com/jnicklas/capybara/issues/76
  234 + evaluate_script("jQuery('#{element}').show() && false;")
232 end 235 end