Ack to all in the series
Thanks
----- Original Message -----
From: jprovazn(a)redhat.com
To: aeolus-devel(a)lists.fedorahosted.org
Sent: Thursday, 3 February, 2011 10:58:29 AM
Subject: [PATCH conductor 1/3] cuke test for adding pkgs when editing template
From: Jan Provaznik <jprovazn(a)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
--
1.7.3.5
_______________________________________________
aeolus-devel mailing list
aeolus-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/aeolus-devel