|
| 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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminAddDefaultVideoBundleProductTest" extends="AdminAddDefaultVideoDownloadableProductTest"> |
| 12 | + <before> |
| 13 | + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> |
| 14 | + <createData entity="SimpleProduct2" stepKey="simpleProduct2"/> |
| 15 | + </before> |
| 16 | + <after> |
| 17 | + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> |
| 18 | + <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> |
| 19 | + </after> |
| 20 | + |
| 21 | + <!-- Create a bundle product --> |
| 22 | + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage" after="waitForProductIndexPageLoad"> |
| 23 | + <argument name="product" value="BundleProduct"/> |
| 24 | + </actionGroup> |
| 25 | + <actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillMainProductForm" after="goToCreateProductPage"> |
| 26 | + <argument name="product" value="BundleProduct"/> |
| 27 | + </actionGroup> |
| 28 | + |
| 29 | + <!-- Add two bundle items --> |
| 30 | + <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="step0" after="anchor2"/> |
| 31 | + <click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="step1" after="step0"/> |
| 32 | + <waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="step2" after="step1"/> |
| 33 | + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="step3" after="step2"/> |
| 34 | + <selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="step4" after="step3"/> |
| 35 | + <waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="step5" after="step4"/> |
| 36 | + <click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="step6" after="step5"/> |
| 37 | + <waitForPageLoad stepKey="step7" after="step6"/> |
| 38 | + <actionGroup ref="filterProductGridBySku" stepKey="step8" after="step7"> |
| 39 | + <argument name="product" value="$$simpleProduct1$$"/> |
| 40 | + </actionGroup> |
| 41 | + <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="step9" after="step8"/> |
| 42 | + <actionGroup ref="filterProductGridBySku" stepKey="step10" after="step9"> |
| 43 | + <argument name="product" value="$$simpleProduct2$$"/> |
| 44 | + </actionGroup> |
| 45 | + <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="step11" after="step10"/> |
| 46 | + <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="step12" after="step11"/> |
| 47 | + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="step13" after="step12"/> |
| 48 | + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="step14" after="step13"/> |
| 49 | + |
| 50 | + <!-- Assert product in storefront product page --> |
| 51 | + <actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage" after="anchor5"> |
| 52 | + <argument name="product" value="BundleProduct"/> |
| 53 | + </actionGroup> |
| 54 | + </test> |
| 55 | +</tests> |
0 commit comments