| 1 |
import { registry } from "@web/core/registry"; |
| 2 |
import { click, contains } from "@web/../tests/utils"; |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
registry.category("web_tour.tours").add("mail/static/tests/tours/user_modify_own_profile_tour.js", { |
| 8 |
steps: () => [ |
| 9 |
{ |
| 10 |
content: "Open user account menu", |
| 11 |
trigger: ".o_user_menu button", |
| 12 |
run: "click", |
| 13 |
}, |
| 14 |
{ |
| 15 |
content: "Open preferences / profile screen", |
| 16 |
trigger: "[data-menu=preferences]", |
| 17 |
run: "click", |
| 18 |
}, |
| 19 |
{ |
| 20 |
content: "Update the notification type", |
| 21 |
trigger: '.modal div[name="notification_type"] input[data-value="inbox"]', |
| 22 |
async run() { |
| 23 |
await click('.modal div[name="notification_type"] input[data-value="inbox"]'); |
| 24 |
await contains(".o_form_dirty", { count: 1 }); |
| 25 |
}, |
| 26 |
}, |
| 27 |
{ |
| 28 |
content: "Save the form", |
| 29 |
trigger: 'button[name="preference_save"]', |
| 30 |
run: "click", |
| 31 |
}, |
| 32 |
{ |
| 33 |
content: "Wait until the modal is closed", |
| 34 |
trigger: "body:not(.modal-open)", |
| 35 |
async run() { |
| 36 |
await contains(".o_form_dirty", { count: 0 }); |
| 37 |
}, |
| 38 |
}, |
| 39 |
], |
| 40 |
}); |