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 exceptions in AssignShippingAddressToCart, AssignBillingAddressToCart #977

Closed TomashKhamlai closed 5 years ago

TomashKhamlai commented 5 years ago

Description:

Cover exceptions with api-functional tests: https://github.com/magento/graphql-ce/blob/e02dc94e04228901706936c2cac778679d5dc346/app/code/Magento/QuoteGraphQl/Model/Cart/AssignShippingAddressToCart.php#L54 https://github.com/magento/graphql-ce/blob/e02dc94e04228901706936c2cac778679d5dc346/app/code/Magento/QuoteGraphQl/Model/Cart/AssignBillingAddressToCart.php#L54 https://github.com/magento/graphql-ce/blob/e02dc94e04228901706936c2cac778679d5dc346/app/code/Magento/QuoteGraphQl/Model/Cart/AssignBillingAddressToCart.php#L56

TestCases:

\Magento\GraphQl\Customer\Quote\Customer\SetShippingAddressOnCartTest
 - testWithInvalidShippingAddressesInput
 \Magento\GraphQl\Customer\Quote\Customer\SetBillingAddressOnCartTest
 - testWithInvalidBillingAddressInput
 - testSetNotExistedBillingAddressId

Examples:

Magento\GraphQl\Customer Magento\GraphQl\Quote\Customer

Guide:

Graphql Functional Testing

atwixfirster commented 5 years ago

https://github.com/magento/graphql-ce/blob/e02dc94e04228901706936c2cac778679d5dc346/app/code/Magento/QuoteGraphQl/Model/Cart/AssignShippingAddressToCart.php#L54

done

https://github.com/magento/graphql-ce/blob/e02dc94e04228901706936c2cac778679d5dc346/app/code/Magento/QuoteGraphQl/Model/Cart/AssignBillingAddressToCart.php#L54

Already covered in dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php::testSetNotExistedBillingAddressFromAddressBook()

https://github.com/magento/graphql-ce/blob/e02dc94e04228901706936c2cac778679d5dc346/app/code/Magento/QuoteGraphQl/Model/Cart/AssignBillingAddressToCart.php#L56

done