-
-
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
[CatalogPromotion][API] Extend the possibility of editing catalog promotion #13013
Conversation
GSadee
commented
Aug 27, 2021
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
Related tickets | |
License | MIT |
$response = $this->client->show($catalogPromotion->getCode()); | ||
|
||
Assert::true($this->responseChecker->hasTranslation($response, $localeCode, $field, $value)); |
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.
$response = $this->client->show($catalogPromotion->getCode()); | |
Assert::true($this->responseChecker->hasTranslation($response, $localeCode, $field, $value)); | |
Assert::true($this->responseChecker->hasTranslation( | |
$this->client->show($catalogPromotion->getCode()), | |
$localeCode, | |
$field, | |
$value) | |
); |
wdyt? :D
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.
Or even in one line all of the params.
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.
I would be for leaving as it is now, for me, it looks clearer
And I specify its label as "Christmas -50%" in "English (United States)" | ||
And I describe it as "This promotion gives a 50% discount on all products" in "English (United States)" | ||
And I save my changes | ||
Then this catalog promotion label in "English (United States)" locale should be "Christmas -50%" |
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.
It's, of course, correct, but I feel we can go further with the naturalness of Behat steps
Then this catalog promotion should be labelled as "Christmas -50%" in "English (United States)
something like this? But still, it's good to go :D
Given the catalog promotion "Christmas sale" is available in "United States" | ||
When I want to modify a catalog promotion "Christmas sale" | ||
And I make it available in channel "Europe" | ||
And I make it unavailable in channel "United States" |
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.
Btw, should we already take it into account in catalog promotion application? To not apply it on variants that are not available in some channel? 🤔
Thanks, Grzegorz! 🎉 |
… promotions scenarios (GSadee) This PR was merged into the 1.11-dev branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | resolves comment #13013 (comment) | License | MIT <!-- - Bug fixes must be submitted against the 1.9 or 1.10 branch (the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- 845df97 [CatalogPromotion][Behat] Remove duplicated feature file 5abf3de [CatalogPromotion][Behat] Minor improvements for catalog promotions scenarios