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

[TestApi] Add new way of assert violations #15695

Conversation

Wojdylak
Copy link
Member

@Wojdylak Wojdylak commented Jan 4, 2024

Q A
Branch? 1.13
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets N/A
License MIT

Currently, we assert violations by comparing the entire file. This checks not only the violations but also their order. Sometimes, the order is different, causing the test to fail. Therefore, the purpose of this PR is to introduce a new way of asserting violations without checking their order.

@Wojdylak Wojdylak requested a review from a team as a code owner January 4, 2024 07:21
Copy link

github-actions bot commented Jan 4, 2024

Bunnyshell Preview Environment deleted

Available commands:

  • /bns:deploy to redeploy the environment

@Wojdylak Wojdylak added the DX Issues and PRs aimed at improving Developer eXperience. label Jan 4, 2024
@NoResponseMate NoResponseMate merged commit 69c1349 into Sylius:1.13 Jan 4, 2024
25 checks passed
@NoResponseMate
Copy link
Contributor

Thank you, @Wojdylak!

@Wojdylak Wojdylak deleted the feature/new-way-of-assert-violations-in-api-tests branch January 5, 2024 10:35
@@ -155,10 +155,14 @@ public function it_does_not_update_a_shipping_method_with_duplicate_locale_trans
], \JSON_THROW_ON_ERROR),
);

$this->assertResponse(
$this->assertResponseViolations(
Copy link
Member

Choose a reason for hiding this comment

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

Feels like I still should be able to specify response code, there at least two codes of 400 and 422 in use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Issues and PRs aimed at improving Developer eXperience.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants