test-multi-select-options
store javascript{(new Date()).getFullYear()} currentYear
store javascript{(new Date()).getMonth()+1} currentMonth
storeEval window.document.domain host
storeEval window.location.port port
open wp-admin
clickAndWait link=Add New
type title multi-select-options
type content test of multi select options

[yak_price]

[yak_buy]
type yak_price 500
type yak_multi_select option 1,http://${host}:${port}/wordpress/wp-content/uploads/${currentYear}/${currentMonth}/thumbnail.jpg
option 2,http://${host}:${port}/wordpress/wp-content/uploads/${currentYear}/${currentMonth}/thumbnail.jpg
option 3 (test with spaces),http://${host}:${port}/wordpress/wp-content/uploads/${currentYear}/${currentMonth}/thumbnail.jpg
option4,http://${host}:${port}/wordpress/wp-content/uploads/${currentYear}/${currentMonth}/thumbnail.jpg
option5,http://${host}:${port}/wordpress/wp-content/uploads/${currentYear}/${currentMonth}/thumbnail.jpg
click //button[@type='button']
select newtype_[] label=default
type newtype_qty_[] 1000
type yak_multi_select_min 2
type yak_multi_select_max 3
clickAndWait publish
clickAndWait link=Visit Site
assertElementPresent //img[@alt='option 1']
assertElementPresent //img[@alt='option 2']
assertElementPresent //img[@alt='option 3 (test with spaces)']
assertElementPresent //img[@alt='option4']
assertElementPresent //img[@alt='option5']
clickAndWait link=multi-select-options
click //input[@value='option 1']
click //button[@name='addbutton']
assertTextNotPresent How would you like to pay?
click //input[@value='option 3 (test with spaces)']
clickAndWait //button[@name='addbutton']
assertTextPresent How would you like to pay?
assertTextPresent option 1
assertTextPresent option 3
assertTextNotPresent option 2
type id=item_38_4_option_1_option_3_(test_with_spaces) 2
clickAndWait id=updatebutton
assertTextPresent 1,000.00
verifyValue id=item_38_4_option_1_option_3_(test_with_spaces) 2
clickAndWait id=buybutton
assertTextPresent Shipping Address