diff --git a/vasl_templates/webapp/static/user_settings.js b/vasl_templates/webapp/static/user_settings.js index 0c11b92..1be4484 100644 --- a/vasl_templates/webapp/static/user_settings.js +++ b/vasl_templates/webapp/static/user_settings.js @@ -1,7 +1,7 @@ SCENARIO_IMAGES_SOURCE_THIS_PROGRAM = 1 ; SCENARIO_IMAGES_SOURCE_INTERNET = 2 ; -gUserSettings = Cookies.getJSON( "user-settings" ) || { "scenario-images-source": SCENARIO_IMAGES_SOURCE_THIS_PROGRAM } ; +gUserSettings = Cookies.getJSON( "user-settings" ) || { "scenario-images-source": SCENARIO_IMAGES_SOURCE_INTERNET } ; USER_SETTINGS = { "snippet-font-family": "text", diff --git a/vasl_templates/webapp/tests/test_online_images.py b/vasl_templates/webapp/tests/test_online_images.py index cd51e65..32d25c2 100644 --- a/vasl_templates/webapp/tests/test_online_images.py +++ b/vasl_templates/webapp/tests/test_online_images.py @@ -7,13 +7,10 @@ from selenium.webdriver.common.action_chains import ActionChains from vasl_templates.webapp.tests.utils import init_webapp, select_tab, \ find_child, find_children, click_dialog_button, wait_for_clipboard, wait_for_elem -from vasl_templates.webapp.tests.test_user_settings import set_user_settings +from vasl_templates.webapp.tests.test_user_settings import set_user_settings, \ + SCENARIO_IMAGES_SOURCE_THIS_PROGRAM, SCENARIO_IMAGES_SOURCE_INTERNET from vasl_templates.webapp.tests.test_scenario_persistence import load_scenario -# nb: these are taken from user_settings.js -SCENARIO_IMAGES_SOURCE_THIS_PROGRAM = 1 -SCENARIO_IMAGES_SOURCE_INTERNET = 2 - # --------------------------------------------------------------------- @pytest.mark.skipif( diff --git a/vasl_templates/webapp/tests/test_user_settings.py b/vasl_templates/webapp/tests/test_user_settings.py index 6473e20..acca7e9 100644 --- a/vasl_templates/webapp/tests/test_user_settings.py +++ b/vasl_templates/webapp/tests/test_user_settings.py @@ -14,6 +14,10 @@ from vasl_templates.webapp.tests.test_scenario_persistence import save_scenario, from vasl_templates.webapp.tests.test_template_packs import upload_template_pack_file from vasl_templates.webapp.tests.test_vo_notes import extract_ma_notes +# nb: these are taken from user_settings.js +SCENARIO_IMAGES_SOURCE_THIS_PROGRAM = 1 +SCENARIO_IMAGES_SOURCE_INTERNET = 2 + # --------------------------------------------------------------------- def test_include_vasl_images_in_snippets( webapp, webdriver ): @@ -23,6 +27,7 @@ def test_include_vasl_images_in_snippets( webapp, webdriver ): init_webapp( webapp, webdriver, reset = lambda ct: ct.set_data_dir( dtype="real" ) ) + set_user_settings( { "scenario-images-source": SCENARIO_IMAGES_SOURCE_THIS_PROGRAM } ) # add a vehicle set_player( 1, "german" )