|
| 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="StorefrontBundleAddToCartFromWidget"> |
| 12 | + <annotations> |
| 13 | + <features value="Bundle"/> |
| 14 | + <stories value="Bundle product details page"/> |
| 15 | + <title value="Customer should be able to add a bundle product to the cart from widget"/> |
| 16 | + <description value="Customer should be able to add a bundle product to the cart from widget"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="AC-10867"/> |
| 19 | + <group value="Bundle"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> |
| 23 | + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> |
| 24 | + </before> |
| 25 | + <after> |
| 26 | + <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteBundleProductBySku"> |
| 27 | + <argument name="sku" value="{{BundleProductWithSlashSku.sku}}"/> |
| 28 | + </actionGroup> |
| 29 | + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> |
| 30 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 31 | + </after> |
| 32 | + |
| 33 | + <!-- Start creating a bundle product --> |
| 34 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goToProductList"/> |
| 35 | + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct"> |
| 36 | + <argument name="product" value="BundleProduct"/> |
| 37 | + </actionGroup> |
| 38 | + <actionGroup ref="FillProductNameAndSkuInProductFormActionGroup" stepKey="fillNameAndSku"> |
| 39 | + <argument name="product" value="BundleProductWithSlashSku"/> |
| 40 | + </actionGroup> |
| 41 | + |
| 42 | + <!-- Add Option One, a "Drop-down" type option --> |
| 43 | + <actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOptionWithOneProduct"> |
| 44 | + <argument name="x" value="0"/> |
| 45 | + <argument name="n" value="1"/> |
| 46 | + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> |
| 47 | + <argument name="prodTwoSku" value=""/> |
| 48 | + <argument name="optionTitle" value="Option One"/> |
| 49 | + <argument name="inputType" value="select"/> |
| 50 | + </actionGroup> |
| 51 | + |
| 52 | + <!-- Save product, edit Homepage CMS page and add products widget --> |
| 53 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/> |
| 54 | + <amOnPage url="{{AdminCmsPageEditPage.url(CmsHomePageContent.page_id)}}" stepKey="navigateToEditCmsHomePage"/> |
| 55 | + <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickContentTab" /> |
| 56 | + <actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="insertWidgetToCmsPageContentActionGroup"> |
| 57 | + <argument name="widgetType" value="Catalog Products List"/> |
| 58 | + </actionGroup> |
| 59 | + <actionGroup ref="AdminFillCatalogProductsListWidgetSkuActionGroup" stepKey="selectProductForListing"> |
| 60 | + <argument name="sku" value="{{BundleProductWithSlashSku.sku}}"/> |
| 61 | + </actionGroup> |
| 62 | + <actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidgetButton2"/> |
| 63 | + <actionGroup ref="SaveCmsPageActionGroup" stepKey="clickSaveButton"/> |
| 64 | + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the page." stepKey="seeSuccess"/> |
| 65 | + |
| 66 | + <!-- Go to storefront homepage and add to cart --> |
| 67 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/> |
| 68 | + <actionGroup ref="StorefrontHoverProductOnCategoryPageActionGroup" stepKey="hoverProduct"/> |
| 69 | + <actionGroup ref="StorefrontClickAddToCartButtonActionGroup" stepKey="addToCart"/> |
| 70 | + <waitForPageLoad stepKey="waitForProductAdded"/> |
| 71 | + <waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="seeSuccessMessage"/> |
| 72 | + </test> |
| 73 | +</tests> |
0 commit comments