From 85649f889452fb4c375241fa5d434a4c0320b1bf Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Fri, 10 Jun 2022 06:33:16 +0200 Subject: [PATCH] Maintenance: Fix capybara test that started failing on recent FF. (cherry picked from commit 1af31d4f9527ff860e3dd5e769f15e0460ea0535) --- spec/system/ticket/update/full_quote_header_spec.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spec/system/ticket/update/full_quote_header_spec.rb b/spec/system/ticket/update/full_quote_header_spec.rb index 655336710..cab6851f0 100644 --- a/spec/system/ticket/update/full_quote_header_spec.rb +++ b/spec/system/ticket/update/full_quote_header_spec.rb @@ -365,10 +365,16 @@ RSpec.describe 'Ticket > Update > Full Quote Header', current_user_id: -> { curr end def timestamp_reply + format_string = if Capybara.current_driver == :zammad_firefox + '%A, %B %1d, %Y at %1I:%M:%S %p' + else + '%A, %B %1d, %Y, %1I:%M:%S %p' + end + expected .created_at .in_time_zone('Europe/London') - .strftime('%A, %B %1d, %Y, %1I:%M:%S %p') + .strftime(format_string) end def timestamp_forward