Skip to content

Commit 7305a43

Browse files
author
Vitaliy Boyko
committed
graphQl-309: added agreement mode
1 parent cc5e217 commit 7305a43

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

app/code/Magento/CheckoutAgreementsGraphQl/Model/Resolver/DataProvider/CheckoutAgreements.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public function getData(): array
7373
AgreementInterface::CONTENT_HEIGHT => $checkoutAgreement->getContentHeight(),
7474
AgreementInterface::CHECKBOX_TEXT => $checkoutAgreement->getCheckboxText(),
7575
AgreementInterface::IS_HTML => $checkoutAgreement->getIsHtml(),
76+
AgreementInterface::MODE => $checkoutAgreement->getMode(),
7677
];
7778
}
7879

app/code/Magento/CheckoutAgreementsGraphQl/etc/schema.graphqls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ type CheckoutAgreement @doc(description: "Defines all Checkout Agreement informa
1212
content_height: String @doc(description: "Checkout Agreement content height")
1313
checkbox_text: String @doc(description: "Checkout Agreement checkbox tex")
1414
is_html: Boolean @doc(description: "Is Checkout Agreement content in HTML format")
15+
mode: Int @doc(description: "Is Checkout Agreement content in HTML format")
1516
}

dev/tests/api-functional/testsuite/Magento/GraphQl/CheckoutAgreements/Api/CheckoutAgreementsListTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public function testGetActiveAgreement()
6363
$this->assertEquals('200px', $agreements[0]['content_height']);
6464
$this->assertEquals('Checkout agreement checkbox text.', $agreements[0]['checkbox_text']);
6565
$this->assertEquals(true, $agreements[0]['is_html']);
66+
$this->assertEquals(0, $agreements[0]['mode']);
6667
}
6768

6869
/**
@@ -89,6 +90,7 @@ public function testGetActiveAgreementOnSecondStore()
8990
$this->assertEquals('200px', $agreements[0]['content_height']);
9091
$this->assertEquals('Checkout agreement checkbox text.', $agreements[0]['checkbox_text']);
9192
$this->assertEquals(true, $agreements[0]['is_html']);
93+
$this->assertEquals(0, $agreements[0]['mode']);
9294
}
9395

9496
/**
@@ -153,6 +155,7 @@ private function getQuery(): string
153155
content_height
154156
checkbox_text
155157
is_html
158+
mode
156159
}
157160
}
158161
QUERY;

0 commit comments

Comments
 (0)