magento / graphql-ce

[ARCHIVED] Please use magento/magento2 project
https://github.com/magento/magento2
Open Software License 3.0
131 stars 156 forks source link

[Test Coverage] Cover exception in QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php #1069

Closed chalov-anton closed 4 years ago

chalov-anton commented 4 years ago

Description:

Cover exception with API-functional test https://github.com/magento/graphql-ce/blob/765f3804e919e5f06f4941eb4a227258befe2995/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php#L70

Examples:

https://github.com/magento/graphql-ce/tree/2.3-develop/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer

https://github.com/magento/graphql-ce/tree/2.3-develop/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer

Guide:

https://devdocs.magento.com/guides/v2.3/graphql/functional-testing.htm

atwixfirster commented 4 years ago

Look like we should cover The item couldn't be removed from the quote. exception here.

However, it's almost impossible to simulate this exception via fixtures.

CC: @lenaorobei