Commit faf5765a41558fda75c4f395d0c68dabd0a4883f
1 parent
512bd542
Exists in
master
and in
29 other branches
search-enterprises-features: remove background that is trashing other scenarios
Showing
1 changed file
with
26 additions
and
11 deletions
Show diff stats
features/search_enterprises.feature
@@ -3,14 +3,12 @@ Feature: search enterprises | @@ -3,14 +3,12 @@ Feature: search enterprises | ||
3 | I want to search enterprises | 3 | I want to search enterprises |
4 | In order to find ones that interest me | 4 | In order to find ones that interest me |
5 | 5 | ||
6 | - Background: | ||
7 | - And the following enterprises | ||
8 | - | identifier | name | img | | ||
9 | - | shop1 | Shoes shop | shoes | | ||
10 | - | shop2 | Fruits shop | fruits | | ||
11 | - | ||
12 | Scenario: show recent enterprises on index | 6 | Scenario: show recent enterprises on index |
13 | - Given there are no pending jobs | 7 | + Given the following enterprises |
8 | + | identifier | name | img | | ||
9 | + | shop1 | Shoes shop | shoes | | ||
10 | + | shop2 | Fruits shop | fruits | | ||
11 | + And there are no pending jobs | ||
14 | When I go to the search enterprises page | 12 | When I go to the search enterprises page |
15 | Then I should see "Shoes shop" within "#search-results" | 13 | Then I should see "Shoes shop" within "#search-results" |
16 | And I should see Shoes shop's profile image | 14 | And I should see Shoes shop's profile image |
@@ -18,10 +16,18 @@ Feature: search enterprises | @@ -18,10 +16,18 @@ Feature: search enterprises | ||
18 | And I should see Fruits shop's profile image | 16 | And I should see Fruits shop's profile image |
19 | 17 | ||
20 | Scenario: show empty search results | 18 | Scenario: show empty search results |
19 | + Given the following enterprises | ||
20 | + | identifier | name | | ||
21 | + | shop1 | Shoes shop | | ||
22 | + | shop2 | Fruits shop | | ||
21 | When I search enterprises for "something unrelated" | 23 | When I search enterprises for "something unrelated" |
22 | Then I should see "None" within ".search-results-type-empty" | 24 | Then I should see "None" within ".search-results-type-empty" |
23 | 25 | ||
24 | Scenario: simple search for enterprise | 26 | Scenario: simple search for enterprise |
27 | + Given the following enterprises | ||
28 | + | identifier | name | img | | ||
29 | + | shop1 | Shoes shop | shoes | | ||
30 | + | shop2 | Fruits shop | fruits | | ||
25 | When I go to the search enterprises page | 31 | When I go to the search enterprises page |
26 | And I fill in "search-input" with "shoes" | 32 | And I fill in "search-input" with "shoes" |
27 | And I press "Search" | 33 | And I press "Search" |
@@ -31,12 +37,21 @@ Feature: search enterprises | @@ -31,12 +37,21 @@ Feature: search enterprises | ||
31 | And I should not see Fruits shop's profile image | 37 | And I should not see Fruits shop's profile image |
32 | 38 | ||
33 | Scenario: link to enterprise homepage on search results | 39 | Scenario: link to enterprise homepage on search results |
34 | - Given I search enterprises for "shoes" | 40 | + Given the following enterprises |
41 | + | identifier | name | | ||
42 | + | shop1 | Shoes shop | | ||
43 | + And the following articles | ||
44 | + | owner | name | body | homepage | | ||
45 | + | shop1 | Shoes home | This is the <i>homepage</i> of Shoes shop! It has a very long and pretty vague description, just so we can test wether the system will correctly create an excerpt of this text. We should probably talk about shoes. | true | | ||
46 | + And I search enterprises for "shoes" | ||
35 | When I follow "Shoes shop" | 47 | When I follow "Shoes shop" |
36 | - Then I should be on shop1's profile | 48 | + Then I should be on shop1's homepage |
37 | 49 | ||
38 | Scenario: show clean enterprise homepage on search results | 50 | Scenario: show clean enterprise homepage on search results |
39 | - Given the following articles | 51 | + Given the following enterprises |
52 | + | identifier | name | | ||
53 | + | shop1 | Shoes shop | | ||
54 | + And the following articles | ||
40 | | owner | name | body | homepage | | 55 | | owner | name | body | homepage | |
41 | | shop1 | Shoes home | This is the <i>homepage</i> of Shoes shop! It has a very long and pretty vague description, just so we can test wether the system will correctly create an excerpt of this text. We should probably talk about shoes. | true | | 56 | | shop1 | Shoes home | This is the <i>homepage</i> of Shoes shop! It has a very long and pretty vague description, just so we can test wether the system will correctly create an excerpt of this text. We should probably talk about shoes. | true | |
42 | When I search enterprises for "shoes" | 57 | When I search enterprises for "shoes" |
@@ -47,7 +62,7 @@ Feature: search enterprises | @@ -47,7 +62,7 @@ Feature: search enterprises | ||
47 | Scenario: show clean enterprise description on search results | 62 | Scenario: show clean enterprise description on search results |
48 | Given the following enterprises | 63 | Given the following enterprises |
49 | | identifier | name | description | | 64 | | identifier | name | description | |
50 | - | shop3 | Clothes shop | This <b>clothes</b> shop also sells shoes! This too has a very long and pretty vague description, just so we can test wether the system will correctly create an excerpt of this text. Clothes are a really important part of our lives. | | 65 | + | shop4 | Clothes shop | This <b>clothes</b> shop also sells shoes! This too has a very long and pretty vague description, just so we can test wether the system will correctly create an excerpt of this text. Clothes are a really important part of our lives. | |
51 | When I search enterprises for "clothes" | 66 | When I search enterprises for "clothes" |
52 | And I follow "Full" | 67 | And I follow "Full" |
53 | And I should see "This clothes shop" within ".search-enterprise-description" | 68 | And I should see "This clothes shop" within ".search-enterprise-description" |