-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Core][Promotion] Unify taxon rule checkers #6744
[Core][Promotion] Unify taxon rule checkers #6744
Conversation
1733dc7
to
4f4e71f
Compare
@@ -26,15 +26,6 @@ Feature: Receiving a discount based on a configured promotion | |||
And my discount should be "-$10.00" | |||
|
|||
@ui | |||
Scenario: Receiving a discount on products from a specific taxon if an order contains products from an another taxon |
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.
That scenario should work with HasTaxonRule
, we shouldn't to remove it :)
@@ -120,9 +120,6 @@ sylius: | |||
product_association_type: | |||
name: Name | |||
promotion_rule: | |||
contains_taxon: | |||
taxon: Taxon | |||
count: Count | |||
taxon: |
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.
shouldn't it be now has_taxon
?
@@ -143,22 +143,12 @@ public function iAddIt() | |||
} | |||
|
|||
/** | |||
* @Given I add the "Contains number of items from taxon" rule configured with :count :taxonName | |||
* @Given I add the "Has at least one from taxons" rule configured with :firstTaxon | |||
* @Given I add the "Has at least one from taxons" rule configured with :firstTaxon and :secondTaxon |
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.
Shouldn't these steps start from @When
?
Thanks Mateusz, please apply all comments in a separate PR. |
[Core][Promotion] Unify taxon rule checkers
For now, we decided to keep only one, simpler rule, which checks is there any product from one of picked taxons. The other one (with count) could be easily implemented if needed. I'm also not 100% about new rule checker name, so I'd be glad to see any feedback about that.