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

[CatalogPromotion][API] Add validation for creating catalog promotion with actions #13071

Merged

Conversation

GSadee
Copy link
Member

@GSadee GSadee commented Sep 8, 2021

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets based on #13037
License MIT

@GSadee GSadee added Feature New feature proposals. API APIs related issues and PRs. labels Sep 8, 2021
@GSadee GSadee requested a review from a team as a code owner September 8, 2021 06:18
@GSadee GSadee force-pushed the api-catalog-promotion-action-validation branch from 340352e to b68da67 Compare September 8, 2021 08:23
Comment on lines +175 to +176
json_encode([
'name' => 'T-Shirts discount',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should consider something for our contract tests that will allow us to use json files with request body. Because those tests are getting enormously huge with just this funky 💃 code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably use json files without problems, but then these tests will become less readable, so I'm not 100% convinced. We should think about that and probably refactor our contracts tests in a separate PR

Comment on lines +215 to +218
$response = $this->client->getResponse();

$this->assertResponse(
$response,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$response = $this->client->getResponse();
$this->assertResponse(
$response,
$this->assertResponse(
$this->client->getResponse(),

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change that in another PR

@GSadee GSadee merged commit 7815f75 into Sylius:master Sep 8, 2021
@GSadee GSadee deleted the api-catalog-promotion-action-validation branch September 8, 2021 10:34
Tomanhez added a commit that referenced this pull request Sep 8, 2021
…(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 | #13071
| License         | MIT


Commits
-------

2c8cc59 [CatalogPromotion][API] Refactor validation of rules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API APIs related issues and PRs. Feature New feature proposals.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants