From: Jan Provaznik <jprovazn(a)redhat.com>
---
src/app/views/templates/content_selection.haml | 4 ++--
src/features/template.feature | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/app/views/templates/content_selection.haml b/src/app/views/templates/content_selection.haml
index 689c33d..af02da1 100644
--- a/src/app/views/templates/content_selection.haml
+++ b/src/app/views/templates/content_selection.haml
@@ -36,8 +36,8 @@
<input type="hidden" id="selected_package_#{p[:name]}" name="selected_packages[]" value="#{p[:name]}" />
%fieldset.clearfix
.search.grid_4.alpha
- %input{:type => "search", :placeholder => "Search for package", :name => 'package_search', :value => params[:package_search]}
- %button.action
+ %input{:type => "search", :placeholder => "Search for package", :name => 'package_search', :value => params[:package_search], :id => 'package_search'}
+ %button.action{:id => 'package_search_button'}
.grid_8
%a.grid_4.omega Advanced Search
diff --git a/src/features/template.feature b/src/features/template.feature
index 73de5ca..776500c 100644
--- a/src/features/template.feature
+++ b/src/features/template.feature
@@ -42,3 +42,10 @@ Feature: Manage Templates
Then I should be on the templates page
And I should see "Template saved"
And I should see "mocktemplate"
+
+ Scenario: Search software with empty string
+ Given I am on the new template page
+ When I press "Add Software"
+ And I fill in "package_search" with ""
+ And I press "package_search_button"
+ Then I should see "Search string is empty"
--
1.7.2.3