@ -32,30 +32,30 @@ def test_include_vasl_images_in_snippets( webapp, webdriver ):
set_player ( 1 , " german " )
set_player ( 1 , " german " )
add_vo ( webdriver , " vehicles " , 1 , " PzKpfw IB " )
add_vo ( webdriver , " vehicles " , 1 , " PzKpfw IB " )
# en able "show VASL images in snippets"
# dis able "show VASL images in snippets"
select_menu_option ( " user_settings " )
select_menu_option ( " user_settings " )
elem = find_child ( " .ui-dialog.user-settings input[name= ' include-vasl-images-in-snippets ' ] " )
elem = find_child ( " .ui-dialog.user-settings input[name= ' include-vasl-images-in-snippets ' ] " )
assert not elem . is_selected ( )
assert elem . is_selected ( )
elem . click ( )
elem . click ( )
click_dialog_button ( " OK " )
click_dialog_button ( " OK " )
_check_cookies ( webdriver , " include-vasl-images-in-snippets " , Tru e )
_check_cookies ( webdriver , " include-vasl-images-in-snippets " , Fals e )
# make sure that it took effect
# make sure that it took effect
snippet_btn = find_child ( " button[data-id= ' ob_vehicles_1 ' ] " )
snippet_btn = find_child ( " button[data-id= ' ob_vehicles_1 ' ] " )
snippet_btn . click ( )
snippet_btn . click ( )
wait_for_clipboard ( 2 , " /counter/2524/front " , contains = Tru e )
wait_for_clipboard ( 2 , " /counter/2524/front " , contains = Fals e )
# dis able "show VASL images in snippets"
# en able "show VASL images in snippets"
select_menu_option ( " user_settings " )
select_menu_option ( " user_settings " )
elem = find_child ( " .ui-dialog.user-settings input[name= ' include-vasl-images-in-snippets ' ] " )
elem = find_child ( " .ui-dialog.user-settings input[name= ' include-vasl-images-in-snippets ' ] " )
assert elem . is_selected ( )
assert not elem . is_selected ( )
elem . click ( )
elem . click ( )
click_dialog_button ( " OK " )
click_dialog_button ( " OK " )
_check_cookies ( webdriver , " include-vasl-images-in-snippets " , Fals e )
_check_cookies ( webdriver , " include-vasl-images-in-snippets " , Tru e )
# make sure that it took effect
# make sure that it took effect
snippet_btn . click ( )
snippet_btn . click ( )
wait_for_clipboard ( 2 , " /counter/2524/front " , contains = Fals e )
wait_for_clipboard ( 2 , " /counter/2524/front " , contains = Tru e )
# ---------------------------------------------------------------------
# ---------------------------------------------------------------------
@ -72,44 +72,44 @@ def test_include_flags_in_snippets( webapp, webdriver ):
sortable = find_child ( " #ob_setups-sortable_1 " )
sortable = find_child ( " #ob_setups-sortable_1 " )
add_simple_note ( sortable , " OB setup note " , None )
add_simple_note ( sortable , " OB setup note " , None )
# en able "show flags in snippets"
# dis able "show flags in snippets"
select_menu_option ( " user_settings " )
select_menu_option ( " user_settings " )
elem = find_child ( " .ui-dialog.user-settings input[name= ' include-flags-in-snippets ' ] " )
elem = find_child ( " .ui-dialog.user-settings input[name= ' include-flags-in-snippets ' ] " )
assert not elem . is_selected ( )
assert elem . is_selected ( )
elem . click ( )
elem . click ( )
click_dialog_button ( " OK " )
click_dialog_button ( " OK " )
_check_cookies ( webdriver , " include-flags-in-snippets " , Tru e )
_check_cookies ( webdriver , " include-flags-in-snippets " , Fals e )
# make sure that it took effect
# make sure that it took effect
ob_setup_snippet_btn = find_child ( " li img.snippet " , sortable )
ob_setup_snippet_btn = find_child ( " li img.snippet " , sortable )
ob_setup_snippet_btn . click ( )
ob_setup_snippet_btn . click ( )
wait_for_clipboard ( 2 , " /flags/german " , contains = Tru e )
wait_for_clipboard ( 2 , " /flags/german " , contains = Fals e )
# make sure it also affects vehicle/ordnance snippets
# make sure it also affects vehicle/ordnance snippets
ob_vehicles_snippet_btn = find_child ( " button.generate[data-id= ' ob_vehicles_1 ' ] " )
ob_vehicles_snippet_btn = find_child ( " button.generate[data-id= ' ob_vehicles_1 ' ] " )
ob_vehicles_snippet_btn . click ( )
ob_vehicles_snippet_btn . click ( )
wait_for_clipboard ( 2 , " /flags/german " , contains = Tru e )
wait_for_clipboard ( 2 , " /flags/german " , contains = Fals e )
ob_ordnance_snippet_btn = find_child ( " button.generate[data-id= ' ob_ordnance_1 ' ] " )
ob_ordnance_snippet_btn = find_child ( " button.generate[data-id= ' ob_ordnance_1 ' ] " )
ob_ordnance_snippet_btn . click ( )
ob_ordnance_snippet_btn . click ( )
wait_for_clipboard ( 2 , " /flags/german " , contains = Tru e )
wait_for_clipboard ( 2 , " /flags/german " , contains = Fals e )
# dis able "show flags in snippets"
# en able "show flags in snippets"
select_menu_option ( " user_settings " )
select_menu_option ( " user_settings " )
elem = find_child ( " .ui-dialog.user-settings input[name= ' include-flags-in-snippets ' ] " )
elem = find_child ( " .ui-dialog.user-settings input[name= ' include-flags-in-snippets ' ] " )
assert elem . is_selected ( )
assert not elem . is_selected ( )
elem . click ( )
elem . click ( )
click_dialog_button ( " OK " )
click_dialog_button ( " OK " )
_check_cookies ( webdriver , " include-flags-in-snippets " , Fals e )
_check_cookies ( webdriver , " include-flags-in-snippets " , Tru e )
# make sure that it took effect
# make sure that it took effect
ob_setup_snippet_btn . click ( )
ob_setup_snippet_btn . click ( )
wait_for_clipboard ( 2 , " /flags/german " , contains = Fals e )
wait_for_clipboard ( 2 , " /flags/german " , contains = Tru e )
# make sure it also affects vehicle/ordnance snippets
# make sure it also affects vehicle/ordnance snippets
ob_vehicles_snippet_btn . click ( )
ob_vehicles_snippet_btn . click ( )
wait_for_clipboard ( 2 , " /flags/german " , contains = Fals e )
wait_for_clipboard ( 2 , " /flags/german " , contains = Tru e )
ob_ordnance_snippet_btn . click ( )
ob_ordnance_snippet_btn . click ( )
wait_for_clipboard ( 2 , " /flags/german " , contains = Fals e )
wait_for_clipboard ( 2 , " /flags/german " , contains = Tru e )
# ---------------------------------------------------------------------
# ---------------------------------------------------------------------