| add-multi-type-product | ||
| openAndWait | wp-admin | |
| clickAndWait | link=Add New | |
| type | title | test-multi-type-product |
| click | content-html | |
| type | content | test multi type product [yak_price] [yak_buy] |
| type | yak_price | 100 |
| click | //button[@type='button'] | |
| select | newtype_[] | label=default |
| type | newtype_qty_[] | 1000 |
| click | //button[@type='button'] | |
| click | //table[@id='product_types_']/tbody/tr[3]/td[2]/button | |
| type | //table[@id='product_types_']/tbody/tr[3]/td[1]/input | large |
| type | //table[@id='product_types_']/tbody/tr[3]/td[3]/input | 1000 |
| click | //button[@type='button'] | |
| type | //table[@id='product_types_']/tbody/tr[4]/td[1]/input | medium |
| type | //table[@id='product_types_']/tbody/tr[4]/td[3]/input | 1000 |
| click | //button[@type='button'] | |
| type | //table[@id='product_types_']/tbody/tr[5]/td[1]/input | small |
| type | //table[@id='product_types_']/tbody/tr[5]/td[3]/input | 1000 |
| clickAndWait | publish | |
| assertChecked | //label[text() = ' default']/input | |
| assertChecked | //label[text() = ' large']/input | |
| assertChecked | //label[text() = ' medium']/input | |
| assertChecked | //label[text() = ' small']/input | |
| clickAndWait | link=View post | |
| assertTextPresent | $100.00 | |
| assertSelectOptions | //select[@name = 'category'] | large,medium,small |
| clickAndWait | link=Edit | |
| click | //button[@type='button' and contains(@onclick, 'removeExistingProductType') and contains(@onclick, '_4')] | |
| clickAndWait | publish | |
| assertNotChecked | //label[text() = ' default']/input | |
| click | //button[@type='button'] | |
| click | //button[@type='button' and contains(@onclick, 'newProductToggle')] | |
| type | //input[contains(@name, 'newtype_name_')] | x-large |
| type | //input[contains(@name, 'newtype_qty_')] | 1000 |
| type | //input[contains(@name, 'newtype_price_')] | 140 |
| type | //input[contains(@name, 'price') and contains(@name, '_7')] | 130 |
| type | //input[contains(@name, 'price') and contains(@name, '_8')] | 120 |
| type | //input[contains(@name, 'price') and contains(@name, '_9')] | 110 |
| click | content-html | |
| type | content | test multi type product small: [yak_price type="small"] medium: [yak_price type="medium"] large: [yak_price type="large"] x-large: [yak_price type="x-large"] [yak_buy] |
| clickAndWait | publish | |
| clickAndWait | link=View post | |
| assertTextPresent | small: $110.00 | |
| assertTextPresent | medium: $120.00 | |
| assertTextPresent | large: $130.00 | |
| assertTextPresent | x-large: $140.00 | |
| clickAndWait | //button[@name='addbutton'] | |
| assertTextPresent | (large) | |
| clickAndWait | link=test-multi-type-product (large) | |
| select | category | label=small |
| clickAndWait | //button[@name='addbutton'] | |
| assertTextPresent | (small) | |
| clickAndWait | //button[contains(@id, 'deletebutton_') and contains(@id, '_9')] | |
| clickAndWait | //button[contains(@id, 'deletebutton_') and contains(@id, '_7')] | |
| assertTextPresent | You have no items in your shopping basket | |