Skip to content

A platform for community discussion. Free, open, simple.

DEV: scroll to reply button before click (#32663)

Joffrey JAFFEUX38ee9a0a7935
diff --git a/spec/system/page_objects/pages/topic.rb b/spec/system/page_objects/pages/topic.rb
index cb95cb03dcd..56225779499 100644
--- a/spec/system/page_objects/pages/topic.rb
+++ b/spec/system/page_objects/pages/topic.rb
@@ -250,7 +250,9 @@ module PageObjects
end
def click_footer_reply
- find("#topic-footer-buttons .btn-primary", text: "Reply").click
+ button = find("#topic-footer-buttons .btn-primary", text: "Reply")
+ page.execute_script("arguments[0].scrollIntoView();", button)
+ button.click
self
end