-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flexible with_adjustable_action trait to Promotion factory #4682
Add flexible with_adjustable_action trait to Promotion factory #4682
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it, left a non-blocking possible improvement. Let me know what you do think.
ad9c0fa
to
0238a3b
Compare
Currently, we do not have a factory for Promotion::Actions and the existing adjustment traits are not flexible. This trait will be useful, for more flexiblity when testing non out-of-the-box Promotion Actions and different calculators.
Noteably, keep existing transient arguments to not cause breaking specs for stores. Also, by using the new with_adjustable_action trait, they automatically become more flexible due to its transient arguments.
0238a3b
to
0b81b52
Compare
Codecov Report
@@ Coverage Diff @@
## master #4682 +/- ##
=======================================
Coverage 86.10% 86.11%
=======================================
Files 576 576
Lines 14627 14634 +7
=======================================
+ Hits 12595 12602 +7
Misses 2032 2032
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely!
Summary
Currently, we do not have a factory for Promotion Actions, and so this trait is used instead. Add more flexibility on the action and calculator class used is useful for when making new Promotion Actions.
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed (
cross them outif they are not):- [ ] I have added automated tests to cover my changes.- [ ] I have attached screenshots to demo visual changes.- [ ] I have opened a PR to update the guides.- [ ] I have updated the readme to account for my changes.