Skip to content

Commit 4e437a9

Browse files
test: scroll swap timeslots button into view before clicking (ietf-tools#3719)
1 parent fd9a0a4 commit 4e437a9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ietf/meeting/tests_js.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,14 @@ def test_past_swap_days_buttons(self):
475475
# option to swap. If we used the first or last day, a fencepost error in
476476
# disabling options by date might be hidden.
477477
clicked_index = 1
478+
# scroll so the button we want to click is just below the navbar, otherwise it may
479+
# fall beneath the sessions panel
480+
navbar = self.driver.find_element_by_class_name('navbar')
481+
self.driver.execute_script(
482+
'window.scrollBy({top: %s, behavior: "instant"})' % (
483+
future_swap_days_buttons[1].location['y'] - navbar.size['height']
484+
)
485+
)
478486
future_swap_days_buttons[clicked_index].click()
479487
try:
480488
modal = wait.until(

0 commit comments

Comments
 (0)