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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user