|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="StorefrontAccountDownloadableProductLinkAfterPartialRefundTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Catalog"/> |
| 13 | + <stories value="Customer Account Downloadable Products Link"/> |
| 14 | + <title value="My Account Downloadable Product Link after Partially Refunded"/> |
| 15 | + <description value="Verify that Downloadable product is not available in My Download Products tab after it has been partially refunded."/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="MC-35198"/> |
| 18 | + <group value="Downloadable"/> |
| 19 | + </annotations> |
| 20 | + |
| 21 | + <before> |
| 22 | + <magentoCLI stepKey="addDownloadableDomain" command="downloadable:domains:add example.com static.magento.com"/> |
| 23 | + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> |
| 24 | + |
| 25 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 26 | + <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct"> |
| 27 | + <requiredEntity createDataKey="createCategory"/> |
| 28 | + </createData> |
| 29 | + <createData entity="ApiDownloadableProduct" stepKey="createDownloadableProduct"/> |
| 30 | + <createData entity="downloadableLink1" stepKey="addDownloadableLink1"> |
| 31 | + <requiredEntity createDataKey="createDownloadableProduct"/> |
| 32 | + </createData> |
| 33 | + |
| 34 | + <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
| 35 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 36 | + |
| 37 | + <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/> |
| 38 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="signIn"> |
| 39 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 40 | + </actionGroup> |
| 41 | + </before> |
| 42 | + |
| 43 | + <after> |
| 44 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> |
| 45 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> |
| 46 | + |
| 47 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 48 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 49 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 50 | + <deleteData createDataKey="createDownloadableProduct" stepKey="deleteDownloadableProduct"/> |
| 51 | + |
| 52 | + <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/> |
| 53 | + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> |
| 54 | + <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
| 55 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 56 | + </after> |
| 57 | + |
| 58 | + <actionGroup ref="StorefrontAddSimpleProductToShoppingCartActionGroup" stepKey="addSimpleProductToCart"> |
| 59 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 60 | + </actionGroup> |
| 61 | + |
| 62 | + <amOnPage url="{{StorefrontProductPage.url($$createDownloadableProduct.custom_attributes[url_key]$$)}}" stepKey="OpenStoreFrontProductPage"/> |
| 63 | + <waitForPageLoad stepKey="waitForPageToLoad"/> |
| 64 | + |
| 65 | + <actionGroup ref="StorefrontAddToCartCustomOptionsProductPageActionGroup" stepKey="addToTheCart"> |
| 66 | + <argument name="productName" value="$$createDownloadableProduct.name$$"/> |
| 67 | + </actionGroup> |
| 68 | + |
| 69 | + <actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="goToShoppingCartFromMinicart"/> |
| 70 | + <click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="clickProceedToCheckout"/> |
| 71 | + <waitForPageLoad stepKey="waitForProceedToCheckout"/> |
| 72 | + <waitForElementVisible selector="{{CheckoutShippingSection.shipHereButton(UK_Not_Default_Address.street[0])}}" stepKey="waitForShipHereVisible"/> |
| 73 | + <click selector="{{CheckoutShippingSection.shipHereButton(UK_Not_Default_Address.street[0])}}" stepKey="clickShipHere"/> |
| 74 | + <click selector="{{CheckoutShippingGuestInfoSection.next}}" stepKey="clickNext"/> |
| 75 | + <waitForPageLoad stepKey="waitForShipmentPageLoad"/> |
| 76 | + <checkOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="selectPaymentSolution"/> |
| 77 | + <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSectionLoaded"/> |
| 78 | + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrderButton"/> |
| 79 | + <seeElement selector="{{CheckoutSuccessMainSection.success}}" stepKey="orderIsSuccessfullyPlaced"/> |
| 80 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> |
| 81 | + |
| 82 | + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> |
| 83 | + |
| 84 | + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage"/> |
| 85 | + <actionGroup ref="SearchAdminDataGridByKeywordActionGroup" stepKey="searchOrder"> |
| 86 | + <argument name="keyword" value="$grabOrderNumber"/> |
| 87 | + </actionGroup> |
| 88 | + <actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/> |
| 89 | + |
| 90 | + <actionGroup ref="AdminCreateInvoiceActionGroup" stepKey="createCreditMemo"/> |
| 91 | + |
| 92 | + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder"> |
| 93 | + <argument name="orderId" value="{$grabOrderNumber}"/> |
| 94 | + </actionGroup> |
| 95 | + |
| 96 | + <actionGroup ref="AdminOpenAndFillCreditMemoRefundActionGroup" stepKey="fillCreditMemoRefund"> |
| 97 | + <argument name="itemQtyToRefund" value="0"/> |
| 98 | + <argument name="rowNumber" value="1"/> |
| 99 | + </actionGroup> |
| 100 | + |
| 101 | + <click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickRefundOffline"/> |
| 102 | + <waitForPageLoad stepKey="waitForResultPage"/> |
| 103 | + |
| 104 | + <actionGroup ref="StorefrontNotAssertDownloadableProductLinkInCustomerAccountActionGroup" stepKey="dontSeeStorefrontMyAccountDownloadableProductsLink"> |
| 105 | + <argument name="product" value="$$createDownloadableProduct$$"/> |
| 106 | + </actionGroup> |
| 107 | + |
| 108 | + </test> |
| 109 | +</tests> |
0 commit comments