From: Jan Provaznik <[email protected]>
Added "delete template" scenario
---
src/app/views/templates/_templates.haml | 2 +-
src/features/step_definitions/template_steps.rb | 4 ++++
src/features/template.feature | 8 ++++++++
3 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/app/views/templates/_templates.haml
b/src/app/views/templates/_templates.haml
index 6587110..6a8d0f0 100644
--- a/src/app/views/templates/_templates.haml
+++ b/src/app/views/templates/_templates.haml
@@ -17,7 +17,7 @@
- else
- @templates.each do |tpl|
%tr
- %td= check_box_tag 'ids[]', tpl.id
+ %td= check_box_tag 'ids[]', tpl.id, false, :id => "tpl_id_#{tpl.id}"
%td
= image_tag "blnk.png", :alt => tpl.platform, :class => "icon
platform #{tpl.platform}"
= tpl.name
diff --git a/src/features/step_definitions/template_steps.rb
b/src/features/step_definitions/template_steps.rb
index b59808d..340da02 100644
--- a/src/features/step_definitions/template_steps.rb
+++ b/src/features/step_definitions/template_steps.rb
@@ -61,3 +61,7 @@ end
Then /^the page should not contain "([^"]*)" selector$/ do |selector|
response.should_not have_selector(selector)
end
+
+When /^I select template "([^"]*)"$/ do |arg1|
+ check("[email protected]}")
+end
diff --git a/src/features/template.feature b/src/features/template.feature
index 29d963e..d703346 100644
--- a/src/features/template.feature
+++ b/src/features/template.feature
@@ -42,3 +42,11 @@ Feature: Manage Templates
Then I should be on the templates page
And I should see "Template saved"
And I should see "mocktemplate"
+
+ Scenario: Delete a Template
+ Given There is a "test_template" template
+ And I am on the templates page
+ When I select template "template_template"
+ And I press "Delete"
+ Then I should be on the templates page
+ And I should not see "test_template"
--
1.7.2.3
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel