-
Notifications
You must be signed in to change notification settings - Fork 153
[Test coverage] add to cart simple/virtual products with custom options #395
[Test coverage] add to cart simple/virtual products with custom options #395
Conversation
Please add one more commit. Considering that GraphQL is trying to 100% automation coverage I ask you to add something like:
At this moment such requests where options were omitted will return error for every required option in on message. But probably this will be changed here #421. Just let me know if you have no time to keep up, we can create a separate task for coverage and merge this PR with existing coverage. Thank you in advance. |
Sure, will provide additional test cases |
Hi @TomashKhamlai. I've provided the corresponding test cases. Also, I've created an additional issue: #435. We need to cover adding a product to the shopping cart with recently introduced customizable options (once the corresponding changes are merged) |
dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/AddSimpleProductToCartTest.php
Outdated
Show resolved
Hide resolved
3c5747a
to
ac855ab
Compare
@naydav should be good now |
protected function setUp() | ||
{ | ||
$objectManager = Bootstrap::getObjectManager(); | ||
$this->quoteResource = $objectManager->get(QuoteResource::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace on object \Magento\Quote\Model\QuoteIdToMaskedQuoteIdInterface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify this point please? I believe this part has been refactored already
dev/tests/integration/testsuite/Magento/Catalog/_files/product_virtual.php
Outdated
Show resolved
Hide resolved
//Product already removed | ||
} catch (\Magento\Framework\Exception\StateException $exception) { | ||
} catch (StateException $exception) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will we have state exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of \Exception
in the repository method:
throw new \Magento\Framework\Exception\StateException( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we expected that just NoSuchEntityException
could be thrown if will throw another we can't suppress it
...tests/integration/testsuite/Magento/Catalog/_files/product_virtual_with_options_rollback.php
Outdated
Show resolved
Hide resolved
…e-virtual-test-coverage
…e-virtual-test-coverage
Hi @rogyar, thank you for your contribution! |
Description (*)
This PR introduces test coverage for adding a simple/virtual product to the shopping cart with custom options that are currently supported within a scope of GraphQl coverage.
Fixed Issues (if relevant)