|
8 | 8 |
|
9 | 9 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
10 | 10 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
|
11 |
| - <test name="StorefrontSortingByPriceForConfigurableProductWithCatalogRuleAppliedTest"> |
| 11 | + <test name="StorefrontCheckSortingByPriceForConfigurableWithCatalogRuleAppliedTest"> |
12 | 12 | <annotations>
|
13 | 13 | <features value="ConfigurableProduct"/>
|
14 |
| - <stories value="View soting by price in storefront"/> |
15 |
| - <title value="Sorting by price for Configurable with Catalog Rule applied"/> |
| 14 | + <stories value="Check sorting by price on storefront"/> |
| 15 | + <title value="Check sorting by price for Configurable product with Catalog Rule applied"/> |
16 | 16 | <description value="Sort by price should be correct if the apply Catalog Rule to child product of configurable product"/>
|
17 | 17 | <severity value="CRITICAL"/>
|
18 |
| - <testCaseId value="MAGETWO-69988"/> |
19 |
| - <group value="configurable_product"/> |
| 18 | + <testCaseId value="MC-11926"/> |
| 19 | + <useCaseId value="MAGETWO-66688"/> |
| 20 | + <group value="catalog"/> |
| 21 | + <group value="catalogRule"/> |
| 22 | + <group value="configurableProduct"/> |
20 | 23 | </annotations>
|
21 | 24 | <before>
|
22 | 25 | <createData entity="ApiCategory" stepKey="createCategory"/>
|
|
28 | 31 | <requiredEntity createDataKey="createCategory"/>
|
29 | 32 | <field key="price">10.00</field>
|
30 | 33 | </createData>
|
31 |
| - <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> |
| 34 | + <createData entity="ApiConfigurableProduct" stepKey="createConfigurableProduct"> |
32 | 35 | <requiredEntity createDataKey="createCategory"/>
|
33 | 36 | </createData>
|
34 |
| - <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> |
35 |
| - <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> |
36 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 37 | + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigurableProductAttribute"/> |
| 38 | + <createData entity="productAttributeOption1" stepKey="createConfigurableProductAttributeOption1"> |
| 39 | + <requiredEntity createDataKey="createConfigurableProductAttribute"/> |
37 | 40 | </createData>
|
38 |
| - <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> |
39 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 41 | + <createData entity="productAttributeOption2" stepKey="createConfigurableProductAttributeOption2"> |
| 42 | + <requiredEntity createDataKey="createConfigurableProductAttribute"/> |
40 | 43 | </createData>
|
41 |
| - <createData entity="productAttributeOption3" stepKey="createConfigProductAttributeOption3"> |
42 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 44 | + <createData entity="productAttributeOption3" stepKey="createConfigurableProductAttributeOption3"> |
| 45 | + <requiredEntity createDataKey="createConfigurableProductAttribute"/> |
43 | 46 | </createData>
|
44 | 47 | <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
|
45 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 48 | + <requiredEntity createDataKey="createConfigurableProductAttribute"/> |
46 | 49 | </createData>
|
47 | 50 | <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
|
48 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 51 | + <requiredEntity createDataKey="createConfigurableProductAttribute"/> |
49 | 52 | </getData>
|
50 | 53 | <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2">
|
51 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 54 | + <requiredEntity createDataKey="createConfigurableProductAttribute"/> |
52 | 55 | </getData>
|
53 | 56 | <getData entity="ProductAttributeOptionGetter" index="3" stepKey="getConfigAttributeOption3">
|
54 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 57 | + <requiredEntity createDataKey="createConfigurableProductAttribute"/> |
55 | 58 | </getData>
|
56 | 59 | <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1">
|
57 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 60 | + <requiredEntity createDataKey="createConfigurableProductAttribute"/> |
58 | 61 | <requiredEntity createDataKey="getConfigAttributeOption1"/>
|
59 | 62 | <field key="price">15.00</field>
|
60 | 63 | </createData>
|
61 | 64 | <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2">
|
62 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 65 | + <requiredEntity createDataKey="createConfigurableProductAttribute"/> |
63 | 66 | <requiredEntity createDataKey="getConfigAttributeOption2"/>
|
64 | 67 | <field key="price">20.00</field>
|
65 | 68 | </createData>
|
66 | 69 | <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct3">
|
67 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 70 | + <requiredEntity createDataKey="createConfigurableProductAttribute"/> |
68 | 71 | <requiredEntity createDataKey="getConfigAttributeOption3"/>
|
69 | 72 | <field key="price">25.00</field>
|
70 | 73 | </createData>
|
71 |
| - <createData entity="ConfigurableProductThreeOptions" stepKey="createConfigProductOption"> |
72 |
| - <requiredEntity createDataKey="createConfigProduct"/> |
73 |
| - <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 74 | + <createData entity="ConfigurableProductThreeOptions" stepKey="createConfigurableProductOption"> |
| 75 | + <requiredEntity createDataKey="createConfigurableProduct"/> |
| 76 | + <requiredEntity createDataKey="createConfigurableProductAttribute"/> |
74 | 77 | <requiredEntity createDataKey="getConfigAttributeOption1"/>
|
75 | 78 | <requiredEntity createDataKey="getConfigAttributeOption2"/>
|
76 | 79 | <requiredEntity createDataKey="getConfigAttributeOption3"/>
|
77 | 80 | </createData>
|
78 |
| - <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> |
79 |
| - <requiredEntity createDataKey="createConfigProduct"/> |
| 81 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigurableProductAddChild1"> |
| 82 | + <requiredEntity createDataKey="createConfigurableProduct"/> |
80 | 83 | <requiredEntity createDataKey="createConfigChildProduct1"/>
|
81 | 84 | </createData>
|
82 |
| - <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> |
83 |
| - <requiredEntity createDataKey="createConfigProduct"/> |
| 85 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigurableProductAddChild2"> |
| 86 | + <requiredEntity createDataKey="createConfigurableProduct"/> |
84 | 87 | <requiredEntity createDataKey="createConfigChildProduct2"/>
|
85 | 88 | </createData>
|
86 |
| - <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild3"> |
87 |
| - <requiredEntity createDataKey="createConfigProduct"/> |
| 89 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigurableProductAddChild3"> |
| 90 | + <requiredEntity createDataKey="createConfigurableProduct"/> |
88 | 91 | <requiredEntity createDataKey="createConfigChildProduct3"/>
|
89 | 92 | </createData>
|
90 | 93 | <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
|
|
95 | 98 | <actionGroup ref="ChangeUseForPromoRuleConditionsProductAttributeActionGroup" stepKey="changeUseForPromoRuleConditionsProductAttributeToYes">
|
96 | 99 | <argument name="option" value="Yes"/>
|
97 | 100 | </actionGroup>
|
98 |
| - <magentoCLI command="indexer:reindex" stepKey="reindex1"/> |
99 |
| - <magentoCLI command="cache:flush" stepKey="flushCache1"/> |
| 101 | + <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllRules"/> |
| 102 | + <magentoCLI command="indexer:reindex" stepKey="reindexIndices"/> |
100 | 103 | </before>
|
101 | 104 |
|
102 | 105 | <after>
|
|
106 | 109 | <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/>
|
107 | 110 | <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
|
108 | 111 | <deleteData createDataKey="createConfigChildProduct3" stepKey="deleteConfigChildProduct3"/>
|
109 |
| - <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> |
110 |
| - <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> |
| 112 | + <deleteData createDataKey="createConfigurableProduct" stepKey="deleteConfigProduct"/> |
| 113 | + <deleteData createDataKey="createConfigurableProductAttribute" stepKey="deleteConfigProductAttribute"/> |
111 | 114 |
|
112 | 115 | <!--SKU Product Attribute is disable for Promo Rule Conditions-->
|
113 | 116 | <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="navigateToSkuProductAttribute">
|
|
116 | 119 | <actionGroup ref="ChangeUseForPromoRuleConditionsProductAttributeActionGroup" stepKey="changeUseForPromoRuleConditionsProductAttributeToNo">
|
117 | 120 | <argument name="option" value="No"/>
|
118 | 121 | </actionGroup>
|
| 122 | + <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllRules"/> |
119 | 123 | <actionGroup ref="logout" stepKey="logoutFromAdmin"/>
|
| 124 | + |
| 125 | + <!-- TODO: Remove this and change to CliRunReindexUsingCronJobsActionGroup after MC-29943 delivered--> |
| 126 | + <!-- Need reindex because creating new product attributes break some indices and this may affect other tests in testsuite --> |
| 127 | + <magentoCLI command="indexer:reindex" stepKey="reindexIndices"/> |
120 | 128 | </after>
|
121 | 129 |
|
122 | 130 | <!--Open category with products and Sort by price desc-->
|
|
127 | 135 | <argument name="sortBy" value="price"/>
|
128 | 136 | <argument name="sort" value="desc"/>
|
129 | 137 | </actionGroup>
|
130 |
| - <see selector="{{StorefrontCategoryMainSection.lineProductName('1')}}" userInput="$$createConfigProduct.name$$" stepKey="seeConfigurableProduct"/> |
| 138 | + <see selector="{{StorefrontCategoryMainSection.lineProductName('1')}}" userInput="$$createConfigurableProduct.name$$" stepKey="seeConfigurableProduct"/> |
131 | 139 | <see selector="{{StorefrontCategoryMainSection.lineProductName('2')}}" userInput="$$createSimpleProduct2.name$$" stepKey="seeSimpleProductTwo"/>
|
132 | 140 | <see selector="{{StorefrontCategoryMainSection.lineProductName('3')}}" userInput="$$createSimpleProduct.name$$" stepKey="seeSimpleProduct"/>
|
133 | 141 |
|
134 | 142 | <!--Create and apply catalog price rule-->
|
135 |
| - <actionGroup ref="NewCatalogPriceRuleByUIWithConditionIsSKUActionGroup" stepKey="createCatalogPriceRule"> |
136 |
| - <argument name="catalogRule" value="CatalogRuleByPercentWith96Amount" /> |
137 |
| - <argument name="productSku" value="$$createConfigChildProduct3.sku$$" /> |
| 143 | + <actionGroup ref="AdminOpenNewCatalogPriceRuleFormPageActionGroup" stepKey="startCreatingCatalogPriceRule"/> |
| 144 | + <actionGroup ref="AdminCatalogPriceRuleFillMainInfoActionGroup" stepKey="fillMainInfoForCatalogPriceRule"> |
| 145 | + <argument name="groups" value="'NOT LOGGED IN'"/> |
138 | 146 | </actionGroup>
|
139 |
| - <actionGroup ref="SelectNotLoggedInCustomerGroupActionGroup" stepKey="selectNotLoggedInCustomerGroup"/> |
140 |
| - <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="clickSaveAndApplyRules"/> |
141 |
| - |
142 |
| - <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
143 |
| - <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 147 | + <actionGroup ref="AdminCatalogPriceRuleAddSkuConditionActionGroup" stepKey="addProductSkuBasedCondition"> |
| 148 | + <argument name="productSku" value="$createConfigChildProduct3.sku$"/> |
| 149 | + </actionGroup> |
| 150 | + <actionGroup ref="AdminCatalogPriceRuleFillActionsActionGroup" stepKey="fillActionsForCatalogPriceRule"> |
| 151 | + <argument name="apply" value="{{CatalogRuleByPercentWith96Amount.simple_action}}"/> |
| 152 | + <argument name="discountAmount" value="{{CatalogRuleByPercentWith96Amount.discount_amount}}"/> |
| 153 | + </actionGroup> |
| 154 | + <actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="saveAndApplyCatalogPriceRule"/> |
| 155 | + <actionGroup ref="AdminReindexAndFlushCache" stepKey="reindexAndFlushCache"/> |
144 | 156 |
|
145 | 157 | <!--Reopen category with products and Sort by price desc-->
|
146 | 158 | <actionGroup ref="GoToStorefrontCategoryPageByParametersActionGroup" stepKey="goToStorefrontCategoryPage2">
|
|
152 | 164 | </actionGroup>
|
153 | 165 | <see selector="{{StorefrontCategoryMainSection.lineProductName('1')}}" userInput="$$createSimpleProduct2.name$$" stepKey="seeSimpleProductTwo2"/>
|
154 | 166 | <see selector="{{StorefrontCategoryMainSection.lineProductName('2')}}" userInput="$$createSimpleProduct.name$$" stepKey="seeSimpleProduct2"/>
|
155 |
| - <see selector="{{StorefrontCategoryMainSection.lineProductName('3')}}" userInput="$$createConfigProduct.name$$" stepKey="seeConfigurableProduct2"/> |
156 |
| - |
157 |
| - <!-- Delete the rule --> |
158 |
| - <amOnPage url="{{CatalogRulePage.url}}" stepKey="goToPriceRulePage"/> |
159 |
| - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule"> |
160 |
| - <argument name="name" value="{{CatalogRuleByPercentWith96Amount.name}}"/> |
161 |
| - <argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/> |
162 |
| - </actionGroup> |
| 167 | + <see selector="{{StorefrontCategoryMainSection.lineProductName('3')}}" userInput="$$createConfigurableProduct.name$$" stepKey="seeConfigurableProduct2"/> |
163 | 168 | </test>
|
164 | 169 | </tests>
|
0 commit comments