|
| 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="AdminRemoveDefaultVideoGroupedProductTest" extends="AdminRemoveDefaultVideoDownloadableProductTest"> |
| 12 | + <annotations> |
| 13 | + <group value="GroupedProduct"/> |
| 14 | + </annotations> |
| 15 | + <before> |
| 16 | + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> |
| 17 | + <createData entity="SimpleProduct2" stepKey="simpleProduct2"/> |
| 18 | + </before> |
| 19 | + <after> |
| 20 | + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> |
| 21 | + <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> |
| 22 | + </after> |
| 23 | + |
| 24 | + <!-- Create a grouped product --> |
| 25 | + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage" after="waitForProductIndexPageLoad"> |
| 26 | + <argument name="product" value="GroupedProduct"/> |
| 27 | + </actionGroup> |
| 28 | + <actionGroup ref="fillGroupedProductForm" stepKey="fillMainProductForm" after="goToCreateProductPage"> |
| 29 | + <argument name="product" value="GroupedProduct"/> |
| 30 | + </actionGroup> |
| 31 | + |
| 32 | + <!-- Add two simple products to grouped product --> |
| 33 | + <scrollTo selector="{{AdminProductFormGroupedProductsSection.toggleGroupedProduct}}" x="0" y="-100" stepKey="step0" after="anchor2"/> |
| 34 | + <conditionalClick selector="{{AdminProductFormGroupedProductsSection.toggleGroupedProduct}}" dependentSelector="{{AdminProductFormGroupedProductsSection.addProductsToGroup}}" visible="false" stepKey="step1" after="step0"/> |
| 35 | + <click selector="body" stepKey="step2" after="step1"/> |
| 36 | + <click selector="{{AdminProductFormGroupedProductsSection.addProductsToGroup}}" stepKey="step3" after="step2"/> |
| 37 | + <waitForElementVisible selector="{{AdminAddProductsToGroupPanel.filters}}" stepKey="step4" after="step3"/> |
| 38 | + <actionGroup ref="filterProductGridBySku" stepKey="step5" after="step4"> |
| 39 | + <argument name="product" value="$$simpleProduct1$$"/> |
| 40 | + </actionGroup> |
| 41 | + <checkOption selector="{{AdminAddProductsToGroupPanel.firstCheckbox}}" stepKey="step6" after="step5"/> |
| 42 | + <actionGroup ref="filterProductGridBySku" stepKey="step7" after="step6"> |
| 43 | + <argument name="product" value="$$simpleProduct2$$"/> |
| 44 | + </actionGroup> |
| 45 | + <checkOption selector="{{AdminAddProductsToGroupPanel.firstCheckbox}}" stepKey="step8" after="step7"/> |
| 46 | + <click selector="{{AdminAddProductsToGroupPanel.addSelectedProducts}}" stepKey="step9" after="step8"/> |
| 47 | + |
| 48 | + <!-- Assert product in storefront product page --> |
| 49 | + <actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage" after="anchor11"> |
| 50 | + <argument name="product" value="GroupedProduct"/> |
| 51 | + </actionGroup> |
| 52 | + </test> |
| 53 | +</tests> |
0 commit comments