Skip to content

Commit

Permalink
[FIX] hr_holidays: ensure clicked element is visible in test
Browse files Browse the repository at this point in the history
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#117440

Signed-off-by: Kevin Baptiste <[email protected]>
  • Loading branch information
Kevin Baptiste committed Apr 3, 2023
1 parent d572315 commit 70f8409
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ tour.register('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;
Expand Down

0 comments on commit 70f8409

Please sign in to comment.