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

GraphQL-432: Test coverage: 'reversed quote id to masked cart id' #449

Merged
merged 4 commits into from
Mar 27, 2019

Conversation

AleksLi
Copy link
Contributor

@AleksLi AleksLi commented Mar 6, 2019

Description (*)

Created separate class GetMaskedQuoteIdByReversedQuoteId and replaced method in one api-functional test.

Fixed Issues (if relevant)

  1. Test coverage: 'reversed quote id to masked cart id' #432: Test coverage: 'reversed quote id to masked cart id'

Manual testing scenarios (*)

  1. Please run the api-functional tests for \Magento\GraphQl\Quote\SetShippingAddressOnCartTest class

… and replaced method in one api-functional test
use Magento\Quote\Model\QuoteIdToMaskedQuoteIdInterface;
use Magento\Quote\Model\QuoteFactory;

class GetMaskedQuoteIdByReversedQuoteId
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, reuse this class in all of the places (find by getMaskedQuoteIdByReversedQuoteId)
But not just in one testcase class

Also, this class is used just for testing, so need to move to test directory dev/tests/api-functional/testsuite/Magento/GraphQl/Quote
``

Copy link
Contributor

Choose a reason for hiding this comment

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

@naydav , I am sorry but I have a question about GetMaskedQuoteIdByReversedQuoteId class name.

We load quote by reserved_order_id field

$this->quoteResource->load($quote, $reversedQuoteId, 'reserved_order_id');

and in the same time new class is called as GetMaskedQuoteIdByReversedQuoteId.

May we should use a proper name for it - GetMaskedQuoteIdByReservedOrderId?

Thank you!

CC: @AleksLi

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @atwixfirster,
I saw the fix in your PR https://github.com/magento/graphql-ce/pull/450/files

But for avoiding a lot of merge conflicts I am going to merge all of related PRs and finally make the fix in your PR which will be merged last.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't cover everything in all the places, because I thought it might be something with the class name or so. I will do that now

AleksLi and others added 3 commits March 13, 2019 12:31
…uote-id-test-coverage

# Conflicts:
#	dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetAvailablePaymentMethodsTest.php
#	dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php
#	dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php
#	dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/GetAvailablePaymentMethodsTest.php
@ghost
Copy link

ghost commented Mar 27, 2019

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

@naydav naydav deleted the 432-reversed-quote-id-test-coverage branch April 12, 2019 19:34
@naydav naydav removed this from the Release: 2.3.2 milestone Apr 17, 2019
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.

4 participants