[FIX] hr_holidays: ensure clicked element is visible in test
The test tour `time_off_request_calendar_view` would fail once the first Thursday of the year was not visible to the user (e.g. on the 1st April) as the MouseEvents would not be fired. closes odoo/odoo#117512 X-original-commit: 70f840999b67515bc7d7220321c8e39bec2adefc Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
@@ -16,6 +16,8 @@ registry.category("web_tour.tours").add('time_off_request_calendar_view', {
|
||||
trigger: '.fc-day-top.fc-thu',
|
||||
run: () => {
|
||||
const el = document.querySelector('.fc-day-top.fc-thu').firstChild;
|
||||
el.scrollIntoView();
|
||||
|
||||
const fromPosition = el.getBoundingClientRect();
|
||||
fromPosition.x += el.offsetWidth / 2;
|
||||
fromPosition.y += el.offsetHeight / 2;
|
||||
|
||||
Reference in New Issue
Block a user