Commit 9a98d064070059bf2aaa52bc45da246964f85d05

Authored by Rodrigo Souto
1 parent 4a10fc12

Fixed test: features/balloon.feature

features/balloon.feature
... ... @@ -17,28 +17,24 @@ Feature: balloon
17 17  
18 18 @selenium
19 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 22 Then I should not see "Friends"
26 23  
27   - @selenium-fixme
  24 + @selenium
28 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 30 Then I should see "Friends"
36 31  
37   - @selenium-fixme
  32 + @selenium
38 33 Scenario: I should see balloon when clicked on community block trigger
39 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 38 Then I should see "Members"
43 39  
44 40 @selenium
... ... @@ -53,10 +49,11 @@ Feature: balloon
53 49 When I go to /assets/communities
54 50 Then I should not see "Members"
55 51  
56   - @selenium-fixme
  52 + @selenium
57 53 Scenario: I should see balloon when clicked on page trigger
58 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 58 Then I should see "Members"
62 59 And I should see "Agenda"
... ...
features/browse.feature
... ... @@ -20,7 +20,7 @@ Feature: browse
20 20 Given I should not see "More recent"
21 21 And I should not see "More active"
22 22 And I should not see "More popular"
23   - And display "submenu-people-trigger"
  23 + And display "#submenu-people-trigger"
24 24 When I follow "submenu-people-trigger"
25 25 Then I should see "More recent"
26 26 And I should see "More active"
... ... @@ -34,7 +34,7 @@ Feature: browse
34 34 And I should not see "More popular"
35 35 And I should not see "Invite friends"
36 36 And I should not see "My friends"
37   - And display "submenu-people-trigger"
  37 + And display "#submenu-people-trigger"
38 38 When I follow "submenu-people-trigger"
39 39 Then I should see "More recent"
40 40 And I should see "More active"
... ... @@ -61,7 +61,7 @@ Feature: browse
61 61 And I should not see "More popular"
62 62 And I should not see "My communities"
63 63 And I should not see "New community"
64   - And display "submenu-communities-trigger"
  64 + And display "#submenu-communities-trigger"
65 65 When I follow "submenu-communities-trigger"
66 66 Then I should see "More recent"
67 67 And I should see "More active"
... ... @@ -74,7 +74,7 @@ Feature: browse
74 74 Given I should not see "More recent"
75 75 And I should not see "More active"
76 76 And I should not see "More popular"
77   - And display "submenu-communities-trigger"
  77 + And display "#submenu-communities-trigger"
78 78 When I follow "submenu-communities-trigger"
79 79 Then I should see "More recent"
80 80 And I should see "More active"
... ... @@ -95,7 +95,7 @@ Feature: browse
95 95 Given I should not see "Most commented"
96 96 And I should not see "More viewed"
97 97 And I should not see "More recent"
98   - And display "submenu-contents-trigger"
  98 + And display "#submenu-contents-trigger"
99 99 When I follow "submenu-contents-trigger"
100 100 Then I should see "Most commented"
101 101 And I should see "More viewed"
... ...
features/step_definitions/web_steps.rb
... ... @@ -228,5 +228,8 @@ Then /^show me the page$/ do
228 228 end
229 229  
230 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 235 end
... ...