test: scroll swap timeslots button into view before clicking (#3719)

This commit is contained in:
Jennifer Richards 2022-03-22 15:33:48 -03:00 committed by GitHub
parent fd9a0a4d9f
commit 4e437a9f2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -475,6 +475,14 @@ class EditMeetingScheduleTests(IetfSeleniumTestCase):
# option to swap. If we used the first or last day, a fencepost error in
# disabling options by date might be hidden.
clicked_index = 1
# scroll so the button we want to click is just below the navbar, otherwise it may
# fall beneath the sessions panel
navbar = self.driver.find_element_by_class_name('navbar')
self.driver.execute_script(
'window.scrollBy({top: %s, behavior: "instant"})' % (
future_swap_days_buttons[1].location['y'] - navbar.size['height']
)
)
future_swap_days_buttons[clicked_index].click()
try:
modal = wait.until(