mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
DEV: Change sidebar header dropdown to use wait_for_animation (#20627)
* DEV: Change sidebar header dropdown to use wait_for_animation Introduced in 54351e1b8a9b070bfce6a478e9912a76f1545a54, this helper should remove the need to have to add the .animated CSS class in JS for the sidebar. * DEV: Revert spec change
This commit is contained in:
@ -5,6 +5,7 @@ module PageObjects
|
||||
class Base
|
||||
include Capybara::DSL
|
||||
include RSpec::Matchers
|
||||
include SystemHelpers
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -5,9 +5,7 @@ module PageObjects
|
||||
class SidebarHeaderDropdown < PageObjects::Components::Base
|
||||
def click
|
||||
page.find(".hamburger-dropdown").click
|
||||
|
||||
# `.animated` is important here because we want to wait until dropdown has finished its animation completely
|
||||
page.has_css?(".menu-panel.animated")
|
||||
wait_for_animation(find(".menu-panel"), timeout: 5)
|
||||
self
|
||||
end
|
||||
|
||||
|
@ -4,6 +4,8 @@ module PageObjects
|
||||
module Pages
|
||||
class Base
|
||||
include Capybara::DSL
|
||||
include RSpec::Matchers
|
||||
include SystemHelpers
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user