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

[GraphQl] Adding Wishlist GraphQl coverage #28205

Merged

Conversation

eduard13
Copy link
Contributor

@eduard13 eduard13 commented May 13, 2020

Description (*)

This PR implements the Wishlist GraphQl

Solution Architecture

Related Pull Requests

https://github.com/magento/partners-magento2ee/pull/247

Fixed Issues (if relevant)

  1. Customer :: MyAccount :: Wishlist Management

Manual testing scenarios (*)

Please check the following document, in order to add different types of products to wishlist.

Add products to wishlist

mutation {
  addProductsToWishlist(
    wishlistId: 0, // It may be always 0 for CE version
    wishlistItems: [
      {
        sku: "24-MB01"
        quantity: 3
      }
    ]
) {
    userInputErrors {
      code
      message
    }
    wishlist {
      id
      name
      sharing_code
      items_count
      items {
        id
        description
        qty
        added_at
      }
    }
  }
}

Update wishlist item

mutation {
  updateProductsInWishlist(
    wishlistId: <wishlist_id>,
    wishlistItems: [
    {
  	wishlist_item_id: <wishlist_item_id>,
  	quantity: <quantity>,
        description: "Test Description"
    }
    ]
) {
    userInputErrors {
      code
      message
    }
    wishlist {
      id
      sharing_code
      items_count
      items {
        id
        description
        qty
        added_at
      }
    }
  }
}

Remove wishlist item

mutation {
  removeProductsFromWishlist(
    wishlistId: <wishlist_id>, 
    wishlistItemsIds: [<wishlist_item_id>]
) {
    wishlist {
      name
      items_count
    }
  }
}

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)

@m2-assistant
Copy link

m2-assistant bot commented May 13, 2020

Hi @eduard13. 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

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

@magento-engcom-team magento-engcom-team added Component: Wishlist Component: WishlistGraphQl Release Line: 2.4 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels May 13, 2020
@eduard13 eduard13 added the WIP Work In Progress label May 13, 2020
@eduard13 eduard13 force-pushed the feature/wishlist-graphql-258 branch from 1bb1dde to b32f610 Compare May 13, 2020 09:41
@eduard13
Copy link
Contributor Author

@magento run Static Tests

@rogyar rogyar self-assigned this May 18, 2020
@eduard13 eduard13 force-pushed the feature/wishlist-graphql-258 branch from 4e7ad8c to 6d904f1 Compare May 18, 2020 10:04
@eduard13
Copy link
Contributor Author

@magento run Static Tests

@eduard13
Copy link
Contributor Author

@magento run all tests

@eduard13 eduard13 force-pushed the feature/wishlist-graphql-258 branch from 0677e22 to 5de8d9b Compare May 18, 2020 15:10
@eduard13
Copy link
Contributor Author

@magento run all tests

@rogyar rogyar self-requested a review May 20, 2020 08:55
/**
* Adding products to wishlist resolver
*/
class AddProductsToWishlistResolver implements ResolverInterface
Copy link
Contributor

Choose a reason for hiding this comment

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

As a rule, we don't prefix resolvers with the "Resolver" keyword. We have some cases but they come from the past. It's not about something critical, but with the prefix we have quite a long class/file name.
I would not put the prefix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was checking the resolvers from the same folder. However, the suffixes were removed.

@eduard13 eduard13 removed the WIP Work In Progress label May 21, 2020
@eduard13 eduard13 marked this pull request as ready for review May 21, 2020 07:27
@ghost ghost assigned eduard13 May 22, 2020
@eduard13
Copy link
Contributor Author

@magento run Static Tests, Magento Health Index

@eduard13 eduard13 force-pushed the feature/wishlist-graphql-258 branch from 75e028e to 7488a36 Compare May 22, 2020 11:06
@eduard13
Copy link
Contributor Author

@magento run Static Tests, Magento Health Index

@eduard13 eduard13 changed the title [WIP] Adding Wishlist GraphQl coverage [GraphQl] Adding Wishlist GraphQl coverage May 22, 2020
@magento-engcom-team
Copy link
Contributor

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

@eduard13
Copy link
Contributor Author

@magento run WebAPI Tests

@eduard13
Copy link
Contributor Author

Hi @lenaorobei those failing tests are caused by MultipleWishlist related PR. Please check this comment for additional information

@lenaorobei
Copy link
Contributor

In this case those PRs should be delivered as related and builds triggered for corresponding ce/ee branches.

@lenaorobei
Copy link
Contributor

@magento run all tests

@eduard13
Copy link
Contributor Author

@lenaorobei looks like everything is green ✅ here. Are we able to proceed further with this one or are there any additional requirements from my side?
Thank you.

@eduard13
Copy link
Contributor Author

@magento run all tests

@lenaorobei
Copy link
Contributor

@dthampy this PR is ready for QA.

@keharper
Copy link
Contributor

I sent @eduard13 a schema file that contains updated descriptions.

Adjusting schema's descriptions
@eduard13
Copy link
Contributor Author

Thank you @keharper, I've just updated it.

@eduard13
Copy link
Contributor Author

@magento run all tests

@magento-engcom-team magento-engcom-team merged commit fe45fa3 into magento:2.4-develop Jun 23, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jun 23, 2020

Hi @eduard13, 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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Customer :: MyAccount :: Wishlist Management
7 participants