From 4afd217e8c8584c908ff492f7a05d024eae5e866 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Tue, 17 Dec 2024 19:13:51 +0100 Subject: [PATCH 1/2] Use at least solidus_support 0.12.0 solidus_support 0.11.0 introduced flickwerk for patch loading. Somehow this messes with the zeitwerk autoloader and things acting weird (inflections broken, wrong constant module nesting, etc.) 0.12.0 reverted flickwerk. --- legacy_promotions/solidus_legacy_promotions.gemspec | 2 +- promotions/solidus_promotions.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy_promotions/solidus_legacy_promotions.gemspec b/legacy_promotions/solidus_legacy_promotions.gemspec index fdd1bcddaac..847a100ff0b 100644 --- a/legacy_promotions/solidus_legacy_promotions.gemspec +++ b/legacy_promotions/solidus_legacy_promotions.gemspec @@ -25,5 +25,5 @@ Gem::Specification.new do |s| s.add_dependency 'solidus_api', s.version s.add_dependency 'solidus_core', s.version - s.add_dependency 'solidus_support' + s.add_dependency 'solidus_support', '>= 0.12.0' end diff --git a/promotions/solidus_promotions.gemspec b/promotions/solidus_promotions.gemspec index fd3f6a35348..1838e94dfaa 100644 --- a/promotions/solidus_promotions.gemspec +++ b/promotions/solidus_promotions.gemspec @@ -27,7 +27,7 @@ Gem::Specification.new do |spec| spec.add_dependency "importmap-rails", "~> 1.2" spec.add_dependency "ransack-enum", "~> 1.0" spec.add_dependency "solidus_core", [">= 4.0.0", "< 5"] - spec.add_dependency "solidus_support", "~> 0.5" + spec.add_dependency "solidus_support", ">= 0.12.0" spec.add_dependency "stimulus-rails", "~> 1.2" spec.add_dependency "turbo-rails", ">= 1.4" end From fc517322dfa4983e69f4615f559196b50e92ed97 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Tue, 17 Dec 2024 21:19:26 +0100 Subject: [PATCH 2/2] test: Check for field before filling it. Sometimes the modal that contains the field is not present yet. Let's use capybara's waiting capabilities before filling the field. --- admin/spec/features/properties_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/spec/features/properties_spec.rb b/admin/spec/features/properties_spec.rb index d3eb375613a..bf0c813b368 100644 --- a/admin/spec/features/properties_spec.rb +++ b/admin/spec/features/properties_spec.rb @@ -98,7 +98,7 @@ it "shows validation errors" do visit "/admin/properties" find_row("Color").click - + expect(page).to have_field("Name", with: "Color") fill_in "Name", with: "" click_on "Update Property"