Commit faf5765a41558fda75c4f395d0c68dabd0a4883f

Authored by Rodrigo Souto
1 parent 512bd542

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 3 I want to search enterprises
4 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 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 12 When I go to the search enterprises page
15 13 Then I should see "Shoes shop" within "#search-results"
16 14 And I should see Shoes shop's profile image
... ... @@ -18,10 +16,18 @@ Feature: search enterprises
18 16 And I should see Fruits shop's profile image
19 17  
20 18 Scenario: show empty search results
  19 + Given the following enterprises
  20 + | identifier | name |
  21 + | shop1 | Shoes shop |
  22 + | shop2 | Fruits shop |
21 23 When I search enterprises for "something unrelated"
22 24 Then I should see "None" within ".search-results-type-empty"
23 25  
24 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 31 When I go to the search enterprises page
26 32 And I fill in "search-input" with "shoes"
27 33 And I press "Search"
... ... @@ -31,12 +37,21 @@ Feature: search enterprises
31 37 And I should not see Fruits shop's profile image
32 38  
33 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 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 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 55 | owner | name | body | homepage |
41 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 57 When I search enterprises for "shoes"
... ... @@ -47,7 +62,7 @@ Feature: search enterprises
47 62 Scenario: show clean enterprise description on search results
48 63 Given the following enterprises
49 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 66 When I search enterprises for "clothes"
52 67 And I follow "Full"
53 68 And I should see "This clothes shop" within ".search-enterprise-description"
... ...