Enable remote census configuration when remote census is active
According to the feature setting["remote_census"]: - Display info to enable tab when remote_census feature is disabled. - Display all related setting to remote_census when feature is enabled
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
|
<% if feature?(:remote_census) %>
|
||||||
<h2><%= t("admin.settings.index.remote_census.title") %></h2>
|
<h2><%= t("admin.settings.index.remote_census.title") %></h2>
|
||||||
|
|
||||||
<%= render "settings_table", settings: @remote_census_general_settings %>
|
<%= render "settings_table", settings: @remote_census_general_settings %>
|
||||||
<%= render "settings_table", settings: @remote_census_request_settings %>
|
<%= render "settings_table", settings: @remote_census_request_settings %>
|
||||||
<%= render "settings_table", settings: @remote_census_response_settings %>
|
<%= render "settings_table", settings: @remote_census_response_settings %>
|
||||||
|
<% else %>
|
||||||
|
<div class="callout primary">
|
||||||
|
<%= t("admin.settings.index.remote_census.how_to_enable") %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|||||||
@@ -1313,6 +1313,7 @@ en:
|
|||||||
title: Proposals dashboard
|
title: Proposals dashboard
|
||||||
remote_census:
|
remote_census:
|
||||||
title: Remote Census configuration
|
title: Remote Census configuration
|
||||||
|
how_to_enable: 'To configure remote census (SOAP) you must enable "Configure connection to remote census (SOAP)" on "Features" tab.'
|
||||||
setting: Feature
|
setting: Feature
|
||||||
setting_actions: Actions
|
setting_actions: Actions
|
||||||
setting_name: Setting
|
setting_name: Setting
|
||||||
|
|||||||
@@ -1314,6 +1314,7 @@ es:
|
|||||||
title: Panel de progreso de propuestas
|
title: Panel de progreso de propuestas
|
||||||
remote_census:
|
remote_census:
|
||||||
title: Configuración del Censo Remoto
|
title: Configuración del Censo Remoto
|
||||||
|
how_to_enable: 'Para configurar la conexión con el Censo Remoto (SOAP) se debe activar "Configurar la conexión al censo remoto (SOAP)" en la pestaña "Funcionalidades".'
|
||||||
setting: Funcionalidad
|
setting: Funcionalidad
|
||||||
setting_actions: Acciones
|
setting_actions: Acciones
|
||||||
setting_name: Configuración
|
setting_name: Configuración
|
||||||
|
|||||||
@@ -132,6 +132,35 @@ describe "Admin settings" do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "Update Remote Census Configuration" do
|
||||||
|
|
||||||
|
scenario "Should not be able when remote census feature deactivated" do
|
||||||
|
Setting["feature.remote_census"] = nil
|
||||||
|
admin = create(:administrator).user
|
||||||
|
login_as(admin)
|
||||||
|
visit admin_settings_path
|
||||||
|
find("#remote-census-tab").click
|
||||||
|
|
||||||
|
expect(page).to have_content 'To configure remote census (SOAP) you must enable ' \
|
||||||
|
'"Configure connection to remote census (SOAP)" ' \
|
||||||
|
'on "Features" tab.'
|
||||||
|
end
|
||||||
|
|
||||||
|
scenario "Should be able when remote census feature activated" do
|
||||||
|
Setting["feature.remote_census"] = true
|
||||||
|
admin = create(:administrator).user
|
||||||
|
login_as(admin)
|
||||||
|
visit admin_settings_path
|
||||||
|
find("#remote-census-tab").click
|
||||||
|
|
||||||
|
expect(page).not_to have_content 'To configure remote census (SOAP) you must enable ' \
|
||||||
|
'"Configure connection to remote census (SOAP)" ' \
|
||||||
|
'on "Features" tab.'
|
||||||
|
Setting["feature.remote_census"] = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
describe "Skip verification" do
|
describe "Skip verification" do
|
||||||
|
|
||||||
scenario "deactivate skip verification", :js do
|
scenario "deactivate skip verification", :js do
|
||||||
|
|||||||
Reference in New Issue
Block a user