mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-24 17:32:05 +02:00
19.0 vanilla
This commit is contained in:
parent
a1137a1456
commit
e1d89e11e3
2789 changed files with 1093187 additions and 605897 deletions
|
|
@ -0,0 +1,27 @@
|
|||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add("check_public_employee_link_redirect", {
|
||||
// starts at /odoo/employee/<employee_id>
|
||||
steps: () => {
|
||||
/* ignoring inactive modals since the modal may appear multiple times
|
||||
thus hiding the inactive ones and playwright doesn't like doing
|
||||
actions on hidden elements */
|
||||
const msgSelector = '.o_dialog:not(.o_inactive_modal) .modal-content .modal-body div[role="alert"] p';
|
||||
const msg = `You are not allowed to access "Employee" (hr.employee) records.
|
||||
We can redirect you to the public employee list.`;
|
||||
return [
|
||||
{
|
||||
trigger: msgSelector,
|
||||
content: "See if redirect warning popup appears for current user",
|
||||
timeout: 3000,
|
||||
run: () => {
|
||||
const errorTxt = document.querySelector(msgSelector).innerText;
|
||||
if (errorTxt !== msg) {
|
||||
throw new Error("Could not find correct warning message when visiting private employee without required permissions")
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -1,29 +1,37 @@
|
|||
/** @odoo-module **/
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_utils";
|
||||
|
||||
import tour from 'web_tour.tour';
|
||||
|
||||
tour.register('hr_employee_tour', {
|
||||
test: true,
|
||||
url: '/web',
|
||||
}, [
|
||||
tour.stepUtils.showAppsMenuItem(),
|
||||
{
|
||||
content: "Open Employees app",
|
||||
trigger: ".o_app[data-menu-xmlid='hr.menu_hr_root']",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Open an Employee Profile",
|
||||
trigger: ".o_kanban_record_title:contains('Johnny H.')",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Open user account menu",
|
||||
trigger: ".o_user_menu .oe_topbar_name",
|
||||
run: 'click',
|
||||
}, {
|
||||
content: "Open My Profile",
|
||||
trigger: "[data-menu=settings]",
|
||||
run: 'click',
|
||||
},
|
||||
]);
|
||||
registry.category("web_tour.tours").add("hr_employee_tour", {
|
||||
url: "/odoo",
|
||||
steps: () => [
|
||||
stepUtils.showAppsMenuItem(),
|
||||
{
|
||||
content: "Open Employees app",
|
||||
trigger: ".o_app[data-menu-xmlid='hr.menu_hr_root']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open an Employee Profile",
|
||||
trigger: ".o_kanban_record:contains('Johnny H.')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open a chat with the employee",
|
||||
trigger: ".o_employee_chat_btn",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: ".o-mail-ChatWindow .o-mail-ChatWindow-header:contains('Johnny H.')",
|
||||
},
|
||||
{
|
||||
content: "Open user account menu",
|
||||
trigger: ".o_user_menu .dropdown-toggle",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open My Preferences",
|
||||
trigger: "[data-menu=preferences]",
|
||||
run: "click",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,78 @@
|
|||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_utils";
|
||||
|
||||
registry.category("web_tour.tours").add("hr_employee_multiple_bank_accounts_tour", {
|
||||
url: "/odoo",
|
||||
steps: () => [
|
||||
stepUtils.showAppsMenuItem(),
|
||||
{
|
||||
content: "Open Employees app",
|
||||
trigger: ".o_app[data-menu-xmlid='hr.menu_hr_root']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open an Employee Profile",
|
||||
trigger: ".o_kanban_record:contains('Johnny H.')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open personal tab",
|
||||
trigger: ".nav-link:contains('Personal')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "add bank 1",
|
||||
trigger: "input#bank_account_ids_2",
|
||||
run: "edit 1",
|
||||
},
|
||||
{
|
||||
content: "add bank 1",
|
||||
trigger: ".dropdown-item:contains('Create and edit')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "save bank 1",
|
||||
trigger: ".o_form_button_save:contains('Save')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "add bank 2",
|
||||
trigger: "input#bank_account_ids_2",
|
||||
run: "edit 2",
|
||||
},
|
||||
{
|
||||
content: "add bank 2",
|
||||
trigger: ".dropdown-item:contains('Create and edit')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "save",
|
||||
trigger: ".o_form_button_save:contains('Save')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "add bank 3",
|
||||
trigger: "input#bank_account_ids_1",
|
||||
run: "edit 3",
|
||||
},
|
||||
{
|
||||
content: "add bank 3",
|
||||
trigger: ".dropdown-item:contains('Create and edit')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "save bank 3",
|
||||
trigger: ".o_form_button_save:contains('Save')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "save employee form",
|
||||
trigger: ".fa-cloud-upload",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "wait for save completion",
|
||||
trigger: ".o_form_readonly, .o_form_saved",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
/** @odoo-module **/
|
||||
|
||||
import tour from 'web_tour.tour';
|
||||
|
||||
/**
|
||||
* As 'hr' changes the flow a bit and displays the user preferences form in a full view instead of
|
||||
* a modal, we adapt the steps of the original tour accordingly.
|
||||
*/
|
||||
tour.tours['mail/static/tests/tours/user_modify_own_profile_tour.js'].steps = [{
|
||||
content: 'Open user account menu',
|
||||
trigger: '.o_user_menu button',
|
||||
}, {
|
||||
content: "Open preferences / profile screen",
|
||||
trigger: '[data-menu=settings]',
|
||||
}, {
|
||||
content: "Update the email address",
|
||||
trigger: 'div[name="email"] input',
|
||||
run: 'text updatedemail@example.com',
|
||||
}, ...tour.stepUtils.saveForm()];
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_utils";
|
||||
|
||||
registry.category("web_tour.tours").add("version_timeline_auto_save_tour", {
|
||||
url: "/odoo",
|
||||
steps: () => [
|
||||
stepUtils.showAppsMenuItem(),
|
||||
{
|
||||
content: "Open Employees app",
|
||||
trigger: ".o_app[data-menu-xmlid='hr.menu_hr_root']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open an Employee Profile",
|
||||
trigger: ".o_kanban_record:contains('Bob M.')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open Payroll Page",
|
||||
trigger: ".o_notebook_headers a[name='payroll_information']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open contract end date",
|
||||
trigger: ".o_field_widget[name='contract_date_end'] .o_input",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Go to the next month",
|
||||
trigger: ".o_next",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Choose date X + 1",
|
||||
trigger: ".o_date_item_cell:nth-child(11) > div",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open Create New Version",
|
||||
trigger: ".o_field_widget[name='version_id'] > .o_arrow_button_wrapper > button",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Go to the next month",
|
||||
trigger: ".o_next",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Choose date X + 2",
|
||||
trigger: ".o_date_item_cell:nth-child(12) > div",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Wait until the form is saved",
|
||||
trigger: "body .o_form_saved",
|
||||
},
|
||||
],
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue