| 1 |
import { registry } from '@web/core/registry'; |
| 2 |
import { stepUtils } from '@web_tour/tour_utils'; |
| 3 |
import comboConfiguratorTourUtils from '@sale/js/tours/combo_configurator_tour_utils'; |
| 4 |
import productConfiguratorTourUtils from '@sale/js/tours/product_configurator_tour_utils'; |
| 5 |
import tourUtils from '@sale/js/tours/tour_utils'; |
| 6 |
|
| 7 |
registry |
| 8 |
.category('web_tour.tours') |
| 9 |
.add('sale_combo_configurator_preconfigure_unconfigurable_ptals', { |
| 10 |
url: '/odoo', |
| 11 |
steps: () => [ |
| 12 |
...stepUtils.goToAppSteps('sale.sale_menu_root', "Open the sales app"), |
| 13 |
...tourUtils.createNewSalesOrder(), |
| 14 |
...tourUtils.selectCustomer("Test Partner"), |
| 15 |
...tourUtils.addProduct("Combo product"), |
| 16 |
{ |
| 17 |
content: "Verify that unconfigurable ptals are preconfigured", |
| 18 |
trigger: `${comboConfiguratorTourUtils.comboItemSelector("Test product")}:contains("Attribute A: A")`, |
| 19 |
}, |
| 20 |
{ |
| 21 |
content: "Verify that configurable ptals aren't preconfigured", |
| 22 |
trigger: `${comboConfiguratorTourUtils.comboItemSelector("Test product")}:not(:contains("Attribute B: B"))`, |
| 23 |
}, |
| 24 |
comboConfiguratorTourUtils.selectComboItem("Test product"), |
| 25 |
productConfiguratorTourUtils.selectAttribute( |
| 26 |
"Test product", "Attribute B", "B", 'multi' |
| 27 |
), |
| 28 |
...productConfiguratorTourUtils.saveConfigurator(), |
| 29 |
{ |
| 30 |
content: "Verify that configurable ptals are now configured", |
| 31 |
trigger: `${comboConfiguratorTourUtils.comboItemSelector("Test product")}:contains("Attribute B: B")`, |
| 32 |
}, |
| 33 |
...comboConfiguratorTourUtils.saveConfigurator(), |
| 34 |
|
| 35 |
...stepUtils.saveForm(), |
| 36 |
], |
| 37 |
}); |