Improve order updater test coverage#6377
Merged
adammathys merged 7 commits intosolidusio:mainfrom Nov 25, 2025
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6377 +/- ##
=======================================
Coverage 89.45% 89.45%
=======================================
Files 974 974
Lines 20322 20322
=======================================
Hits 18179 18179
Misses 2143 2143 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
We were missing a spec for automations like the `CreateDiscountedItem` benefit.
The new tests use factories to more realistically set up orders, shipments, and inventory units in various states to simulate order updater functionality. Co-authored-by: Alistair Norman <alistair@super.gd> Co-authored-by: Kendra Riga <kendra@super.gd> Co-authored-by: Chris Todorov <chris@super.gd> Co-Authored-By: Adam Mueller <adam@super.gd> Co-Authored-By: Sofia Besenski <sofia@super.gd>
This removes the deprecation warnings from our test suite. Co-authored-by: Adam Mueller <adam@super.gd> Co-authored-by: Kendra Riga <kendra@super.gd> Co-authored-by: Senem Soy <senem@super.gd>
We're proposing a new default for this configuration value, so this change updates the test in the new promotion system to not be dependent on the current default value. This test will fail if the default configuration changes. Co-authored-by: Benjamin Willems <benjamin@super.gd> Co-authored-by: Kendra Riga <kendra@super.gd> Co-authored-by: Adam Mueller <adam@super.gd> Co-Authored-By: Alistair Norman <alistair@super.gd> Co-Authored-By: Sofia Besenski <sofia@super.gd>
This is calling the recalculate method not update_adjustments. Co-Authored-By: Adam Mueller <adam@super.gd> Co-Authored-By: benjamin wil <benjamin@super.gd> Co-Authored-By: Andrew Stewart <andrew@super.gd> Co-Authored-By: Harmony Bouvier <harmony@super.gd> Co-Authored-By: Jared Norman <jared@super.gd> Co-Authored-By: Kendra Riga <kendar@super.gd> Co-Authored-By: Sofia Besenski <sofia@super.gd> Co-Authored-By: Chris Todorov <chris@super.gd> Co-Authored-By: Tom Van Manen <tom@super.gd> Co-Authored-By: Noah Silvera <noah@super.gd>
Co-authored-by: Adam Mueller <adam@super.gd> Co-authored-by: Andrew Stewart <andrew@super.gd> Co-authored-by: Jared Norman <jared@super.gd> Co-authored-by: Noah Silvera <noah@super.gd> Co-authored-by: benjamin wil <benjamin@super.gd> Co-Authored-By: Sofia Besenski <sofia@super.gd> Co-Authored-By: Chris Todorov <chris@super.gd>
ba0b073 to
db98d00
Compare
mamhoff
approved these changes
Nov 20, 2025
Contributor
mamhoff
left a comment
There was a problem hiding this comment.
Love some love for the test suite.
| initializer = SolidusPromotions::Engine.initializers.find { |i| i.name == "solidus_promotions.flickwerk_alias" } | ||
| initializer.run | ||
| expect(Flickwerk.aliases["Spree::Config.order_recalculator_class"]).to eq("Spree::OrderUpdater") | ||
| expect(Flickwerk.aliases["Spree::Config.order_recalculator_class"]).to eq("ThisIsATestClassName") |
Contributor
There was a problem hiding this comment.
With #6376, we probably don't need the Flickwerk alias to be there anymore. Not blocking, just a note that the feature can be removed.
adammathys
approved these changes
Nov 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pulls some of the test refactoring that was done in the in memory order updater PR into its own pull request. We improve some of the test coverage for the regular order updater. These changes were extracted from #5872
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: