| 1 |
import { registry } from "@web/core/registry"; |
| 2 |
|
| 3 |
const steps = [ |
| 4 |
{ |
| 5 |
content: "Open the avatar card popover", |
| 6 |
trigger: ".o-mail-Message-avatar", |
| 7 |
run: "click", |
| 8 |
}, |
| 9 |
{ |
| 10 |
content: "Check that the employee's work email is displayed", |
| 11 |
trigger: ".o_avatar_card:contains([email protected])", |
| 12 |
}, |
| 13 |
{ |
| 14 |
content: "Check that the employee's department is displayed", |
| 15 |
trigger: ".o_avatar_card:contains(Test Department)", |
| 16 |
}, |
| 17 |
{ |
| 18 |
content: "Check that the employee's work phone is displayed", |
| 19 |
trigger: ".o_avatar_card:contains(123456789)", |
| 20 |
}, |
| 21 |
{ |
| 22 |
content: "Check that the employee's holiday status is displayed", |
| 23 |
trigger: ".o_avatar_card:contains(Back on)", |
| 24 |
}, |
| 25 |
]; |
| 26 |
|
| 27 |
registry.category("web_tour.tours").add("avatar_card_tour", { |
| 28 |
steps: () => [ |
| 29 |
...steps, |
| 30 |
{ |
| 31 |
content: "Check that the employee's job title is displayed", |
| 32 |
trigger: ".o_avatar_card:contains(Test Job Title)", |
| 33 |
}, |
| 34 |
{ |
| 35 |
trigger: ".o-mail-ActivityMenu-counter:text('2')", |
| 36 |
}, |
| 37 |
{ |
| 38 |
trigger: ".o_switch_company_menu button", |
| 39 |
run: "click", |
| 40 |
}, |
| 41 |
{ |
| 42 |
trigger: `[role=button][title='Switch to Company 2']`, |
| 43 |
run: "click", |
| 44 |
expectUnloadPage: true, |
| 45 |
}, |
| 46 |
{ |
| 47 |
trigger: ".o-mail-ActivityMenu-counter:text('1')", |
| 48 |
}, |
| 49 |
], |
| 50 |
}); |
| 51 |
|
| 52 |
registry.category("web_tour.tours").add("avatar_card_tour_no_hr_access", { |
| 53 |
steps: () => [ |
| 54 |
...steps, |
| 55 |
{ |
| 56 |
content: "Check that the employee's job title is displayed", |
| 57 |
trigger: ":not(.o_avatar_card:contains(Test Job Title))", |
| 58 |
}, |
| 59 |
], |
| 60 |
}); |