Commit f9a2a05de1964bb4b061f718d0cb18c250f20d9c
1 parent
d6d7f241
Exists in
master
and in
29 other branches
Fixed test: features/search_enterprises.feature
Showing
2 changed files
with
14 additions
and
13 deletions
Show diff stats
features/search_enterprises.feature
| ... | ... | @@ -14,6 +14,7 @@ Feature: search enterprises |
| 14 | 14 | | Temáticas | |
| 15 | 15 | |
| 16 | 16 | Scenario: show recent enterprises on index |
| 17 | + Given there are no pending jobs | |
| 17 | 18 | When I go to the search enterprises page |
| 18 | 19 | Then I should see "Shoes shop" within "#search-results" |
| 19 | 20 | And I should see Shoes shop's profile image |
| ... | ... | @@ -26,7 +27,7 @@ Feature: search enterprises |
| 26 | 27 | |
| 27 | 28 | Scenario: simple search for enterprise |
| 28 | 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 | 31 | And I press "Search" |
| 31 | 32 | Then I should see "Shoes shop" within ".only-one-result-box" |
| 32 | 33 | And I should see Shoes shop's profile image |
| ... | ... | @@ -36,7 +37,7 @@ Feature: search enterprises |
| 36 | 37 | Scenario: link to enterprise homepage on search results |
| 37 | 38 | Given I search enterprises for "shoes" |
| 38 | 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 | 42 | Scenario: show clean enterprise homepage on search results |
| 42 | 43 | Given the following articles |
| ... | ... | @@ -56,13 +57,13 @@ Feature: search enterprises |
| 56 | 57 | |
| 57 | 58 | Scenario: see default facets when searching |
| 58 | 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 | 61 | And I press "Search" |
| 61 | 62 | Then I should see "City" within "#facets-menu" |
| 62 | 63 | |
| 63 | 64 | Scenario: see category facets when searching |
| 64 | 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 | 67 | And I press "Search" |
| 67 | 68 | Then I should see "Temáticas" within "#facets-menu" |
| 68 | 69 | |
| ... | ... | @@ -74,7 +75,7 @@ Feature: search enterprises |
| 74 | 75 | | identifier | name | region | |
| 75 | 76 | | art-pp | Artesanato PP | Pres. Prudente | |
| 76 | 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 | 79 | And I press "Search" |
| 79 | 80 | Then I should see "Pres. Prudente" within "#facet-menu-f_region" |
| 80 | 81 | And I should see ", SP" within "#facet-menu-f_region" |
| ... | ... | @@ -89,7 +90,7 @@ Feature: search enterprises |
| 89 | 90 | | identifier | name | region | |
| 90 | 91 | | art-pp | Artesanato PP | Pres. Prudente | |
| 91 | 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 | 94 | And I press "Search" |
| 94 | 95 | Then I should see "Artesanato PP" within "#search-results" |
| 95 | 96 | |
| ... | ... | @@ -101,7 +102,7 @@ Feature: search enterprises |
| 101 | 102 | | identifier | name | category | |
| 102 | 103 | | noosfero | Noosfero | software-livre | |
| 103 | 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 | 106 | And I press "Search" |
| 106 | 107 | Then I should see "Noosfero" within "#search-results" |
| 107 | 108 | And I should see "Software Livre" within ".search-enterprise-category" |
| ... | ... | @@ -123,7 +124,7 @@ Feature: search enterprises |
| 123 | 124 | | identifier | name | |
| 124 | 125 | | noosfero | Noosfero Developers Association | |
| 125 | 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 | 128 | And I press "Search" |
| 128 | 129 | Then I should see "Noosfero Developers Association" within "#search-results" |
| 129 | 130 | |
| ... | ... | @@ -136,7 +137,7 @@ Feature: search enterprises |
| 136 | 137 | | noosfero | Noosfero Developers | software-livre | |
| 137 | 138 | | facebook | Facebook Developers | | |
| 138 | 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 | 141 | And I press "Search" |
| 141 | 142 | And I follow "Software Livre" within "#facets-menu" |
| 142 | 143 | Then I should see "Noosfero Developers" within "#search-results" |
| ... | ... | @@ -155,10 +156,10 @@ Feature: search enterprises |
| 155 | 156 | | rails-dev | Rails Developers | | |
| 156 | 157 | | rails-usr | Rails Users | software-livre | |
| 157 | 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 | 160 | And I press "Search" |
| 160 | 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 | 163 | And I press "Search" |
| 163 | 164 | Then I should see "Rails Users" within "#search-results" |
| 164 | 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 | 674 | end |
| 675 | 675 | |
| 676 | 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 | 678 | end |
| 679 | 679 | |
| 680 | 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 | 682 | end |
| 683 | 683 | |
| 684 | 684 | Then /^I should see ([^\"]*)'s content image$/ do |name| | ... | ... |