| update-type-from-products-screen | ||
| openAndWait | wp-admin | |
| waitForElementPresent | link=Products | |
| clickAndWait | link=Products | |
| clickAndWait | link=test-multi-type-product | |
| storeValue | post_ID | productId |
| click | //button[@type='button' and contains(@onclick, 'removeExistingProductType') and contains(@onclick, '${productId}_10')] | |
| click | //button[@type='button' and contains(@onclick, 'addProductRow')] | |
| click | //button[@type='button' and contains(@onclick, 'newProductToggle')] | |
| type | //input[contains(@name, 'newtype_name_')] | xx-large |
| type | //input[contains(@name, 'newtype_qty_')] | 2000 |
| type | //input[contains(@name, 'newtype_price_')] | 145 |
| clickAndWait | save | |
| waitForTextPresent | Post updated | |
| type | price_${productId}_7 | 135 |
| type | price_${productId}_8 | 125 |
| type | price_${productId}_9 | 115 |
| clickAndWait | save | |
| waitForTextPresent | Post updated | |
| clickAndWait | link=Products | |
| click | //td[@id='product-${productId}']/a | |
| assertValue | price_${productId}_7 | 135 |
| assertValue | price_${productId}_8 | 125 |
| assertValue | price_${productId}_9 | 115 |
| assertValue | price_${productId}_11 | 145 |
| clickAndWait | link=test-multi-type-product | |
| click | content-html | |
| type | content | test multi type product small: [yak_price type="small"] medium: [yak_price type="medium"] large: [yak_price type="large"] xx-large: [yak_price type="xx-large"] [yak_buy] |
| clickAndWait | publish | |
| clickAndWait | link=View post | |
| assertTextPresent | small: $115.00 | |
| assertTextPresent | medium: $125.00 | |
| assertTextPresent | large: $135.00 | |
| assertTextPresent | xx-large: $145.00 | |