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:
taitus
2019-04-10 14:16:43 +02:00
committed by Javi Martín
parent 637675a1f5
commit 0a901cb82f
4 changed files with 37 additions and 0 deletions

View File

@@ -132,6 +132,35 @@ describe "Admin settings" do
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
scenario "deactivate skip verification", :js do