From: Jan Provaznik jprovazn@redhat.com
--- src/features/step_definitions/template_steps.rb | 8 ++++++++ src/features/template.feature | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/src/features/step_definitions/template_steps.rb b/src/features/step_definitions/template_steps.rb index 990b67b..5bae0a2 100644 --- a/src/features/step_definitions/template_steps.rb +++ b/src/features/step_definitions/template_steps.rb @@ -105,3 +105,11 @@ Given /^there is an imported template$/ do @template = Factory.build :template, :name => name, :imported => true @template.save! end + +Given /^has package "([^"]*)"$/ do |arg1| + @template.add_packages [:arg1] +end + +When /^I edit the template$/ do + visit edit_image_factory_template_url(@template) +end diff --git a/src/features/template.feature b/src/features/template.feature index b982dfe..47a8d1b 100644 --- a/src/features/template.feature +++ b/src/features/template.feature @@ -54,6 +54,23 @@ Feature: Manage Templates And I should see "Template saved" And I should see "mocktemplate"
+ Scenario: Add group of packages to existing template + Given there is a "mock1" template + And has package "deltacloud-aggregator" + When I edit the template + And I press "Add Software" + Then I should see "Managed Content Selection" + When I press "Collections" + And I check "group_deltacloud" + And I press "Add Selected" + Then I should see "Managed Content to Bundle" + And the page should contain "#package_libdeltacloud" selector + When I press "Save" + Then I should be on the image factory templates page + And I should see "Template updated" + When I edit the template + Then the page should contain "#package_libdeltacloud" selector + Scenario: Sorting templates Given there is a "mock1" template And there is a "mock2" template