|
| 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="AdminCreateConfigurableProductWithVideoAssociatedToVariantTest"> |
| 12 | + <annotations> |
| 13 | + <features value="ConfigurableProduct"/> |
| 14 | + <stories value="Add videos for all variant product"/> |
| 15 | + <title value="Admin should be able to add videos for a variant Product"/> |
| 16 | + <description value="Admin should be able to add videos for a Variant Product"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MC-37344"/> |
| 19 | + <group value="ConfigurableProduct"/> |
| 20 | + <skip> |
| 21 | + <issueId value="MC-33903"/> |
| 22 | + </skip> |
| 23 | + </annotations> |
| 24 | + |
| 25 | + <before> |
| 26 | + <createData entity="ProductVideoYoutubeApiKeyConfig" stepKey="setYoutubeApiKeyConfig"/> |
| 27 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 28 | + <createData entity="SimpleSubCategory" stepKey="categoryHandle"/> |
| 29 | + |
| 30 | + <createData entity="SimpleProduct" stepKey="simple1Handle"> |
| 31 | + <requiredEntity createDataKey="categoryHandle"/> |
| 32 | + </createData> |
| 33 | + |
| 34 | + <createData entity="SimpleProduct" stepKey="simple2Handle"> |
| 35 | + <requiredEntity createDataKey="categoryHandle"/> |
| 36 | + </createData> |
| 37 | + |
| 38 | + <createData entity="BaseConfigurableProduct" stepKey="baseConfigProductHandle"> |
| 39 | + <requiredEntity createDataKey="categoryHandle"/> |
| 40 | + </createData> |
| 41 | + <createData entity="productDropDownAttribute" stepKey="productAttributeHandle"/> |
| 42 | + |
| 43 | + <createData entity="productAttributeOption1" stepKey="productAttributeOption1Handle"> |
| 44 | + <requiredEntity createDataKey="productAttributeHandle"/> |
| 45 | + </createData> |
| 46 | + <createData entity="productAttributeOption2" stepKey="productAttributeOption2Handle"> |
| 47 | + <requiredEntity createDataKey="productAttributeHandle"/> |
| 48 | + </createData> |
| 49 | + |
| 50 | + <createData entity="AddToDefaultSet" stepKey="addToAttributeSetHandle"> |
| 51 | + <requiredEntity createDataKey="productAttributeHandle"/> |
| 52 | + </createData> |
| 53 | + |
| 54 | + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getAttributeOption1Handle"> |
| 55 | + <requiredEntity createDataKey="productAttributeHandle"/> |
| 56 | + </getData> |
| 57 | + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getAttributeOption2Handle"> |
| 58 | + <requiredEntity createDataKey="productAttributeHandle"/> |
| 59 | + </getData> |
| 60 | + |
| 61 | + <createData entity="SimpleOne" stepKey="childProductHandle1"> |
| 62 | + <requiredEntity createDataKey="productAttributeHandle"/> |
| 63 | + <requiredEntity createDataKey="getAttributeOption1Handle"/> |
| 64 | + </createData> |
| 65 | + <createData entity="SimpleOne" stepKey="childProductHandle2"> |
| 66 | + <requiredEntity createDataKey="productAttributeHandle"/> |
| 67 | + <requiredEntity createDataKey="getAttributeOption2Handle"/> |
| 68 | + </createData> |
| 69 | + |
| 70 | + <createData entity="ConfigurableProductTwoOptions" stepKey="configProductOptionHandle"> |
| 71 | + <requiredEntity createDataKey="baseConfigProductHandle"/> |
| 72 | + <requiredEntity createDataKey="productAttributeHandle"/> |
| 73 | + <requiredEntity createDataKey="getAttributeOption1Handle"/> |
| 74 | + <requiredEntity createDataKey="getAttributeOption2Handle"/> |
| 75 | + </createData> |
| 76 | + |
| 77 | + <createData entity="ConfigurableProductAddChild" stepKey="configProductHandle1"> |
| 78 | + <requiredEntity createDataKey="baseConfigProductHandle"/> |
| 79 | + <requiredEntity createDataKey="childProductHandle1"/> |
| 80 | + </createData> |
| 81 | + <createData entity="ConfigurableProductAddChild" stepKey="configProductHandle2"> |
| 82 | + <requiredEntity createDataKey="baseConfigProductHandle"/> |
| 83 | + <requiredEntity createDataKey="childProductHandle2"/> |
| 84 | + </createData> |
| 85 | + </before> |
| 86 | + <after> |
| 87 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> |
| 88 | + <createData entity="DefaultProductVideoConfig" stepKey="setYoutubeApiKeyDefaultConfig"/> |
| 89 | + <deleteData createDataKey="simple1Handle" stepKey="deleteSimple1"/> |
| 90 | + <deleteData createDataKey="simple2Handle" stepKey="deleteSimple2"/> |
| 91 | + <deleteData createDataKey="childProductHandle1" stepKey="deleteChild1"/> |
| 92 | + <deleteData createDataKey="childProductHandle2" stepKey="deleteChild2"/> |
| 93 | + <deleteData createDataKey="baseConfigProductHandle" stepKey="deleteConfig"/> |
| 94 | + <deleteData createDataKey="categoryHandle" stepKey="deleteCategory"/> |
| 95 | + <deleteData createDataKey="productAttributeHandle" stepKey="deleteProductAttribute"/> |
| 96 | + |
| 97 | + <!-- Reindex invalidated indices after product attribute has been created/deleted --> |
| 98 | + <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/> |
| 99 | + </after> |
| 100 | + |
| 101 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="productIndexPage"/> |
| 102 | + |
| 103 | + <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProductGrid"> |
| 104 | + <argument name="product" value="$$childProductHandle1$$"/> |
| 105 | + </actionGroup> |
| 106 | + <actionGroup ref="OpenProductForEditByClickingRowXColumnYInProductGridActionGroup" stepKey="openProducForEditByClickingRow1Column2InProductGrid1"/> |
| 107 | + |
| 108 | + <actionGroup ref="AddProductVideoActionGroup" stepKey="addVideoForProduct" /> |
| 109 | + |
| 110 | + <!-- Add image to product --> |
| 111 | + <actionGroup ref="AddProductImageActionGroup" stepKey="addImageForProduct"> |
| 112 | + <argument name="image" value="MagentoLogo"/> |
| 113 | + </actionGroup> |
| 114 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/> |
| 115 | + |
| 116 | + <!-- Assert product image in admin product form --> |
| 117 | + <actionGroup ref="AssertProductImageAdminProductPageActionGroup" stepKey="assertProductImageAdminProductPage"/> |
| 118 | + |
| 119 | + <!-- Assert product in storefront product page --> |
| 120 | + <actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageByCustomAttributeUrlKeyActionGroup" stepKey="AssertProductInStorefrontProductPage"> |
| 121 | + <argument name="product" value="$$baseConfigProductHandle$$"/> |
| 122 | + </actionGroup> |
| 123 | + |
| 124 | + <actionGroup ref="StorefrontSelectSimpleProductOfConfigurableProductPageActionGroup" stepKey="assertSimpleProductIsAccessibleInStorefrontProductPageActionGroup" > |
| 125 | + <argument name="urlKey" value="$$baseConfigProductHandle.custom_attributes[url_key]$$" /> |
| 126 | + <argument name="productAttribute" value="$$productAttributeHandle.default_value$$"/> |
| 127 | + <argument name="productOption" value="$$getAttributeOption1Handle.value$$"/> |
| 128 | + </actionGroup> |
| 129 | + |
| 130 | + <!-- Assert product image in storefront product page --> |
| 131 | + <actionGroup ref="AssertProductImageStorefrontProductPage2ActionGroup" stepKey="assertProductImageStorefrontProductPageActionGroup"> |
| 132 | + <argument name="product" value="$$baseConfigProductHandle$$"/> |
| 133 | + <argument name="image" value="MagentoLogo"/> |
| 134 | + </actionGroup> |
| 135 | + |
| 136 | + <!-- Assert product video in storefront product page --> |
| 137 | + <actionGroup ref="AssertProductVideoStorefrontProductPageActionGroup" stepKey="assertProductVideoStorefrontProductPage"/> |
| 138 | + </test> |
| 139 | +</tests> |
0 commit comments