diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/GiftMessage/Cart/Item/GiftMessageTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/GiftMessage/Cart/Item/GiftMessageTest.php index 756caf0e228b4..fa0909d556b3a 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/GiftMessage/Cart/Item/GiftMessageTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/GiftMessage/Cart/Item/GiftMessageTest.php @@ -27,34 +27,34 @@ protected function setUp(): void } /** - * @magentoConfigFixture default_store sales/gift_options/allow_items 1 + * @magentoConfigFixture default_store sales/gift_options/allow_items 0 * @magentoApiDataFixture Magento/GiftMessage/_files/guest/quote_with_item_message.php * @throws NoSuchEntityException * @throws Exception */ - public function testGiftMessageCartForItem() + public function testGiftMessageCartForItemNotAllow() { $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_guest_order_with_gift_message'); foreach ($this->requestCartResult($maskedQuoteId)['cart']['items'] as $item) { self::assertArrayHasKey('gift_message', $item); - self::assertArrayHasKey('to', $item['gift_message']); - self::assertArrayHasKey('from', $item['gift_message']); - self::assertArrayHasKey('message', $item['gift_message']); + self::assertNull($item['gift_message']); } } /** - * @magentoConfigFixture default_store sales/gift_options/allow_items 0 + * @magentoConfigFixture default_store sales/gift_options/allow_items 1 * @magentoApiDataFixture Magento/GiftMessage/_files/guest/quote_with_item_message.php * @throws NoSuchEntityException * @throws Exception */ - public function testGiftMessageCartForItemNotAllow() + public function testGiftMessageCartForItem() { $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_guest_order_with_gift_message'); foreach ($this->requestCartResult($maskedQuoteId)['cart']['items'] as $item) { self::assertArrayHasKey('gift_message', $item); - self::assertNull($item['gift_message']); + self::assertArrayHasKey('to', $item['gift_message']); + self::assertArrayHasKey('from', $item['gift_message']); + self::assertArrayHasKey('message', $item['gift_message']); } }