Commit f9a2a05de1964bb4b061f718d0cb18c250f20d9c

Authored by Daniela Feitosa
1 parent d6d7f241

Fixed test: features/search_enterprises.feature

features/search_enterprises.feature
@@ -14,6 +14,7 @@ Feature: search enterprises @@ -14,6 +14,7 @@ Feature: search enterprises
14 | Temáticas | 14 | Temáticas |
15 15
16 Scenario: show recent enterprises on index 16 Scenario: show recent enterprises on index
  17 + Given there are no pending jobs
17 When I go to the search enterprises page 18 When I go to the search enterprises page
18 Then I should see "Shoes shop" within "#search-results" 19 Then I should see "Shoes shop" within "#search-results"
19 And I should see Shoes shop's profile image 20 And I should see Shoes shop's profile image
@@ -26,7 +27,7 @@ Feature: search enterprises @@ -26,7 +27,7 @@ Feature: search enterprises
26 27
27 Scenario: simple search for enterprise 28 Scenario: simple search for enterprise
28 When I go to the search enterprises page 29 When I go to the search enterprises page
29 - And I fill in "query" with "shoes" 30 + And I fill in "search-input" with "shoes"
30 And I press "Search" 31 And I press "Search"
31 Then I should see "Shoes shop" within ".only-one-result-box" 32 Then I should see "Shoes shop" within ".only-one-result-box"
32 And I should see Shoes shop's profile image 33 And I should see Shoes shop's profile image
@@ -36,7 +37,7 @@ Feature: search enterprises @@ -36,7 +37,7 @@ Feature: search enterprises
36 Scenario: link to enterprise homepage on search results 37 Scenario: link to enterprise homepage on search results
37 Given I search enterprises for "shoes" 38 Given I search enterprises for "shoes"
38 When I follow "Shoes shop" 39 When I follow "Shoes shop"
39 - Then I should be on Shoes shop's profile 40 + Then I should be on shop1's profile
40 41
41 Scenario: show clean enterprise homepage on search results 42 Scenario: show clean enterprise homepage on search results
42 Given the following articles 43 Given the following articles
@@ -56,13 +57,13 @@ Feature: search enterprises @@ -56,13 +57,13 @@ Feature: search enterprises
56 57
57 Scenario: see default facets when searching 58 Scenario: see default facets when searching
58 When I go to the search enterprises page 59 When I go to the search enterprises page
59 - And I fill in "query" with "shoes" 60 + And I fill in "search-input" with "shoes"
60 And I press "Search" 61 And I press "Search"
61 Then I should see "City" within "#facets-menu" 62 Then I should see "City" within "#facets-menu"
62 63
63 Scenario: see category facets when searching 64 Scenario: see category facets when searching
64 When I go to the search enterprises page 65 When I go to the search enterprises page
65 - And I fill in "query" with "shoes" 66 + And I fill in "search-input" with "shoes"
66 And I press "Search" 67 And I press "Search"
67 Then I should see "Temáticas" within "#facets-menu" 68 Then I should see "Temáticas" within "#facets-menu"
68 69
@@ -74,7 +75,7 @@ Feature: search enterprises @@ -74,7 +75,7 @@ Feature: search enterprises
74 | identifier | name | region | 75 | identifier | name | region |
75 | art-pp | Artesanato PP | Pres. Prudente | 76 | art-pp | Artesanato PP | Pres. Prudente |
76 When I go to the search enterprises page 77 When I go to the search enterprises page
77 - And I fill in "query" with "Artesanato" 78 + And I fill in "search-input" with "Artesanato"
78 And I press "Search" 79 And I press "Search"
79 Then I should see "Pres. Prudente" within "#facet-menu-f_region" 80 Then I should see "Pres. Prudente" within "#facet-menu-f_region"
80 And I should see ", SP" within "#facet-menu-f_region" 81 And I should see ", SP" within "#facet-menu-f_region"
@@ -89,7 +90,7 @@ Feature: search enterprises @@ -89,7 +90,7 @@ Feature: search enterprises
89 | identifier | name | region | 90 | identifier | name | region |
90 | art-pp | Artesanato PP | Pres. Prudente | 91 | art-pp | Artesanato PP | Pres. Prudente |
91 When I go to the search enterprises page 92 When I go to the search enterprises page
92 - And I fill in "query" with "Prudente" 93 + And I fill in "search-input" with "Prudente"
93 And I press "Search" 94 And I press "Search"
94 Then I should see "Artesanato PP" within "#search-results" 95 Then I should see "Artesanato PP" within "#search-results"
95 96
@@ -101,7 +102,7 @@ Feature: search enterprises @@ -101,7 +102,7 @@ Feature: search enterprises
101 | identifier | name | category | 102 | identifier | name | category |
102 | noosfero | Noosfero | software-livre | 103 | noosfero | Noosfero | software-livre |
103 When I go to the search enterprises page 104 When I go to the search enterprises page
104 - And I fill in "query" with "software" 105 + And I fill in "search-input" with "software"
105 And I press "Search" 106 And I press "Search"
106 Then I should see "Noosfero" within "#search-results" 107 Then I should see "Noosfero" within "#search-results"
107 And I should see "Software Livre" within ".search-enterprise-category" 108 And I should see "Software Livre" within ".search-enterprise-category"
@@ -123,7 +124,7 @@ Feature: search enterprises @@ -123,7 +124,7 @@ Feature: search enterprises
123 | identifier | name | 124 | identifier | name |
124 | noosfero | Noosfero Developers Association | 125 | noosfero | Noosfero Developers Association |
125 When I go to the search enterprises page 126 When I go to the search enterprises page
126 - And I fill in "query" with "Noosfero Association" 127 + And I fill in "search-input" with "Noosfero Association"
127 And I press "Search" 128 And I press "Search"
128 Then I should see "Noosfero Developers Association" within "#search-results" 129 Then I should see "Noosfero Developers Association" within "#search-results"
129 130
@@ -136,7 +137,7 @@ Feature: search enterprises @@ -136,7 +137,7 @@ Feature: search enterprises
136 | noosfero | Noosfero Developers | software-livre | 137 | noosfero | Noosfero Developers | software-livre |
137 | facebook | Facebook Developers | | 138 | facebook | Facebook Developers | |
138 When I go to the search enterprises page 139 When I go to the search enterprises page
139 - And I fill in "query" with "Developers" 140 + And I fill in "search-input" with "Developers"
140 And I press "Search" 141 And I press "Search"
141 And I follow "Software Livre" within "#facets-menu" 142 And I follow "Software Livre" within "#facets-menu"
142 Then I should see "Noosfero Developers" within "#search-results" 143 Then I should see "Noosfero Developers" within "#search-results"
@@ -155,10 +156,10 @@ Feature: search enterprises @@ -155,10 +156,10 @@ Feature: search enterprises
155 | rails-dev | Rails Developers | | 156 | rails-dev | Rails Developers | |
156 | rails-usr | Rails Users | software-livre | 157 | rails-usr | Rails Users | software-livre |
157 When I go to the search enterprises page 158 When I go to the search enterprises page
158 - And I fill in "query" with "Developers" 159 + And I fill in "search-input" with "Developers"
159 And I press "Search" 160 And I press "Search"
160 And I follow "Software Livre" within "#facets-menu" 161 And I follow "Software Livre" within "#facets-menu"
161 - And I fill in "query" with "Rails" 162 + And I fill in "search-input" with "Rails"
162 And I press "Search" 163 And I press "Search"
163 Then I should see "Rails Users" within "#search-results" 164 Then I should see "Rails Users" within "#search-results"
164 And I should not see "Rails Developers" 165 And I should not see "Rails Developers"
features/step_definitions/noosfero_steps.rb
@@ -674,11 +674,11 @@ Then /^I should not see ([^\"]*)'s product image$/ do |product_name| @@ -674,11 +674,11 @@ Then /^I should not see ([^\"]*)'s product image$/ do |product_name|
674 end 674 end
675 675
676 Then /^I should see ([^\"]*)'s profile image$/ do |name| 676 Then /^I should see ([^\"]*)'s profile image$/ do |name|
677 - response.should have_selector("img[alt=\"#{name}\"]") 677 + page.should have_xpath("//img[@alt=\"#{name}\"]")
678 end 678 end
679 679
680 Then /^I should not see ([^\"]*)'s profile image$/ do |name| 680 Then /^I should not see ([^\"]*)'s profile image$/ do |name|
681 - response.should_not have_selector("img[alt=\"#{name}\"]") 681 + page.should have_no_xpath("//img[@alt=\"#{name}\"]")
682 end 682 end
683 683
684 Then /^I should see ([^\"]*)'s content image$/ do |name| 684 Then /^I should see ([^\"]*)'s content image$/ do |name|