Skip to content
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

Merged
merged 2 commits into from
Nov 16, 2016

Conversation

Zales0123
Copy link
Member

@Zales0123 Zales0123 commented Nov 16, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? yes
Related tickets fixes #5355, #6457
License MIT

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.

@pjedrzejewski pjedrzejewski added BC Break PRs introducing BC breaks (do not even try to merge). Bug Fix labels Nov 16, 2016
@Zales0123 Zales0123 changed the title [WIP][Core][Promotion] Unify taxon rule checkers [Core][Promotion] Unify taxon rule checkers Nov 16, 2016
@Zales0123 Zales0123 force-pushed the unify-taxon-rule-checkers branch from 1733dc7 to 4f4e71f Compare November 16, 2016 12:57
@@ -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
Copy link
Contributor

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:
Copy link
Contributor

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
Copy link
Member

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 ?

@michalmarcinkowski michalmarcinkowski merged commit 747322a into Sylius:master Nov 16, 2016
@michalmarcinkowski
Copy link
Contributor

Thanks Mateusz, please apply all comments in a separate PR.

@Zales0123 Zales0123 deleted the unify-taxon-rule-checkers branch November 20, 2016 19:35
pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019
[Core][Promotion] Unify taxon rule checkers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC Break PRs introducing BC breaks (do not even try to merge).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Promotions] ContainsTaxonRuleChecker & TaxonRuleChecker
7 participants