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

magento/magento2#: GraphQl. setPaymentMethodAndPlaceOrder. Remove redundant logic. #28506

Conversation

atwixfirster
Copy link
Contributor

@atwixfirster atwixfirster commented Jun 3, 2020

Description (*)

PR removes a redundant logic in the setPaymentMethodAndPlaceOrder mutation validation conditions:

...

if (!isset($args['input']['cart_id']) || empty($args['input']['cart_id'])) {
            throw new GraphQlInputException(__('Required parameter "cart_id" is missing'));
}

...

if (!isset($args['input']['payment_method']['code']) || empty($args['input']['payment_method']['code'])) {
            throw new GraphQlInputException(__('Required parameter "code" for "payment_method" is missing.'));
}

because Webonyx covers isset($args['input']['cart_id']), isset($args['input']['payment_method']['code'] cases.

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Thank you!

@m2-assistant
Copy link

m2-assistant bot commented Jun 3, 2020

Hi @atwixfirster. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

@ghost ghost added this to Pending Review in Pull Requests Dashboard Jun 3, 2020
@magento-engcom-team magento-engcom-team added Component: QuoteGraphQl Release Line: 2.4 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Jun 3, 2020
@atwixfirster
Copy link
Contributor Author

@magento run all tests

@rogyar rogyar self-assigned this Jun 4, 2020
@rogyar rogyar added Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests and removed Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests labels Jun 4, 2020
@rogyar
Copy link
Contributor

rogyar commented Jun 4, 2020

Hi @atwixfirster. Could you cover this case with a test, please?

@atwixfirster atwixfirster force-pushed the graphql-setPaymentMethodAndPlaceOrder-remove-redundant-logic branch from da01e80 to 516f992 Compare June 6, 2020 21:52
@atwixfirster
Copy link
Contributor Author

@magento run all tests

@rogyar rogyar added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: test coverage and removed Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests labels Jun 11, 2020
@ghost ghost moved this from Pending Review to Ready for Testing in Pull Requests Dashboard Jun 11, 2020
@magento-engcom-team
Copy link
Contributor

Hi @rogyar, thank you for the review.
ENGCOM-7664 has been created to process this Pull Request

@ghost ghost assigned prabhuram93 Jun 17, 2020
@prabhuram93
Copy link
Contributor

@dthampy Its Ready for Testing. Has coverage.

@dthampy dthampy moved this from Ready for Testing to Testing in Progress in Pull Requests Dashboard Jun 22, 2020
@dthampy
Copy link
Contributor

dthampy commented Jun 22, 2020

@magento run all tests

@ghost ghost moved this from Testing in Progress to Ready for Testing in Pull Requests Dashboard Jun 22, 2020
@ghost ghost assigned dthampy Jun 22, 2020
@dthampy dthampy moved this from Ready for Testing to Testing in Progress in Pull Requests Dashboard Jun 22, 2020
@dthampy dthampy moved this from Testing in Progress to Merge in Progress in Pull Requests Dashboard Jun 23, 2020
magento-engcom-team pushed a commit that referenced this pull request Jun 27, 2020
@magento-engcom-team magento-engcom-team merged commit 4cedeeb into magento:2.4-develop Jun 27, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jun 27, 2020

Hi @atwixfirster, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@ghost ghost moved this from Merge in Progress to Recently Merged in Pull Requests Dashboard Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: test coverage Component: QuoteGraphQl Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Progress: accept Project: GraphQL Release Line: 2.4
Projects
Pull Requests Dashboard
  
Recently Merged
Development

Successfully merging this pull request may close these issues.

None yet

7 participants