diff --git a/app/code/Magento/CatalogStorefront/Test/Api/Product/ProductOptions/GiftCardProductTest.php b/app/code/Magento/CatalogStorefront/Test/Api/Product/ProductOptions/GiftCardProductTest.php index 72efc2eeb..07ac3f826 100644 --- a/app/code/Magento/CatalogStorefront/Test/Api/Product/ProductOptions/GiftCardProductTest.php +++ b/app/code/Magento/CatalogStorefront/Test/Api/Product/ProductOptions/GiftCardProductTest.php @@ -190,6 +190,8 @@ public function getGiftCardProductProvider(): array [ 'productOptions' => [ [ + 'label' => 'Amount', + 'render_type' => 'drop_down', 'type' => 'giftcard', 'values' => [ // phpcs:ignore Magento2.Functions.DiscouragedFunction @@ -198,10 +200,18 @@ public function getGiftCardProductProvider(): array ] ], 'productShopperInputOptions' => [ - // phpcs:ignore Magento2.Functions.DiscouragedFunction - ['id' => \base64_encode('giftcard/giftcard_recipient_name')], - // phpcs:ignore Magento2.Functions.DiscouragedFunction - ['id' => \base64_encode('giftcard/giftcard_sender_name')] + [ + // phpcs:ignore Magento2.Functions.DiscouragedFunction + 'id' => \base64_encode('giftcard/giftcard_sender_name'), + 'label' => 'Sender Name', + 'render_type' => 'text' + ], + [ + // phpcs:ignore Magento2.Functions.DiscouragedFunction + 'id' => \base64_encode('giftcard/giftcard_recipient_name'), + 'label' => 'Recipient Name', + 'render_type' => 'text' + ] ] ] ]; @@ -210,6 +220,7 @@ public function getGiftCardProductProvider(): array /** * Virtual gift card with fixed and open amount data provider * + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @return array */ public function getVirtualMultiWebsiteDataProvider(): array @@ -218,6 +229,8 @@ public function getVirtualMultiWebsiteDataProvider(): array [ 'defaultWebsiteOptions' => [ [ + 'label' => 'Amount', + 'render_type' => 'drop_down', 'type' => 'giftcard', 'values' => [ // phpcs:ignore Magento2.Functions.DiscouragedFunction @@ -228,17 +241,35 @@ public function getVirtualMultiWebsiteDataProvider(): array ] ], 'defaultWebsiteInputOptions' => [ - // phpcs:ignore Magento2.Functions.DiscouragedFunction - ['id' => \base64_encode('giftcard/giftcard_recipient_name')], - // phpcs:ignore Magento2.Functions.DiscouragedFunction - ['id' => \base64_encode('giftcard/giftcard_sender_name')], - // phpcs:ignore Magento2.Functions.DiscouragedFunction - ['id' => \base64_encode('giftcard/giftcard_recipient_email')], - // phpcs:ignore Magento2.Functions.DiscouragedFunction - ['id' => \base64_encode('giftcard/giftcard_sender_email')], + [ + // phpcs:ignore Magento2.Functions.DiscouragedFunction + 'id' => \base64_encode('giftcard/giftcard_sender_name'), + 'label' => 'Sender Name', + 'render_type' => 'text' + ], + [ + // phpcs:ignore Magento2.Functions.DiscouragedFunction + 'id' => \base64_encode('giftcard/giftcard_recipient_name'), + 'label' => 'Recipient Name', + 'render_type' => 'text' + ], + [ + // phpcs:ignore Magento2.Functions.DiscouragedFunction + 'id' => \base64_encode('giftcard/giftcard_sender_email'), + 'label' => 'Sender Email', + 'render_type' => 'email' + ], + [ + // phpcs:ignore Magento2.Functions.DiscouragedFunction + 'id' => \base64_encode('giftcard/giftcard_recipient_email'), + 'label' => 'Recipient Email', + 'render_type' => 'email' + ], [ // phpcs:ignore Magento2.Functions.DiscouragedFunction 'id' => \base64_encode('giftcard/giftcard_message'), + 'label' => 'Message', + 'render_type' => 'text', 'range' => [ 'from' => 0.0, 'to' => 255.0 @@ -247,6 +278,8 @@ public function getVirtualMultiWebsiteDataProvider(): array [ // phpcs:ignore Magento2.Functions.DiscouragedFunction 'id' => \base64_encode('giftcard/custom_giftcard_amount'), + 'label' => 'Amount in', + 'render_type' => 'giftcardopenamount', 'range' => [ 'from' => 100.0, 'to' => 150.0 @@ -255,6 +288,8 @@ public function getVirtualMultiWebsiteDataProvider(): array ], 'secondWebsiteOptions' => [ [ + 'label' => 'Amount', + 'render_type' => 'drop_down', 'type' => 'giftcard', 'values' => [ // phpcs:ignore Magento2.Functions.DiscouragedFunction @@ -265,17 +300,35 @@ public function getVirtualMultiWebsiteDataProvider(): array ] ], 'secondWebsiteInputOptions' => [ - // phpcs:ignore Magento2.Functions.DiscouragedFunction - ['id' => \base64_encode('giftcard/giftcard_recipient_name')], - // phpcs:ignore Magento2.Functions.DiscouragedFunction - ['id' => \base64_encode('giftcard/giftcard_sender_name')], - // phpcs:ignore Magento2.Functions.DiscouragedFunction - ['id' => \base64_encode('giftcard/giftcard_recipient_email')], - // phpcs:ignore Magento2.Functions.DiscouragedFunction - ['id' => \base64_encode('giftcard/giftcard_sender_email')], + [ + // phpcs:ignore Magento2.Functions.DiscouragedFunction + 'id' => \base64_encode('giftcard/giftcard_sender_name'), + 'label' => 'Sender Name', + 'render_type' => 'text' + ], + [ + // phpcs:ignore Magento2.Functions.DiscouragedFunction + 'id' => \base64_encode('giftcard/giftcard_recipient_name'), + 'label' => 'Recipient Name', + 'render_type' => 'text' + ], + [ + // phpcs:ignore Magento2.Functions.DiscouragedFunction + 'id' => \base64_encode('giftcard/giftcard_sender_email'), + 'label' => 'Sender Email', + 'render_type' => 'email' + ], + [ + // phpcs:ignore Magento2.Functions.DiscouragedFunction + 'id' => \base64_encode('giftcard/giftcard_recipient_email'), + 'label' => 'Recipient Email', + 'render_type' => 'email' + ], [ // phpcs:ignore Magento2.Functions.DiscouragedFunction 'id' => \base64_encode('giftcard/giftcard_message'), + 'label' => 'Message', + 'render_type' => 'text', 'range' => [ 'from' => 0.0, 'to' => 255.0 @@ -284,6 +337,8 @@ public function getVirtualMultiWebsiteDataProvider(): array [ // phpcs:ignore Magento2.Functions.DiscouragedFunction 'id' => \base64_encode('giftcard/custom_giftcard_amount'), + 'label' => 'Amount in', + 'render_type' => 'giftcardopenamount', 'range' => [ 'from' => 100.0, 'to' => 150.0