This repository has been archived by the owner on Dec 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 156
GraphQl-309: [Checkout] Checkout Agreements #504
Merged
magento-engcom-team
merged 15 commits into
2.3-develop
from
graphQl-309-checkout-agreement-coverage
May 10, 2019
Merged
GraphQl-309: [Checkout] Checkout Agreements #504
magento-engcom-team
merged 15 commits into
2.3-develop
from
graphQl-309-checkout-agreement-coverage
May 10, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rage' of github.com:magento/graphql-ce into graphQl-309-checkout-agreement-coverage
@galaoleksandr Pls, test this PR |
naydav
suggested changes
Apr 16, 2019
# See COPYING.txt for license details. | ||
|
||
type Query { | ||
checkoutAgreements: [CheckoutAgreement] @resolver(class: "Magento\\CheckoutAgreementsGraphQl\\Model\\Resolver\\CheckoutAgreements") @doc(description: "The Checkout Agreements query returns information about a Checkout Agreements") |
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.
The Checkout Agreements query returns information about a Checkout Agreements
:)
...i-functional/testsuite/Magento/GraphQl/CheckoutAgreements/Api/CheckoutAgreementsListTest.php
Outdated
Show resolved
Hide resolved
app/code/Magento/CheckoutAgreementsGraphQl/Model/Resolver/CheckoutAgreements.php
Outdated
Show resolved
Hide resolved
...i-functional/testsuite/Magento/GraphQl/CheckoutAgreements/Api/CheckoutAgreementsListTest.php
Outdated
Show resolved
Hide resolved
*/ | ||
public function getData(): array | ||
{ | ||
$this->searchCriteriaBuilder->addFilter(AgreementInterface::IS_ACTIVE, true); |
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.
Need to add support of store
(with tests coverage)
Also, looks using the collection (which we can consider as query API)
$agreements = $this->agreementCollectionFactory->create();
$agreements->addStoreFilter($this->_storeManager->getStore()->getId()); // TODO: store should be get from query context
$agreements->addFieldToFilter('is_active', 1);
app/code/Magento/CheckoutAgreementsGraphQl/Model/Resolver/CheckoutAgreements.php
Outdated
Show resolved
Hide resolved
naydav
changed the title
graphQl-309: added agreement coverage
GraphQl-309: [Checkout] Checkout Agreements
May 2, 2019
…eckout-agreement-coverage # Conflicts: # composer.lock
pmclain
reviewed
May 3, 2019
Hi @VitaliyBoyko, thank you for your contribution! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (*)
Added coverage for checkout agreements.
#309 Checkout Agreement coverage
Sample query: