|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +/** |
| 4 | + * Copyright 2025 Adobe |
| 5 | + * All Rights Reserved. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontVerifyProductReorderWithCustomOptionTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Reorder product with custom option"/> |
| 15 | + <title value="Customer should be able to reorder product with a selected custom checkbox option"/> |
| 16 | + <description value="Verifies that a customer can reorder a product where one custom checkbox option was selected during the original purchase."/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="AC-13538"/> |
| 19 | + <group value="Catalog"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Precondition: Create customer --> |
| 23 | + <createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/> |
| 24 | + </before> |
| 25 | + <after> |
| 26 | + <!-- Customer logout --> |
| 27 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> |
| 28 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 29 | + </after> |
| 30 | + <!-- Step1&2&3: Create product with checkbox two custom options --> |
| 31 | + <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> |
| 32 | + <updateData entity="productWithCheckboxCustomOptions" createDataKey="createSimpleProduct" stepKey="addCustomOptions"> |
| 33 | + <requiredEntity createDataKey="createSimpleProduct"/> |
| 34 | + </updateData> |
| 35 | + <!-- Step4: Login as a customer --> |
| 36 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
| 37 | + <argument name="Customer" value="$createCustomer$"/> |
| 38 | + </actionGroup> |
| 39 | + <!-- Step5: Open Product Page--> |
| 40 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage"> |
| 41 | + <argument name="product" value="$createSimpleProduct$"/> |
| 42 | + </actionGroup> |
| 43 | + <!-- Add Product to Cart from product detail page --> |
| 44 | + <click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/> |
| 45 | + <!-- see custom option validation message --> |
| 46 | + <waitForText userInput="This is a required field." stepKey="seeRequiredField"/> |
| 47 | + <!-- Choose checkbox value1 --> |
| 48 | + <actionGroup ref="StorefrontAddSimpleProductCustomOptionCheckBoxActionGroup" stepKey="selectCustomOptionCheckBoxForValue1"/> |
| 49 | + <!-- Step6: place order --> |
| 50 | + <actionGroup ref="StorefrontProductPageAddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart"/> |
| 51 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="clickToProceedToCheckout"/> |
| 52 | + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/> |
| 53 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/> |
| 54 | + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/> |
| 55 | + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/> |
| 56 | + <!-- Step7: Go to order page --> |
| 57 | + <actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToMyAccountPage"/> |
| 58 | + <actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToSidebarMenu"> |
| 59 | + <argument name="menu" value="My Orders"/> |
| 60 | + </actionGroup> |
| 61 | + <!-- Clicking View Order from My Orders Grid --> |
| 62 | + <actionGroup ref="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup" stepKey="clickViewOrder"/> |
| 63 | + <!-- Clicking on Reorder link from Order Details Tab --> |
| 64 | + <click selector="{{StorefrontCustomerOrderViewSection.reorder}}" stepKey="clickReorder"/> |
| 65 | + <actionGroup ref="StorefrontCheckoutCheckProductActionGroup" stepKey="checkProduct"> |
| 66 | + <argument name="product" value="$$createSimpleProduct$$" /> |
| 67 | + <argument name="cartItem" value="SimpleCartItem"/> |
| 68 | + </actionGroup> |
| 69 | + </test> |
| 70 | +</tests> |
0 commit comments