Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

GraphQl-439: Improve coverage for mutation addSimpleProductToCart or Cart contains a product after product got status Out of Stock #475

Closed
wants to merge 25 commits into from

Conversation

XxXgeoXxX
Copy link
Member

Description (*)

Issue #439

Manual testing scenarios (*)

Steps to reproduce (*)

Create Simple Product with
Name Simple Product
SKU: simple-product
Weight: 1
Price: 1
Qty: 1000
Create empty cart as a Guest or as Customer (GraphQL)
Add simple product to Cart (GraphQL)
Go to admin
Set Simple Product to be Out of Stock
Add Simple Product to Cart again (GraphQL) and get this error message

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 on Travis CI are green)

… a product after product got status Out of Stock
@@ -50,16 +50,16 @@ public function __construct(
*/
public function execute(Quote $cart, array $cartItems): void
{
foreach ($cartItems as $cartItemData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't move this logic after error checking.

Now it works as:

  1. Perform adding products to cart
  2. Check errors after the previous operation

Copy link
Member Author

Choose a reason for hiding this comment

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

changes were reverted

… a product after product got status Out of Stock
@galaoleksandr
Copy link

Cannot reproduce. Looks like it is already fixed.

@naydav naydav changed the title Improve coverage for mutation addSimpleProductToCart or Cart contains a product after product got status Out of Stock GraphQl-439: Improve coverage for mutation addSimpleProductToCart or Cart contains a product after product got status Out of Stock May 2, 2019
…Cart contains a product after product got status Out of Stock
… a product after product got status Out of Stock. Merge conflicts
…Cart contains a product after product got status Out of Stock magento#475
@lenaorobei
Copy link
Contributor

@XxXgeoXxX could you please address build failures.

@lenaorobei
Copy link
Contributor

Please instead of new mutation please introduce new field.

@lenaorobei
Copy link
Contributor

Closing this PR since no updates for more than 2 weeks. Please feel free to reopen if you want to continue working on this task. Thank you.

@lenaorobei lenaorobei closed this Aug 30, 2019
@ghost
Copy link

ghost commented Aug 30, 2019

Hi @XxXgeoXxX, 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.

@XxXgeoXxX XxXgeoXxX requested a review from paliarush as a code owner September 5, 2019 05:28
@TomashKhamlai
Copy link
Contributor

Hello @XxXgeoXxX
Please merge the latest 2.3-develop. Schema is not loading on your PR. It can take a lot of time to find out why but merging locally fixed schema loading.

Copy link
Contributor

@lenaorobei lenaorobei left a comment

Choose a reason for hiding this comment

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

@TomashKhamlai
Copy link
Contributor

This PR introduces some improvements:
✔️ I was not able to place the order
query cart shows that the product is in the cart

@TomashKhamlai
Copy link
Contributor

@XxXgeoXxX, please read this comment #475 (review)

@lenaorobei
Copy link
Contributor

Closing this PR due to inactivity. Please feel free to reopen if you are planning to continue working on it using proposed approach.

@lenaorobei lenaorobei closed this Dec 3, 2019
@ghost
Copy link

ghost commented Dec 3, 2019

Hi @XxXgeoXxX, 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants