Scroll to elements before interacting

pull/5988/head
Oliver Günther 7 years ago
parent 69bd0c2a74
commit 6256e5cd92
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 4
      spec/features/work_packages/table/switch_types_spec.rb
  2. 1
      spec/support/components/work_packages/relations.rb

@ -292,6 +292,10 @@ describe 'Switching types in work package table', js: true do
cf_edit_field.field_container.find('.wp-inline-edit--toggle-multiselect').click
sel = cf_edit_field.input_element
# Scroll to element so it is fully visible
scroll_to_element(sel)
sel.select "pineapple"
sel.select "mushrooms"

@ -49,6 +49,7 @@ module Components
retry_block do
# Focus type edit to expose buttons
span = page.find(".relation-row-#{relatable.id} .relation-row--type")
scroll_to_element(span)
page.driver.browser.action.move_to(span.native).perform
# Click the corresponding action button

Loading…
Cancel
Save