Skip to content

Commit 27b2869

Browse files
authored
Merge branch 'main' into dependabot/bundler/flipper-ui-1.4.1
2 parents 677c504 + 98ee587 commit 27b2869

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ GEM
128128
bindex (0.8.1)
129129
binding_of_caller (2.0.0)
130130
debug_inspector (>= 1.2.0)
131-
bootsnap (1.20.1)
131+
bootsnap (1.24.1)
132132
msgpack (~> 1.2)
133133
bootstrap (5.2.3)
134134
autoprefixer-rails (>= 9.1.0)

app/models/event.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class Event < ApplicationRecord
1818
include Filterable
1919

20-
scope :for_organization, ->(organization_id) { where(organization_id: organization_id).order(:event_time, :updated_at) }
20+
scope :for_organization, ->(organization_id) { where(organization_id: organization_id).order(:event_time, :id) }
2121
scope :without_snapshots, -> { where("type != 'SnapshotEvent'") }
2222
scope :during, ->(range) { where(events: {created_at: range}) }
2323
scope :by_type, ->(type) { where(type: type) }

spec/services/exports/export_partners_csv_service_spec.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,15 @@
303303
end
304304

305305
it "should handle a partner with missing profile info" do
306-
# The partner_profile factory defaults to populating the no_social_media_presence, primary_contact_name, and primary_contact_email fields
306+
# The partner_profile factory defaults to populating the no_social_media_presence, primary_contact_name, and primary_contact_email fields.
307+
# Destroy the existing profile first; otherwise the factory's `partner { Partner.first || create(:partner) }`
308+
# default attaches the new profile to the same partner, briefly leaving two partner_profiles rows with the
309+
# same partner_id and making the has_one lookup nondeterministic on CI.
310+
partners.first.profile.destroy!
311+
partners.first.reload
307312
partners.first.update(profile: create(
308313
:partner_profile,
314+
partner: partners.first,
309315
no_social_media_presence: nil,
310316
primary_contact_name: nil,
311317
primary_contact_email: nil

spec/support/date_range_picker_shared_example.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def date_range_picker_select_range(range_name)
5151
visit subject
5252
date_range = "#{Time.zone.local(1919, 7, 1).to_fs(:date_picker)} - #{Time.zone.local(2020, 7, 31).to_fs(:date_picker)}"
5353
fill_in "filters_date_range", with: date_range
54-
find(:id, 'filters_date_range').native.send_keys(:enter)
54+
click_on "Filter"
5555
expect(page).to have_css("table tbody tr", count: 6)
5656
end
5757
end
@@ -69,7 +69,7 @@ def date_range_picker_select_range(range_name)
6969
visit subject
7070
date_range = "#{Time.zone.local(2019, 7, 1).to_fs(:date_picker)} - #{Time.zone.local(2019, 7, 31).to_fs(:date_picker)}"
7171
fill_in "filters_date_range", with: date_range
72-
find(:id, 'filters_date_range').native.send_keys(:enter)
72+
click_on "Filter"
7373
expect(page).to have_css("table tbody tr", count: 2)
7474
end
7575
end
@@ -79,7 +79,7 @@ def date_range_picker_select_range(range_name)
7979
visit subject
8080
date_range = "#{Time.zone.local(2019, 7, 22).to_fs(:date_picker)} - #{Time.zone.local(2019, 7, 28).to_fs(:date_picker)}"
8181
fill_in "filters_date_range", with: date_range
82-
find(:id, 'filters_date_range').native.send_keys(:enter)
82+
click_on "Filter"
8383
expect(page).to have_css("table tbody tr", count: 1)
8484
end
8585
end

0 commit comments

Comments
 (0)