Skip to content

fix(platform-demo-data): use the cart amount rule for demo shipping methods - #29

Merged
Dennis Garding (DennisGarding) merged 1 commit into
trunkfrom
feat/363-default-return-eligibility-rule
Oct 8, 2026
Merged

Dennis Garding (DennisGarding) merged 1 commit into
trunkfrom
feat/363-default-return-eligibility-rule

Conversation

@DennisGarding

Copy link
Copy Markdown
Contributor

1. Why is this change necessary?

Demo shipping methods could be assigned an unrelated rule because the provider selected the first rule returned by the database. Their availability rule should be deterministic.

2. What does this change do, exactly?

  • Exposes the cart amount demo rule ID as a constant in RuleProvider.
  • Assigns that rule explicitly to every demo shipping method.
  • Adds a test confirming that an unrelated rule does not change the shipping methods’ availability rule.

3. Describe each step to reproduce the issue or behaviour.

  1. Add another rule to the database.
  2. Generate the platform demo data.
  3. Check that every shipping method uses the cart amount demo rule as its availability rule.

@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.03%. Comparing base (673176e) to head (b9a7063).

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk      #29      +/-   ##
============================================
+ Coverage     93.99%   94.03%   +0.03%     
+ Complexity      100       98       -2     
============================================
  Files            15       15              
  Lines          1582     1575       -7     
============================================
- Hits           1487     1481       -6     
+ Misses           95       94       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DennisGarding
Dennis Garding (DennisGarding) merged commit 9d52eeb into trunk Oct 8, 2026
9 checks passed
@DennisGarding
Dennis Garding (DennisGarding) deleted the feat/363-default-return-eligibility-rule branch October 8, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants