Added tests for Burma-specific capabilities.

master
Pacman Ghost 6 years ago
parent f631d11cd5
commit ea4a5426f6
  1. 4
      vasl_templates/webapp/static/css/tabs-scenario.css
  2. 2
      vasl_templates/webapp/static/snippets.js
  3. 7
      vasl_templates/webapp/tests/test_capabilities.py

@ -4,8 +4,8 @@
#panel-scenario .row { display: flex ; align-items: center ; }
#panel-scenario input { flex-grow: 1 ; }
#panel-scenario input[name='SCENARIO_ID'] { margin-left: 0.25em ; width: 70px ; flex-grow: 0 ; }
#panel-scenario .ui-selectmenu-button.scenario_theater { margin: -3px 0 0 0.25em ; width: 60px ; flex-grow: 0 ; }
#panel-scenario input[name='SCENARIO_ID'] { margin-left: 0.25em ; width: 80px ; flex-grow: 0 ; }
#panel-scenario .ui-selectmenu-button.scenario_theater { margin: -3px 0 0 0.25em ; width: 70px ; flex-grow: 0 ; }
#panel-scenario input[name='SCENARIO_DATE'] { width: 6em ; flex-grow: 0 ; }
#panel-scenario label[for='PLAYER_1'], label[for='PLAYER_2'] { margin-top: 2px ; }

@ -428,7 +428,7 @@ function _check_capability_timestamp( capabilities, timestamp, scenario_theater,
timestamp = timestamp.substring( 0, timestamp.length-1 ) ;
}
if ( timestamp.substring( timestamp.length-1 ) === "B" ) {
if ( scenario_theater != "Burma" )
if ( scenario_theater != "BURMA" )
return "<ignore>" ;
timestamp = timestamp.substring( 0, timestamp.length-1 ) ;
}

@ -269,7 +269,7 @@ def test_month_capabilities( webapp, webdriver ):
reason = "--short-tests specified"
)
def test_scenario_theater( webapp, webdriver ):
"""Test ETO/PTO-only capabilities."""
"""Test scenario theater specific capabilities."""
# M2A1 105mm Howitzer: C7(4+P)†1
ordnance = [ "american", "ordnance", "M2A1 105mm Howitzer" ]
@ -336,6 +336,11 @@ def test_scenario_theater( webapp, webdriver ):
_check_capabilities( webdriver, webapp, *ordnance, "PTO", "01/1944", "NT QSU H6\u2020 WP7 s8" )
_check_capabilities( webdriver, webapp, *ordnance, "ETO", "01/1944", "NT QSU WP7 s8" )
# Obice da 149/13: WP6(B)
ordnance = [ "chinese", "ordnance", "Obice da 149/13" ]
_check_capabilities( webdriver, webapp, *ordnance, "ETO", "01/1940", "NT h-d<sup>C</sup>\u2020 s5" )
_check_capabilities( webdriver, webapp, *ordnance, "Burma", "01/1940", "NT h-d<sup>C</sup>\u2020 WP6\u2020 s5" )
# ---------------------------------------------------------------------
def _check_capabilities( webdriver, webapp,

Loading…
Cancel
Save