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 28  
29 29 Scenario: simple search for community
30 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 32 And I press "Search"
33 33 Then I should see "Noosfero Community" within "#search-results"
34 34 And I should see "Noosfero Community" within ".only-one-result-box"
... ... @@ -42,7 +42,7 @@ Feature: search communities
42 42 | identifier | name | category |
43 43 | noos-comm | Noosfero Community | software-livre |
44 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 46 And I press "Search"
47 47 Then I should see "Noosfero" within "#search-results"
48 48  
... ... @@ -57,7 +57,7 @@ Feature: search communities
57 57 | identifier | name | category |
58 58 | linux | Linux Community | software-livre |
59 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 61 And I press "Search"
62 62 Then I should see "Temáticas" within "#facets-menu"
63 63  
... ... @@ -66,7 +66,7 @@ Feature: search communities
66 66 | identifier | name |
67 67 | luwac | Linux Users Without a Clue |
68 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 70 And I press "Search"
71 71 Then I should see "Linux Users Without a Clue" within "#search-results"
72 72  
... ... @@ -83,7 +83,7 @@ Feature: search communities
83 83 | noos-dev | Noosfero Developers | software-livre |
84 84 | facebook | Facebook Developers | big-brother |
85 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 87 And I press "Search"
88 88 And I follow "Software Livre" within "#facets-menu"
89 89 Then I should see "Noosfero Developers" within "#search-results"
... ... @@ -106,10 +106,10 @@ Feature: search communities
106 106 | rails-dev | Rails Developers | other-category |
107 107 | rails-usr | Rails Users | software-livre |
108 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 110 And I press "Search"
111 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 113 And I press "Search"
114 114 Then I should see "Rails Users" within "#search-results"
115 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 685 page.should have_no_xpath("//img[@alt=\"#{name}\"]")
686 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 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 690 end
699 691  
700 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 694 end
703 695  
704 696 Given /^the article "([^\"]*)" is updated by "([^\"]*)"$/ do |article, person|
... ...