Add missing specs on admin
This commit is contained in:
committed by
Senén Rodero Rodríguez
parent
c9963b1c4f
commit
7b54451491
@@ -39,7 +39,7 @@ feature 'Admin settings' do
|
||||
expect(page).not_to have_content "Map configuration"
|
||||
end
|
||||
|
||||
scenario "Should be able when map feature deactivated" do
|
||||
scenario "Should be able when map feature activated" do
|
||||
Setting['feature.map'] = true
|
||||
admin = create(:administrator).user
|
||||
login_as(admin)
|
||||
@@ -61,6 +61,26 @@ feature 'Admin settings' do
|
||||
expect(page).to have_content "Map configuration updated succesfully"
|
||||
end
|
||||
|
||||
scenario "Should update marker", :js do
|
||||
Setting['feature.map'] = true
|
||||
admin = create(:administrator).user
|
||||
login_as(admin)
|
||||
visit admin_settings_path
|
||||
|
||||
expect(find("#latitude", visible: false).value).to eq "51.48"
|
||||
expect(find("#longitude", visible: false).value).to eq "0.0"
|
||||
|
||||
find("#admin-map").click
|
||||
|
||||
within "#map-form" do
|
||||
click_on "Update"
|
||||
end
|
||||
|
||||
expect(find("#latitude", visible: false).value).not_to eq "51.48"
|
||||
expect(page).to have_content "Map configuration updated succesfully"
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user