Skip to content

Commit

Permalink
Fix publishing entry feature spec
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tf committed Nov 5, 2024
1 parent 5d13dc6 commit 2929e8b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions spec/support/dominos/editor/publish_entry_panel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2929e8b

Please sign in to comment.