Skip to content

Commit d578091

Browse files
committed
more ci failure investigation - how far does it get before js alert popups up
1 parent f7faba9 commit d578091

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

spec/support/date_range_picker_shared_example.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ def date_range_picker_select_range(range_name)
114114

115115
date_range = "nov 08 - feb 08"
116116
page.execute_script("document.getElementById('filters_date_range').focus();")
117+
puts "🔍 AFTER FOCUS - URL: #{page.current_url}"
117118
page.execute_script("document.getElementById('filters_date_range').value = '#{date_range}';")
119+
puts "🔍 AFTER POPULATE DATE RANGE - URL: #{page.current_url}"
118120
# What we really want here is to simulate user hitting Enter to submit the form but only this click worked
119121
# But on CI, this ends up triggering a JS alert instead of submitting the form
120122
# FIXME: Can we use something like requestSubmit() to submit the form?
@@ -130,7 +132,7 @@ def date_range_picker_select_range(range_name)
130132
# Whereas locally it's transitioned to reflect the filters:
131133
# http://127.0.0.1:53534/distributions?filters%5Bby_item_id%5D=&filters%5Bby_partner%5D=&filters%5Bby_location%5D=&filters%5Bby_state%5D=&filters%5Bdate_range%5D=nov+08+-+feb+08&filters%5Bdate_range_label%5D=during+the+period+31+May+to+31+Aug&button=
132134
# So on CI, clicking the filter button after "tabbing" into the date range field does not submit the form, or not yet, and JS alert is running first
133-
puts "🔍 URL: #{page.current_url}"
135+
puts "🔍 AFTER SUBMIT FORM - URL: #{page.current_url}"
134136

135137
# === ON CI: JS ALERT SHOWS UP HERE ===
136138

0 commit comments

Comments
 (0)