From: Tomas Sedovic<tomas(a)sedovic.cz>
https://www.aeolusproject.org/redmine/issues/2856
---
src/app/views/catalog_entries/show.html.haml | 2 +-
src/features/catalog_entries.feature | 7 +++++++
src/features/support/paths.rb | 6 ++++++
3 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/src/app/views/catalog_entries/show.html.haml
b/src/app/views/catalog_entries/show.html.haml
index 4df3f7c..5162796 100644
--- a/src/app/views/catalog_entries/show.html.haml
+++ b/src/app/views/catalog_entries/show.html.haml
@@ -6,7 +6,7 @@
= button_to t('catalog_entries.show.delete'),
catalog_catalog_entry_path((a)catalog_entry.catalog, @catalog_entry), :method =>
'delete', :confirm =>
"#{t'catalog_entries.show.confirm_delete'}", :class => 'button
danger', :id => 'delete'
= link_to t('catalog_entries.show.edit'),
edit_catalog_catalog_entry_path((a)catalog_entry.catalog, @catalog_entry), :class =>
'button', :id => 'edit_button'
- = link_to t('deployments.overview.launch'), '#'
+ = link_to t('deployments.overview.launch'),
launch_new_deployments_path(:deployable_id => @catalog_entry.deployable.id, :pool_id
=> @catalog_entry.catalog.pool), :id => :launch_deployment
%section.admin-content-section.deployable
%section.image
diff --git a/src/features/catalog_entries.feature b/src/features/catalog_entries.feature
index f6d9914..187122e 100644
--- a/src/features/catalog_entries.feature
+++ b/src/features/catalog_entries.feature
@@ -42,6 +42,13 @@ Feature: Manage Catalog Entries
And I should see "Catalogs"
And I should see "Roles"
+ Scenario: Launch a deployment
+ Given there is a "default" catalog
+ And a catalog entry "testdepl" exists
+ And I am on testdepl's catalog entry page
+ When I follow "launch_deployment"
+ Then I should be on the launch new deployments page
+
Scenario: Delete deployables
Given there is a "default" catalog
And a catalog entry "testdepl1" exists for "default" catalog
diff --git a/src/features/support/paths.rb b/src/features/support/paths.rb
index 4137456..31d073b 100644
--- a/src/features/support/paths.rb
+++ b/src/features/support/paths.rb
@@ -26,6 +26,12 @@ module NavigationHelpers
when /^(.*)'s realm page$/i
realm_path(FrontendRealm.find_by_name($1))
+ when /^(.*)'s catalog entry page$/i
+ deployable = Deployable.find_by_name($1)
+ catalog_entry = deployable.catalog_entries.first
+ catalog = catalog_entry.catalog
+ catalog_catalog_entry_path(catalog, catalog_entry)
+
when /the account page/
account_path
Self-ack and pushed.
Thomas
--
No trees were killed to send this message, but a large number of
electrons were terribly inconvenienced.