|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +/************************************************************************ |
| 4 | + * |
| 5 | + * Copyright 2023 Adobe |
| 6 | + * All Rights Reserved. |
| 7 | + * |
| 8 | + * NOTICE: All information contained herein is, and remains |
| 9 | + * the property of Adobe and its suppliers, if any. The intellectual |
| 10 | + * and technical concepts contained herein are proprietary to Adobe |
| 11 | + * and its suppliers and are protected by all applicable intellectual |
| 12 | + * property laws, including trade secret and copyright laws. |
| 13 | + * Dissemination of this information or reproduction of this material |
| 14 | + * is strictly forbidden unless prior written permission is obtained |
| 15 | + * from Adobe. |
| 16 | + * *********************************************************************** |
| 17 | + */ |
| 18 | +--> |
| 19 | + |
| 20 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 21 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 22 | + <test name="StorefrontBundleAddToCartFromWidget"> |
| 23 | + <annotations> |
| 24 | + <features value="Bundle"/> |
| 25 | + <stories value="Bundle product details page"/> |
| 26 | + <title value="Customer should be able to add a bundle product to the cart from widget"/> |
| 27 | + <description value="Customer should be able to add a bundle product to the cart from widget"/> |
| 28 | + <severity value="CRITICAL"/> |
| 29 | + <testCaseId value="AC-10867"/> |
| 30 | + <useCaseId value="ACP2E-2615"/> |
| 31 | + <group value="WYSIWYGDisabled"/> |
| 32 | + <group value="Bundle"/> |
| 33 | + </annotations> |
| 34 | + <before> |
| 35 | + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> |
| 36 | + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> |
| 37 | + </before> |
| 38 | + <after> |
| 39 | + <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteBundleProductBySku"> |
| 40 | + <argument name="sku" value="{{BundleProductWithSlashSku.sku}}"/> |
| 41 | + </actionGroup> |
| 42 | + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> |
| 43 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 44 | + </after> |
| 45 | + |
| 46 | + <!-- Start creating a bundle product --> |
| 47 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goToProductList"/> |
| 48 | + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct"> |
| 49 | + <argument name="product" value="BundleProduct"/> |
| 50 | + </actionGroup> |
| 51 | + <actionGroup ref="FillProductNameAndSkuInProductFormActionGroup" stepKey="fillNameAndSku"> |
| 52 | + <argument name="product" value="BundleProductWithSlashSku"/> |
| 53 | + </actionGroup> |
| 54 | + |
| 55 | + <!-- Add Option One, a "Drop-down" type option --> |
| 56 | + <actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOptionWithOneProduct"> |
| 57 | + <argument name="x" value="0"/> |
| 58 | + <argument name="n" value="1"/> |
| 59 | + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> |
| 60 | + <argument name="prodTwoSku" value=""/> |
| 61 | + <argument name="optionTitle" value="Option One"/> |
| 62 | + <argument name="inputType" value="select"/> |
| 63 | + </actionGroup> |
| 64 | + |
| 65 | + <!-- Save product, edit Homepage CMS page and add products widget --> |
| 66 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/> |
| 67 | + <amOnPage url="{{AdminCmsPageEditPage.url(CmsHomePageContent.page_id)}}" stepKey="navigateToEditCmsHomePage"/> |
| 68 | + <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickContentTab" /> |
| 69 | + <actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="insertWidgetToCmsPageContentActionGroup"> |
| 70 | + <argument name="widgetType" value="Catalog Products List"/> |
| 71 | + </actionGroup> |
| 72 | + <actionGroup ref="AdminFillCatalogProductsListWidgetSkuActionGroup" stepKey="selectProductForListing"> |
| 73 | + <argument name="sku" value="{{BundleProductWithSlashSku.sku}}"/> |
| 74 | + </actionGroup> |
| 75 | + <actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidgetButton2"/> |
| 76 | + <actionGroup ref="SaveCmsPageActionGroup" stepKey="clickSaveButton"/> |
| 77 | + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the page." stepKey="seeSuccess"/> |
| 78 | + |
| 79 | + <!-- Go to storefront homepage and add to cart --> |
| 80 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/> |
| 81 | + <actionGroup ref="StorefrontHoverProductOnCategoryPageActionGroup" stepKey="hoverProduct"/> |
| 82 | + <actionGroup ref="StorefrontClickAddToCartButtonActionGroup" stepKey="addToCart"/> |
| 83 | + <waitForPageLoad stepKey="waitForProductAdded"/> |
| 84 | + <waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="seeSuccessMessage"/> |
| 85 | + </test> |
| 86 | +</tests> |
0 commit comments