From 2929e8b2ea1bda66bd937990cd8d26bfdd8493d3 Mon Sep 17 00:00:00 2001 From: Tim Fischbach Date: Tue, 5 Nov 2024 11:10:47 +0100 Subject: [PATCH] Fix publishing entry feature spec Apparently the date picker overlay now opens to the top, hiding the header that we were trying to click to blur the input. Hit tab key instead to blur. --- spec/support/dominos/editor/publish_entry_panel.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/spec/support/dominos/editor/publish_entry_panel.rb b/spec/support/dominos/editor/publish_entry_panel.rb index 61f94d9754..05cc56dd5f 100644 --- a/spec/support/dominos/editor/publish_entry_panel.rb +++ b/spec/support/dominos/editor/publish_entry_panel.rb @@ -20,7 +20,7 @@ def set_depublication_date(date, time) node.find('input[name=publish_until_time]').set(time) # capybara doesn't hide the datepicker overlay properly - blur_input_fields + blur_date_field end def save @@ -53,10 +53,8 @@ def wait_for_save_to_finish node.has_selector?('.publish_entry.published') end - def blur_input_fields - node.find('h2').click - # Wait for date drop down to fade out - sleep 1 + def blur_date_field + node.find('input[name=publish_until]').native.send_keys(:tab) end end end