Skip to content

Commit e52bc2a

Browse files
committed
Add indexing after creating products + changes due to invalid use of sku as URL Key :-(
1 parent a2e16f3 commit e52bc2a

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239
</entity>
240240
<entity name="ApiSimpleOutOfStock" type="product2">
241241
<data key="name" unique="suffix">Api Simple Out Of Stock Product</data>
242-
<data key="sku" unique="suffix">apisimpleproduct</data>
242+
<data key="sku" unique="suffix">api-simple-product</data>
243243
<data key="urlKey" unique="suffix">api-simple-product</data>
244244
<data key="type_id">simple</data>
245245
<data key="attribute_set_id">4</data>
@@ -251,7 +251,7 @@
251251
</entity>
252252
<entity name="ApiSimpleOne" type="product2">
253253
<data key="name" unique="suffix">Api Simple Product</data>
254-
<data key="sku" unique="suffix">apisimpleproduct</data>
254+
<data key="sku" unique="suffix">api-simple-product</data>
255255
<data key="urlKey" unique="suffix">api-simple-product</data>
256256
<data key="type_id">simple</data>
257257
<data key="attribute_set_id">4</data>
@@ -267,7 +267,7 @@
267267
</entity>
268268
<entity name="ApiSimpleOneHidden" type="product2">
269269
<data key="name" unique="suffix">Api Simple Product</data>
270-
<data key="sku" unique="suffix">apisimpleproduct</data>
270+
<data key="sku" unique="suffix">api-simple-product</data>
271271
<data key="urlKey" unique="suffix">api-simple-product</data>
272272
<data key="type_id">simple</data>
273273
<data key="attribute_set_id">4</data>
@@ -280,7 +280,7 @@
280280
</entity>
281281
<entity name="ApiSimpleTwo" type="product2">
282282
<data key="name" unique="suffix">Api Simple Product Two</data>
283-
<data key="sku" unique="suffix">apisimpleproducttwo</data>
283+
<data key="sku" unique="suffix">api-simple-product-two</data>
284284
<data key="urlKey" unique="suffix">api-simple-product-two</data>
285285
<data key="type_id">simple</data>
286286
<data key="attribute_set_id">4</data>

app/code/Magento/SalesRule/Test/Mftf/Test/CartPriceRuleForConfigurableProductTest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@
7474
<requiredEntity createDataKey="createConfigProduct"/>
7575
<requiredEntity createDataKey="createConfigChildProduct2"/>
7676
</createData>
77+
78+
<wait stepKey="waitBeforeIndexer" time="60"/>
79+
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
80+
7781
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
7882
</before>
7983

@@ -118,13 +122,13 @@
118122
<see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
119123

120124
<!-- Add the first product to the cart -->
121-
<amOnPage url="$$createConfigChildProduct1.sku$$.html" stepKey="goToProductPage1"/>
125+
<amOnPage url="$$createConfigChildProduct1.urlKey$$.html" stepKey="goToProductPage1"/>
122126
<waitForPageLoad stepKey="waitForProductPageLoad1"/>
123127
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addProductToCart1"/>
124128
<waitForPageLoad stepKey="waitForAddToCart1"/>
125129
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
126130
<!-- Add the second product to the cart -->
127-
<amOnPage url="$$createConfigChildProduct2.sku$$.html" stepKey="goToProductPage2"/>
131+
<amOnPage url="$$createConfigChildProduct2.urlKey$$.html" stepKey="goToProductPage2"/>
128132
<waitForPageLoad stepKey="waitForProductPageLoad2"/>
129133
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addProductToCart2"/>
130134
<waitForPageLoad stepKey="waitForAddToCart2"/>

0 commit comments

Comments
 (0)