diff --git a/features/search_enterprises.feature b/features/search_enterprises.feature
index 2a82358..dc78fcb 100644
--- a/features/search_enterprises.feature
+++ b/features/search_enterprises.feature
@@ -3,14 +3,12 @@ Feature: search enterprises
I want to search enterprises
In order to find ones that interest me
- Background:
- And the following enterprises
- | identifier | name | img |
- | shop1 | Shoes shop | shoes |
- | shop2 | Fruits shop | fruits |
-
Scenario: show recent enterprises on index
- Given there are no pending jobs
+ Given the following enterprises
+ | identifier | name | img |
+ | shop1 | Shoes shop | shoes |
+ | shop2 | Fruits shop | fruits |
+ And there are no pending jobs
When I go to the search enterprises page
Then I should see "Shoes shop" within "#search-results"
And I should see Shoes shop's profile image
@@ -18,10 +16,18 @@ Feature: search enterprises
And I should see Fruits shop's profile image
Scenario: show empty search results
+ Given the following enterprises
+ | identifier | name |
+ | shop1 | Shoes shop |
+ | shop2 | Fruits shop |
When I search enterprises for "something unrelated"
Then I should see "None" within ".search-results-type-empty"
Scenario: simple search for enterprise
+ Given the following enterprises
+ | identifier | name | img |
+ | shop1 | Shoes shop | shoes |
+ | shop2 | Fruits shop | fruits |
When I go to the search enterprises page
And I fill in "search-input" with "shoes"
And I press "Search"
@@ -31,12 +37,21 @@ Feature: search enterprises
And I should not see Fruits shop's profile image
Scenario: link to enterprise homepage on search results
- Given I search enterprises for "shoes"
+ Given the following enterprises
+ | identifier | name |
+ | shop1 | Shoes shop |
+ And the following articles
+ | owner | name | body | homepage |
+ | shop1 | Shoes home | This is the homepage 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 |
+ And I search enterprises for "shoes"
When I follow "Shoes shop"
- Then I should be on shop1's profile
+ Then I should be on shop1's homepage
Scenario: show clean enterprise homepage on search results
- Given the following articles
+ Given the following enterprises
+ | identifier | name |
+ | shop1 | Shoes shop |
+ And the following articles
| owner | name | body | homepage |
| shop1 | Shoes home | This is the homepage 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 |
When I search enterprises for "shoes"
@@ -47,7 +62,7 @@ Feature: search enterprises
Scenario: show clean enterprise description on search results
Given the following enterprises
| identifier | name | description |
- | shop3 | Clothes shop | This clothes 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. |
+ | shop4 | Clothes shop | This clothes 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. |
When I search enterprises for "clothes"
And I follow "Full"
And I should see "This clothes shop" within ".search-enterprise-description"
--
libgit2 0.21.2