diff --git a/plugins/bsc/lib/bsc_plugin.rb b/plugins/bsc/lib/bsc_plugin.rb index a3075f2..d88e5be 100644 --- a/plugins/bsc/lib/bsc_plugin.rb +++ b/plugins/bsc/lib/bsc_plugin.rb @@ -22,6 +22,7 @@ class BscPlugin < Noosfero::Plugin buttons = [] buttons << {:title => _("Manage associated enterprises"), :icon => 'bsc-enterprises', :url => {:controller => 'bsc_plugin_myprofile', :action => 'manage_associated_enterprises'}} if bsc?(context.profile) buttons << {:title => _('Transfer ownership'), :icon => 'transfer-enterprise-ownership', :url => {:controller => 'bsc_plugin_myprofile', :action => 'transfer_ownership'}} if context.profile.enterprise? + buttons << {:title => _("Manage contracts"), :icon => '', :url => {:controller => 'bsc_plugin_myprofile', :action => 'manage_contracts'}} if bsc?(context.profile) buttons end diff --git a/plugins/bsc/test/features/contract.feature b/plugins/bsc/test/features/contract.feature new file mode 100644 index 0000000..c242a17 --- /dev/null +++ b/plugins/bsc/test/features/contract.feature @@ -0,0 +1,21 @@ +Feature: Bsc contract +As a Bsc admin +I would like to register a contract +In order to make negotiations + + Background: + Given "Bsc" plugin is enabled + And the folllowing "bsc" from "bsc_plugin" + | business_name | identifier | company_name | cnpj | + | Bsc Test | bsc-test | Bsc Test Ltda | 94.132.024/0001-48 | + And I am logged in as admin + + Scenario: be able see the manage contracts button only if the profile is a Bsc + Given the following community + | name | identifier | + | Sample Community | sample-community | + When I am on Sample Community's control panel + Then I should not see "Manage contracts" + But I am on Bsc Test's control panel + Then I should see "Manage contracts" + -- libgit2 0.21.2