Commit da473ed38a3f275b4cd52d618185f487a82f6769

Authored by Daniela Feitosa
1 parent c2769f23

Fixed test: features/search_communities.feature

features/search_communities.feature
@@ -28,7 +28,7 @@ Feature: search communities @@ -28,7 +28,7 @@ Feature: search communities
28 28
29 Scenario: simple search for community 29 Scenario: simple search for community
30 When I go to the search communities page 30 When I go to the search communities page
31 - And I fill in "query" with "noosfero" 31 + And I fill in "search-input" with "noosfero"
32 And I press "Search" 32 And I press "Search"
33 Then I should see "Noosfero Community" within "#search-results" 33 Then I should see "Noosfero Community" within "#search-results"
34 And I should see "Noosfero Community" within ".only-one-result-box" 34 And I should see "Noosfero Community" within ".only-one-result-box"
@@ -42,7 +42,7 @@ Feature: search communities @@ -42,7 +42,7 @@ Feature: search communities
42 | identifier | name | category | 42 | identifier | name | category |
43 | noos-comm | Noosfero Community | software-livre | 43 | noos-comm | Noosfero Community | software-livre |
44 When I go to the search communities page 44 When I go to the search communities page
45 - And I fill in "query" with "software livre" 45 + And I fill in "search-input" with "software livre"
46 And I press "Search" 46 And I press "Search"
47 Then I should see "Noosfero" within "#search-results" 47 Then I should see "Noosfero" within "#search-results"
48 48
@@ -57,7 +57,7 @@ Feature: search communities @@ -57,7 +57,7 @@ Feature: search communities
57 | identifier | name | category | 57 | identifier | name | category |
58 | linux | Linux Community | software-livre | 58 | linux | Linux Community | software-livre |
59 When I go to the search communities page 59 When I go to the search communities page
60 - And I fill in "query" with "Linux" 60 + And I fill in "search-input" with "Linux"
61 And I press "Search" 61 And I press "Search"
62 Then I should see "Temáticas" within "#facets-menu" 62 Then I should see "Temáticas" within "#facets-menu"
63 63
@@ -66,7 +66,7 @@ Feature: search communities @@ -66,7 +66,7 @@ Feature: search communities
66 | identifier | name | 66 | identifier | name |
67 | luwac | Linux Users Without a Clue | 67 | luwac | Linux Users Without a Clue |
68 When I go to the search communities page 68 When I go to the search communities page
69 - And I fill in "query" with "Linux Clue" 69 + And I fill in "search-input" with "Linux Clue"
70 And I press "Search" 70 And I press "Search"
71 Then I should see "Linux Users Without a Clue" within "#search-results" 71 Then I should see "Linux Users Without a Clue" within "#search-results"
72 72
@@ -83,7 +83,7 @@ Feature: search communities @@ -83,7 +83,7 @@ Feature: search communities
83 | noos-dev | Noosfero Developers | software-livre | 83 | noos-dev | Noosfero Developers | software-livre |
84 | facebook | Facebook Developers | big-brother | 84 | facebook | Facebook Developers | big-brother |
85 When I go to the search communities page 85 When I go to the search communities page
86 - And I fill in "query" with "Developers" 86 + And I fill in "search-input" with "Developers"
87 And I press "Search" 87 And I press "Search"
88 And I follow "Software Livre" within "#facets-menu" 88 And I follow "Software Livre" within "#facets-menu"
89 Then I should see "Noosfero Developers" within "#search-results" 89 Then I should see "Noosfero Developers" within "#search-results"
@@ -106,10 +106,10 @@ Feature: search communities @@ -106,10 +106,10 @@ Feature: search communities
106 | rails-dev | Rails Developers | other-category | 106 | rails-dev | Rails Developers | other-category |
107 | rails-usr | Rails Users | software-livre | 107 | rails-usr | Rails Users | software-livre |
108 When I go to the search communities page 108 When I go to the search communities page
109 - And I fill in "query" with "Developers" 109 + And I fill in "search-input" with "Developers"
110 And I press "Search" 110 And I press "Search"
111 And I follow "Software Livre" within "#facets-menu" 111 And I follow "Software Livre" within "#facets-menu"
112 - And I fill in "query" with "Rails" 112 + And I fill in "search-input" with "Rails"
113 And I press "Search" 113 And I press "Search"
114 Then I should see "Rails Users" within "#search-results" 114 Then I should see "Rails Users" within "#search-results"
115 And I should not see "Rails Developers" 115 And I should not see "Rails Developers"
features/step_definitions/noosfero_steps.rb
@@ -685,20 +685,12 @@ Then /^I should not see ([^\"]*)'s profile image$/ do |name| @@ -685,20 +685,12 @@ Then /^I should not see ([^\"]*)'s profile image$/ do |name|
685 page.should have_no_xpath("//img[@alt=\"#{name}\"]") 685 page.should have_no_xpath("//img[@alt=\"#{name}\"]")
686 end 686 end
687 687
688 -Then /^I should see ([^\"]*)'s content image$/ do |name|  
689 - response.should have_selector("img[alt=\"#{name}\"]")  
690 -end  
691 -  
692 -Then /^I should not see ([^\"]*)'s content image$/ do |name|  
693 - response.should_not have_selector("img[alt=\"#{name}\"]")  
694 -end  
695 -  
696 Then /^I should see ([^\"]*)'s community image$/ do |name| 688 Then /^I should see ([^\"]*)'s community image$/ do |name|
697 - response.should have_selector("img[alt=\"#{name}\"]") 689 + page.should have_xpath("//img[@alt=\"#{name}\"]")
698 end 690 end
699 691
700 Then /^I should not see ([^\"]*)'s community image$/ do |name| 692 Then /^I should not see ([^\"]*)'s community image$/ do |name|
701 - response.should_not have_selector("img[alt=\"#{name}\"]") 693 + page.should have_no_xpath("//img[@alt=\"#{name}\"]")
702 end 694 end
703 695
704 Given /^the article "([^\"]*)" is updated by "([^\"]*)"$/ do |article, person| 696 Given /^the article "([^\"]*)" is updated by "([^\"]*)"$/ do |article, person|