-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENGCOM-7679: Fix Downloadable product after refund #28413
- Loading branch information
Showing
8 changed files
with
303 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
26 changes: 26 additions & 0 deletions
26
...tf/ActionGroup/StorefrontNotAssertDownloadableProductLinkInCustomerAccountActionGroup.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="StorefrontNotAssertDownloadableProductLinkInCustomerAccountActionGroup"> | ||
<annotations> | ||
<description>Goes to the Storefront Customer Dashboard page. Clicks on 'My Downloadable Products'. Validates that the provided Downloadable Product is present and Downloadable link not exist.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="product"/> | ||
</arguments> | ||
|
||
<amOnPage url="{{StorefrontCustomerDashboardPage.url}}" stepKey="goToMyAccountPage"/> | ||
<click selector="{{StorefrontCustomerSidebarSection.sidebarTab('My Downloadable Products')}}" stepKey="clickDownloadableProducts"/> | ||
<waitForPageLoad stepKey="waitForDownloadableProductsPageLoad"/> | ||
<seeElement selector="{{StorefrontCustomerDownloadableProductsSection.productName(product.name)}}" stepKey="seeStorefrontDownloadableProductsProductName"/> | ||
<dontSeeElement selector="{{StorefrontCustomerDownloadableProductsSection.downloadableLink}}" stepKey="dontSeeStorefrontMyDownloadableProductsLink"/> | ||
|
||
</actionGroup> | ||
</actionGroups> |
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
109 changes: 109 additions & 0 deletions
109
...oadable/Test/Mftf/Test/StorefrontAccountDownloadableProductLinkAfterPartialRefundTest.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="StorefrontAccountDownloadableProductLinkAfterPartialRefundTest"> | ||
<annotations> | ||
<features value="Catalog"/> | ||
<stories value="Customer Account Downloadable Products Link"/> | ||
<title value="My Account Downloadable Product Link after Partially Refunded"/> | ||
<description value="Verify that Downloadable product is not available in My Download Products tab after it has been partially refunded."/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-35198"/> | ||
<group value="Downloadable"/> | ||
</annotations> | ||
|
||
<before> | ||
<magentoCLI stepKey="addDownloadableDomain" command="downloadable:domains:add example.com static.magento.com"/> | ||
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> | ||
|
||
<createData entity="ApiCategory" stepKey="createCategory"/> | ||
<createData entity="ApiSimpleProduct" stepKey="createSimpleProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="ApiDownloadableProduct" stepKey="createDownloadableProduct"/> | ||
<createData entity="downloadableLink1" stepKey="addDownloadableLink1"> | ||
<requiredEntity createDataKey="createDownloadableProduct"/> | ||
</createData> | ||
|
||
<magentoCLI command="indexer:reindex" stepKey="reindex"/> | ||
<magentoCLI command="cache:flush" stepKey="flushCache"/> | ||
|
||
<createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/> | ||
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="signIn"> | ||
<argument name="Customer" value="$$createCustomer$$"/> | ||
</actionGroup> | ||
</before> | ||
|
||
<after> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> | ||
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> | ||
|
||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
<deleteData createDataKey="createDownloadableProduct" stepKey="deleteDownloadableProduct"/> | ||
|
||
<magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/> | ||
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> | ||
<magentoCLI command="indexer:reindex" stepKey="reindex"/> | ||
<magentoCLI command="cache:flush" stepKey="flushCache"/> | ||
</after> | ||
|
||
<actionGroup ref="StorefrontAddSimpleProductToShoppingCartActionGroup" stepKey="addSimpleProductToCart"> | ||
<argument name="product" value="$$createSimpleProduct$$"/> | ||
</actionGroup> | ||
|
||
<amOnPage url="{{StorefrontProductPage.url($$createDownloadableProduct.custom_attributes[url_key]$$)}}" stepKey="OpenStoreFrontProductPage"/> | ||
<waitForPageLoad stepKey="waitForPageToLoad"/> | ||
|
||
<actionGroup ref="StorefrontAddToCartCustomOptionsProductPageActionGroup" stepKey="addToTheCart"> | ||
<argument name="productName" value="$$createDownloadableProduct.name$$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="goToShoppingCartFromMinicart"/> | ||
<click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="clickProceedToCheckout"/> | ||
<waitForPageLoad stepKey="waitForProceedToCheckout"/> | ||
<waitForElementVisible selector="{{CheckoutShippingSection.shipHereButton(UK_Not_Default_Address.street[0])}}" stepKey="waitForShipHereVisible"/> | ||
<click selector="{{CheckoutShippingSection.shipHereButton(UK_Not_Default_Address.street[0])}}" stepKey="clickShipHere"/> | ||
<click selector="{{CheckoutShippingGuestInfoSection.next}}" stepKey="clickNext"/> | ||
<waitForPageLoad stepKey="waitForShipmentPageLoad"/> | ||
<checkOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="selectPaymentSolution"/> | ||
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSectionLoaded"/> | ||
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrderButton"/> | ||
<seeElement selector="{{CheckoutSuccessMainSection.success}}" stepKey="orderIsSuccessfullyPlaced"/> | ||
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> | ||
|
||
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> | ||
|
||
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage"/> | ||
<actionGroup ref="SearchAdminDataGridByKeywordActionGroup" stepKey="searchOrder"> | ||
<argument name="keyword" value="$grabOrderNumber"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/> | ||
|
||
<actionGroup ref="AdminCreateInvoiceActionGroup" stepKey="createCreditMemo"/> | ||
|
||
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder"> | ||
<argument name="orderId" value="{$grabOrderNumber}"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AdminOpenAndFillCreditMemoRefundActionGroup" stepKey="fillCreditMemoRefund"> | ||
<argument name="itemQtyToRefund" value="0"/> | ||
<argument name="rowNumber" value="1"/> | ||
</actionGroup> | ||
|
||
<click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickRefundOffline"/> | ||
<waitForPageLoad stepKey="waitForResultPage"/> | ||
|
||
<actionGroup ref="StorefrontNotAssertDownloadableProductLinkInCustomerAccountActionGroup" stepKey="dontSeeStorefrontMyAccountDownloadableProductsLink"> | ||
<argument name="product" value="$$createDownloadableProduct$$"/> | ||
</actionGroup> | ||
|
||
</test> | ||
</tests> |
Oops, something went wrong.