From 9a98d064070059bf2aaa52bc45da246964f85d05 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Thu, 21 Mar 2013 21:09:29 +0000 Subject: [PATCH] Fixed test: features/balloon.feature --- features/balloon.feature | 33 +++++++++++++++------------------ features/browse.feature | 10 +++++----- features/step_definitions/web_steps.rb | 5 ++++- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/features/balloon.feature b/features/balloon.feature index d71e3a1..eef4849 100644 --- a/features/balloon.feature +++ b/features/balloon.feature @@ -17,28 +17,24 @@ Feature: balloon @selenium Scenario: I should not see trigger by default - Given the following blocks - | owner | type | - | environment | PeopleBlock | - And feature "show_balloon_with_profile_links_when_clicked" is enabled on environment - When I go to the homepage + Given feature "show_balloon_with_profile_links_when_clicked" is enabled on environment + When I go to /search/people Then I should not see "Friends" - @selenium-fixme + @selenium Scenario: I should see balloon when clicked on people block trigger - Given the following blocks - | owner | type | - | environment | PeopleBlock | - And feature "show_balloon_with_profile_links_when_clicked" is enabled on environment - When I go to the homepage - And I follow "Profile links" + Given feature "show_balloon_with_profile_links_when_clicked" is enabled on environment + And I go to /search/people + And display ".person-trigger" + When I follow "Profile links" Then I should see "Friends" - @selenium-fixme + @selenium Scenario: I should see balloon when clicked on community block trigger Given feature "show_balloon_with_profile_links_when_clicked" is enabled on environment - When I go to /search/communities - And I follow "Profile links" + And I go to /search/communities + And display ".community-trigger" + When I follow "Profile links" Then I should see "Members" @selenium @@ -53,10 +49,11 @@ Feature: balloon When I go to /assets/communities Then I should not see "Members" - @selenium-fixme + @selenium Scenario: I should see balloon when clicked on page trigger Given feature "show_balloon_with_profile_links_when_clicked" is enabled on environment - When I go to /assets/communities - And I follow "Profile links" + And I go to /assets/communities + And display ".community-trigger" + When I follow "Profile links" Then I should see "Members" And I should see "Agenda" diff --git a/features/browse.feature b/features/browse.feature index d39be5d..7a4b8b0 100644 --- a/features/browse.feature +++ b/features/browse.feature @@ -20,7 +20,7 @@ Feature: browse Given I should not see "More recent" And I should not see "More active" And I should not see "More popular" - And display "submenu-people-trigger" + And display "#submenu-people-trigger" When I follow "submenu-people-trigger" Then I should see "More recent" And I should see "More active" @@ -34,7 +34,7 @@ Feature: browse And I should not see "More popular" And I should not see "Invite friends" And I should not see "My friends" - And display "submenu-people-trigger" + And display "#submenu-people-trigger" When I follow "submenu-people-trigger" Then I should see "More recent" And I should see "More active" @@ -61,7 +61,7 @@ Feature: browse And I should not see "More popular" And I should not see "My communities" And I should not see "New community" - And display "submenu-communities-trigger" + And display "#submenu-communities-trigger" When I follow "submenu-communities-trigger" Then I should see "More recent" And I should see "More active" @@ -74,7 +74,7 @@ Feature: browse Given I should not see "More recent" And I should not see "More active" And I should not see "More popular" - And display "submenu-communities-trigger" + And display "#submenu-communities-trigger" When I follow "submenu-communities-trigger" Then I should see "More recent" And I should see "More active" @@ -95,7 +95,7 @@ Feature: browse Given I should not see "Most commented" And I should not see "More viewed" And I should not see "More recent" - And display "submenu-contents-trigger" + And display "#submenu-contents-trigger" When I follow "submenu-contents-trigger" Then I should see "Most commented" And I should see "More viewed" diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index 07aff30..2f1b15e 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -228,5 +228,8 @@ Then /^show me the page$/ do end Then /^display "([^\"]*)"$/ do |element| - evaluate_script("document.getElementById('#{element}').style.display = 'inline';") + # Need this " && false " work-around because this version of selenium doesn't + # have the execute_script method which does not returns the script. Checout: + # * https://github.com/jnicklas/capybara/issues/76 + evaluate_script("jQuery('#{element}').show() && false;") end -- libgit2 0.21.2