| 1 |
import { registry } from '@web/core/registry'; |
| 2 |
import { patch } from '@web/core/utils/patch'; |
| 3 |
import '@website/../tests/tours/configurator_translation'; |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
patch(registry.category('web_tour.tours').get('configurator_translation'), { |
| 9 |
|
| 10 |
steps() { |
| 11 |
const originalSteps = super.steps(); |
| 12 |
const websiteBuildStepIndex = originalSteps.findIndex( |
| 13 |
(step) => step.id === 'build_website' |
| 14 |
); |
| 15 |
originalSteps.splice( |
| 16 |
websiteBuildStepIndex + 1, |
| 17 |
0, |
| 18 |
{ |
| 19 |
content: "Choose a shop page style", |
| 20 |
trigger: '.o_configurator_screen:contains(online catalog) .button_area', |
| 21 |
run: 'click', |
| 22 |
}, |
| 23 |
{ |
| 24 |
content: "Choose a product page style", |
| 25 |
trigger: '.o_configurator_screen:contains(product page) .button_area', |
| 26 |
run: 'click', |
| 27 |
}, |
| 28 |
); |
| 29 |
return originalSteps; |
| 30 |
}, |
| 31 |
|
| 32 |
}); |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
patch(registry.category("web_tour.tours").get("configurator_page_creation"), { |
| 37 |
steps() { |
| 38 |
const originalSteps = super.steps(); |
| 39 |
const websiteBuildStepIndex = originalSteps.findIndex( |
| 40 |
(step) => step.id === "build_website" |
| 41 |
); |
| 42 |
originalSteps.splice( |
| 43 |
websiteBuildStepIndex + 1, |
| 44 |
0, |
| 45 |
{ |
| 46 |
content: "Choose a shop page style", |
| 47 |
trigger: ".o_configurator_screen:contains('online catalog') .button_area", |
| 48 |
run: "click", |
| 49 |
}, |
| 50 |
{ |
| 51 |
content: "Choose a product page style", |
| 52 |
trigger: ".o_configurator_screen:contains('product page') .button_area", |
| 53 |
run: "click", |
| 54 |
} |
| 55 |
); |
| 56 |
return originalSteps; |
| 57 |
}, |
| 58 |
}); |