|
| 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 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitle"> |
| 12 | + <annotations> |
| 13 | + <group value="Catalog"/> |
| 14 | + <title value="Admin should be able to see the full title of the selected custom option value in the order"/> |
| 15 | + <description value="Admin should be able to see the full title of the selected custom option value in the order"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="MC-3043"/> |
| 18 | + <group value="skip"/> |
| 19 | + <!-- Skip due to MQE-1128 --> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!--Create Simple Product with Custom Options--> |
| 23 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 24 | + <createData entity="_defaultProduct" stepKey="createProduct"> |
| 25 | + <requiredEntity createDataKey="createCategory"/> |
| 26 | + <field key="price">17</field> |
| 27 | + </createData> |
| 28 | + <updateData createDataKey="createProduct" entity="productWithOptions2" stepKey="updateProductWithOptions"/> |
| 29 | + |
| 30 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 31 | + </before> |
| 32 | + <after> |
| 33 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 34 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 35 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 36 | + </after> |
| 37 | + |
| 38 | + <!-- Login Customer Storefront --> |
| 39 | + |
| 40 | + <amOnPage url="{{StorefrontCustomerSignInPage.url}}" stepKey="amOnSignInPage"/> |
| 41 | + <fillField userInput="$$createCustomer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="fillEmail"/> |
| 42 | + <fillField userInput="$$createCustomer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}" stepKey="fillPassword"/> |
| 43 | + <click selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="clickSignInAccountButton"/> |
| 44 | + |
| 45 | + <!-- Checking the correctness of displayed prices for user parameters --> |
| 46 | + |
| 47 | + <amOnPage url="{{StorefrontHomePage.url}}$$createProduct.custom_attributes[url_key]$$.html" stepKey="amOnProductPage"/> |
| 48 | + <seeElement selector="{{StorefrontProductInfoMainSection.productAttributeOptionsDropDown(ProductOptionDropDownWithLongValuesTitle.title, ProductOptionValueDropdownLongTitle1.price)}}" stepKey="checkDropDownProductOption"/> |
| 49 | + |
| 50 | + <!-- Adding items to the checkout --> |
| 51 | + |
| 52 | + <selectOption userInput="{{ProductOptionValueDropdownLongTitle1.price}}" selector="{{StorefrontProductInfoMainSection.productOptionSelect(ProductOptionDropDownWithLongValuesTitle.title)}}" stepKey="seeProductOptionDropDown"/> |
| 53 | + <grabTextFrom selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="finalProductPrice"/> |
| 54 | + |
| 55 | + <actionGroup ref="StorefrontAddToCartCustomOptionsProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> |
| 56 | + <argument name="productName" value="$$createProduct.name$$"/> |
| 57 | + </actionGroup> |
| 58 | + |
| 59 | + <!-- Checking the correctness of displayed custom options for user parameters on checkout --> |
| 60 | + |
| 61 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart" /> |
| 62 | + |
| 63 | + <conditionalClick selector="{{CheckoutPaymentSection.cartItemsArea}}" dependentSelector="{{CheckoutPaymentSection.cartItemsArea}}" visible="true" stepKey="exposeMiniCart"/> |
| 64 | + |
| 65 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskForCartItem"/> |
| 66 | + <waitForElement selector="{{CheckoutPaymentSection.cartItemsAreaActive}}" time="30" stepKey="waitForCartItemsAreaActive"/> |
| 67 | + |
| 68 | + <see selector="{{CheckoutPaymentSection.cartItems}}" userInput="$$createProduct.name$$" stepKey="seeProductInCart"/> |
| 69 | + |
| 70 | + <conditionalClick selector="{{CheckoutPaymentSection.ProductOptionsByProductItemName($$createProduct.name$$)}}" dependentSelector="{{CheckoutPaymentSection.ProductOptionsActiveByProductItemName($$createProduct.name$$)}}" visible="false" stepKey="exposeProductOptions"/> |
| 71 | + |
| 72 | + <see selector="{{CheckoutPaymentSection.ProductOptionsActiveByProductItemName($$createProduct.name$$)}}" userInput="{{ProductOptionValueDropdownLongTitle1.title}}" stepKey="seeProductOptionValueDropdown1Input1"/> |
| 73 | + |
| 74 | + <click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/> |
| 75 | + |
| 76 | + <!-- Place Order --> |
| 77 | + |
| 78 | + <waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/> |
| 79 | + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/> |
| 80 | + |
| 81 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> |
| 82 | + |
| 83 | + <!-- Login to Admin and open Order --> |
| 84 | + |
| 85 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> |
| 86 | + |
| 87 | + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage"/> |
| 88 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappearOnOrdersPage"/> |
| 89 | + <fillField selector="{{AdminOrdersGridSection.search}}" userInput="{$grabOrderNumber}" stepKey="fillOrderNum"/> |
| 90 | + <click selector="{{AdminOrdersGridSection.submitSearch}}" stepKey="submitSearchOrderNum"/> |
| 91 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappearOnSearch"/> |
| 92 | + <click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/> |
| 93 | + |
| 94 | + <!-- Checking the correctness of displayed custom options for user parameters on Order --> |
| 95 | + |
| 96 | + <dontSee selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionValueDropdownLongTitle1.title}}" stepKey="dontSeeAdminOrderProductOptionValueDropdown1"/> |
| 97 | + <grabTextFrom selector="{{AdminOrderItemsOrderedSection.productNameOptions}} dd" stepKey="productOptionValueText"/> |
| 98 | + <assertEquals stepKey="checkProductOptionValue"> |
| 99 | + <actualResult type="variable">productOptionValueText</actualResult> |
| 100 | + <expectedResult type="string">Optisfvdklvfnkljvnfdklpvnfdjklfdvnjkvfdkjnvfdjkfvndj111 ...</expectedResult> |
| 101 | + </assertEquals> |
| 102 | + <moveMouseOver selector="{{AdminOrderItemsOrderedSection.productNameOptions}} dd" stepKey="hoverProduct"/> |
| 103 | + <waitForElementVisible selector="{{AdminOrderItemsOrderedSection.productNameOptions}} dd:nth-child(2)" stepKey="waitForCustomOptionValueFullName"/> |
| 104 | + <see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionValueDropdownLongTitle1.title}}" stepKey="seeAdminOrderProductOptionValueDropdown1"/> |
| 105 | + </test> |
| 106 | +</tests> |
0 commit comments