From 0aaf2f646d4c8024b037aa272904fa33f1577acd Mon Sep 17 00:00:00 2001 From: Mohamed-Asar <56036656+Mohamed-Asar@users.noreply.github.com> Date: Mon, 27 Jul 2026 12:39:47 +0000 Subject: [PATCH 1/3] Downloadable product config exposed in GraphQL storeConfig --- .../DownloadableGraphQl/etc/graphql/di.xml | 12 ++++++++++++ .../DownloadableGraphQl/etc/schema.graphqls | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/app/code/Magento/DownloadableGraphQl/etc/graphql/di.xml b/app/code/Magento/DownloadableGraphQl/etc/graphql/di.xml index d75da6a3ff092..d8eaae8348a53 100644 --- a/app/code/Magento/DownloadableGraphQl/etc/graphql/di.xml +++ b/app/code/Magento/DownloadableGraphQl/etc/graphql/di.xml @@ -74,4 +74,16 @@ + + + + + catalog/downloadable/disable_guest_checkout + catalog/downloadable/shareable + catalog/downloadable/links_target_new_window + catalog/downloadable/samples_title + catalog/downloadable/links_title + + + diff --git a/app/code/Magento/DownloadableGraphQl/etc/schema.graphqls b/app/code/Magento/DownloadableGraphQl/etc/schema.graphqls index 4b1b9c400706f..bb51ac212400b 100644 --- a/app/code/Magento/DownloadableGraphQl/etc/schema.graphqls +++ b/app/code/Magento/DownloadableGraphQl/etc/schema.graphqls @@ -87,3 +87,18 @@ type DownloadableWishlistItem implements WishlistItemInterface @doc(description: links_v2: [DownloadableProductLinks] @doc(description: "An array containing information about the selected links.") @resolver(class: "\\Magento\\DownloadableGraphQl\\Model\\Wishlist\\ItemLinks") samples: [DownloadableProductSamples] @doc(description: "An array containing information about the selected samples.") @resolver(class: "Magento\\DownloadableGraphQl\\Resolver\\Product\\Samples") } + +# Downloadable system configuration for headless / PWA storefronts +# (Stores > Config > Catalog > Downloadable Product Options) +extend type StoreConfig { + downloadable_disable_guest_checkout: Boolean + @doc(description: "catalog/downloadable/disable_guest_checkout: when true, guest checkout is blocked if the cart contains downloadable products.") + downloadable_shareable: Boolean + @doc(description: "catalog/downloadable/shareable: default shareable flag used when a link is set to Use config.") + downloadable_links_target_new_window: Boolean + @doc(description: "catalog/downloadable/links_target_new_window: open sample/download links in a new window.") + downloadable_samples_title: String + @doc(description: "catalog/downloadable/samples_title: default title for the samples section.") + downloadable_links_title: String + @doc(description: "catalog/downloadable/links_title: default title for the links section.") +} From 775ef88d247d441ed61cb90459c05eecb2a0fe06 Mon Sep 17 00:00:00 2001 From: Mohamed-Asar <56036656+Mohamed-Asar@users.noreply.github.com> Date: Mon, 27 Jul 2026 12:51:46 +0000 Subject: [PATCH 2/3] MFTF coverage for guest checkout disabled with downloadable product --- ...koutDisabledForDownloadableProductTest.xml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontGuestCheckoutDisabledForDownloadableProductTest.xml diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontGuestCheckoutDisabledForDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontGuestCheckoutDisabledForDownloadableProductTest.xml new file mode 100644 index 0000000000000..fa01bd820cab4 --- /dev/null +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontGuestCheckoutDisabledForDownloadableProductTest.xml @@ -0,0 +1,55 @@ + + + + + + + + + + <description value="With global guest checkout enabled and catalog/downloadable/disable_guest_checkout enabled, guest cannot checkout downloadable cart and sees Sign In modal."/> + <severity value="MAJOR"/> + <group value="Downloadable"/> + </annotations> + <before> + <!-- Allow guest checkout globally so only downloadable-specific config is under test --> + <createData entity="EnableAllowGuestCheckout" stepKey="enableGlobalGuestCheckout"/> + <magentoCLI command="config:set {{DisableGuestCheckoutWithDownloadableItems.path}} {{DisableGuestCheckoutWithDownloadableItems.value}}" stepKey="disableGuestCheckoutWithDownloadableItems"/> + <magentoCLI stepKey="addDownloadableDomain" command="downloadable:domains:add example.com static.magento.com"/> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="DownloadableProductWithOneLink" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + </before> + <after> + <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/> + <deleteData stepKey="deleteProduct" createDataKey="createProduct"/> + <deleteData stepKey="deleteCategory" createDataKey="createCategory"/> + </after> + + <!-- Step 1: Open downloadable product PDP as guest --> + <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="amOnStorefrontProductPage"/> + <waitForPageLoad stepKey="waitForProductPageLoad"/> + + <!-- Step 2: Add downloadable product to cart --> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart"> + <argument name="product" value="$$createProduct$$"/> + <argument name="productCount" value="1"/> + </actionGroup> + + <!-- Step 3: Proceed to checkout from mini cart --> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> + + <!-- Step 4: Sign In modal is shown instead of guest checkout --> + <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.email}}" stepKey="assertEmailFieldIsPresent"/> + <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.password}}" stepKey="assertPasswordFieldIsPresent"/> + <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="assertCreateAnAccountButtonIsPresent"/> + <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.forgotYourPassword}}" stepKey="assertForgotYourPasswordLinkIsPresent"/> + </test> +</tests> From 53e2447fe404ffea6c1debfcb891b584b5a94c2e Mon Sep 17 00:00:00 2001 From: Mohamed-Asar <56036656+Mohamed-Asar@users.noreply.github.com> Date: Mon, 27 Jul 2026 12:53:50 +0000 Subject: [PATCH 3/3] Revert "MFTF coverage for guest checkout disabled with downloadable product" This reverts commit 775ef88d247d441ed61cb90459c05eecb2a0fe06. --- ...koutDisabledForDownloadableProductTest.xml | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontGuestCheckoutDisabledForDownloadableProductTest.xml diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontGuestCheckoutDisabledForDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontGuestCheckoutDisabledForDownloadableProductTest.xml deleted file mode 100644 index fa01bd820cab4..0000000000000 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontGuestCheckoutDisabledForDownloadableProductTest.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/** - * Copyright 2026 Adobe - * All Rights Reserved. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontGuestCheckoutDisabledForDownloadableProductTest"> - <annotations> - <features value="Downloadable"/> - <stories value="Guest Checkout with Downloadable Products"/> - <title value="Sign In modal is shown when guest checkout is disabled for downloadable products"/> - <description value="With global guest checkout enabled and catalog/downloadable/disable_guest_checkout enabled, guest cannot checkout downloadable cart and sees Sign In modal."/> - <severity value="MAJOR"/> - <group value="Downloadable"/> - </annotations> - <before> - <!-- Allow guest checkout globally so only downloadable-specific config is under test --> - <createData entity="EnableAllowGuestCheckout" stepKey="enableGlobalGuestCheckout"/> - <magentoCLI command="config:set {{DisableGuestCheckoutWithDownloadableItems.path}} {{DisableGuestCheckoutWithDownloadableItems.value}}" stepKey="disableGuestCheckoutWithDownloadableItems"/> - <magentoCLI stepKey="addDownloadableDomain" command="downloadable:domains:add example.com static.magento.com"/> - <createData entity="_defaultCategory" stepKey="createCategory"/> - <createData entity="DownloadableProductWithOneLink" stepKey="createProduct"> - <requiredEntity createDataKey="createCategory"/> - </createData> - </before> - <after> - <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/> - <deleteData stepKey="deleteProduct" createDataKey="createProduct"/> - <deleteData stepKey="deleteCategory" createDataKey="createCategory"/> - </after> - - <!-- Step 1: Open downloadable product PDP as guest --> - <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="amOnStorefrontProductPage"/> - <waitForPageLoad stepKey="waitForProductPageLoad"/> - - <!-- Step 2: Add downloadable product to cart --> - <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart"> - <argument name="product" value="$$createProduct$$"/> - <argument name="productCount" value="1"/> - </actionGroup> - - <!-- Step 3: Proceed to checkout from mini cart --> - <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> - - <!-- Step 4: Sign In modal is shown instead of guest checkout --> - <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.email}}" stepKey="assertEmailFieldIsPresent"/> - <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.password}}" stepKey="assertPasswordFieldIsPresent"/> - <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="assertCreateAnAccountButtonIsPresent"/> - <seeElement selector="{{StorefrontCustomerSignInPopupFormSection.forgotYourPassword}}" stepKey="assertForgotYourPasswordLinkIsPresent"/> - </test> -</tests>