|
| 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="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminCheckingBundleSKUsCreationTest"> |
| 12 | + <annotations> |
| 13 | + <title value="Checking Bundle SKUs creation"/> |
| 14 | + <stories value="Checking Bundle SKUs creation"/> |
| 15 | + <description value="Checking Bundle product SKUs in items ordered page"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-3898"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 21 | + <!-- create category, four simple products --> |
| 22 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 23 | + <createData entity="SimpleProduct" stepKey="simpleProduct1"> |
| 24 | + <requiredEntity createDataKey="createCategory"/> |
| 25 | + <field key="sku">sp1</field> |
| 26 | + </createData> |
| 27 | + <createData entity="SimpleProduct" stepKey="simpleProduct2"> |
| 28 | + <requiredEntity createDataKey="createCategory"/> |
| 29 | + <field key="sku">sp2</field> |
| 30 | + </createData> |
| 31 | + <createData entity="SimpleProduct" stepKey="simpleProduct3"> |
| 32 | + <requiredEntity createDataKey="createCategory"/> |
| 33 | + <field key="sku">sp3</field> |
| 34 | + </createData> |
| 35 | + <createData entity="SimpleProduct" stepKey="simpleProduct4"> |
| 36 | + <requiredEntity createDataKey="createCategory"/> |
| 37 | + <field key="sku">sp4</field> |
| 38 | + </createData> |
| 39 | + <createData entity="ApiBundleProductPriceViewRange" stepKey="bundleProduct"> |
| 40 | + <field key="sku">bp1</field> |
| 41 | + <requiredEntity createDataKey="createCategory"/> |
| 42 | + </createData> |
| 43 | + <createData entity="CheckboxOption" stepKey="bundleOption1"> |
| 44 | + <requiredEntity createDataKey="bundleProduct"/> |
| 45 | + </createData> |
| 46 | + <createData entity="CheckboxOption" stepKey="bundleOption2"> |
| 47 | + <requiredEntity createDataKey="bundleProduct"/> |
| 48 | + </createData> |
| 49 | + <createData entity="ApiBundleLink" stepKey="linkProduct2ToOption1"> |
| 50 | + <requiredEntity createDataKey="bundleProduct"/> |
| 51 | + <requiredEntity createDataKey="bundleOption1"/> |
| 52 | + <requiredEntity createDataKey="simpleProduct2"/> |
| 53 | + </createData> |
| 54 | + <createData entity="ApiBundleLink" stepKey="linkProduct4ToOption1"> |
| 55 | + <requiredEntity createDataKey="bundleProduct"/> |
| 56 | + <requiredEntity createDataKey="bundleOption1"/> |
| 57 | + <requiredEntity createDataKey="simpleProduct4"/> |
| 58 | + </createData> |
| 59 | + <createData entity="ApiBundleLink" stepKey="linkProduct1ToOption2"> |
| 60 | + <requiredEntity createDataKey="bundleProduct"/> |
| 61 | + <requiredEntity createDataKey="bundleOption2"/> |
| 62 | + <requiredEntity createDataKey="simpleProduct1"/> |
| 63 | + </createData> |
| 64 | + <createData entity="ApiBundleLink" stepKey="linkProduct3ToOption2"> |
| 65 | + <requiredEntity createDataKey="bundleProduct"/> |
| 66 | + <requiredEntity createDataKey="bundleOption2"/> |
| 67 | + <requiredEntity createDataKey="simpleProduct3"/> |
| 68 | + </createData> |
| 69 | + <!-- Create customer --> |
| 70 | + <createData entity="Simple_US_Customer_NY" stepKey="customer"/> |
| 71 | + <magentoCron stepKey="runCronIndex" groups="index"/> |
| 72 | + </before> |
| 73 | + <after> |
| 74 | + <!-- delete created data --> |
| 75 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 76 | + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> |
| 77 | + <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> |
| 78 | + <deleteData createDataKey="simpleProduct3" stepKey="deleteSimpleProduct3"/> |
| 79 | + <deleteData createDataKey="simpleProduct4" stepKey="deleteSimpleProduct4"/> |
| 80 | + <deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/> |
| 81 | + <deleteData createDataKey="customer" stepKey="deleteCustomer"/> |
| 82 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 83 | + </after> |
| 84 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefront"> |
| 85 | + <argument name="Customer" value="$customer$"/> |
| 86 | + </actionGroup> |
| 87 | + <!-- Navigate to product on storeFront --> |
| 88 | + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="goToProductPage"> |
| 89 | + <argument name="productUrlKey" value="$bundleProduct.custom_attributes[url_key]$"/> |
| 90 | + </actionGroup> |
| 91 | + <!--Click "Customize and Add to Cart" button--> |
| 92 | + <click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomize"/> |
| 93 | + <click stepKey="selectFourthProduct" selector="{{StorefrontBundledSection.productCheckbox('1','2')}}"/> |
| 94 | + <click stepKey="selectFirstProduct" selector="{{StorefrontBundledSection.productCheckbox('2','1')}}"/> |
| 95 | + <click selector="{{StorefrontBundledSection.addToCartConfigured}}" stepKey="clickAddToCart"/> |
| 96 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="navigateToCheckoutPage"/> |
| 97 | + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/> |
| 98 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/> |
| 99 | + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/> |
| 100 | + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlacePurchaseOrder"/> |
| 101 | + <see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/> |
| 102 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> |
| 103 | + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder"> |
| 104 | + <argument name="orderId" value="{$grabOrderNumber}"/> |
| 105 | + </actionGroup> |
| 106 | + <grabTextFrom selector="{{AdminOrderItemsOrderedSection.productSkuColumn}}" stepKey="grabSku"/> |
| 107 | + <assertEquals stepKey="assertSKU"> |
| 108 | + <actualResult type="variable">$grabSku</actualResult> |
| 109 | + <expectedResult type="string"><![CDATA[SKU: bp1-sp4-sp1]]></expectedResult> |
| 110 | + </assertEquals> |
| 111 | + </test> |
| 112 | +</tests> |
0 commit comments