Skip to content

Commit 4000a0b

Browse files
author
Joan He
committed
MC-19451: Adapt functional tests to Elasticsearch
1 parent 30f997f commit 4000a0b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
<createData entity="_defaultProduct" stepKey="createSimpleProduct">
2424
<requiredEntity createDataKey="createCategory"/>
2525
</createData>
26+
27+
<!-- Perform reindex and flush cache -->
28+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
29+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
2630
</before>
2731
<after>
2832
<deleteData stepKey="deleteProduct" createDataKey="createSimpleProduct"/>
@@ -87,6 +91,10 @@
8791
<createData entity="_defaultProduct" stepKey="createSimpleProduct">
8892
<requiredEntity createDataKey="createCategory"/>
8993
</createData>
94+
95+
<!-- Perform reindex and flush cache -->
96+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
97+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
9098
</before>
9199
<after>
92100
<deleteData stepKey="deleteProduct" createDataKey="createSimpleProduct"/>
@@ -309,6 +317,10 @@
309317
<createData entity="VirtualProduct" stepKey="createVirtualProduct">
310318
<requiredEntity createDataKey="createCategory"/>
311319
</createData>
320+
321+
<!-- Perform reindex and flush cache -->
322+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
323+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
312324
</before>
313325
<after>
314326
<deleteData stepKey="deleteProduct" createDataKey="createVirtualProduct"/>
@@ -339,6 +351,10 @@
339351
<argument name="product" value="_defaultProduct"/>
340352
<argument name="category" value="$$createCategory$$"/>
341353
</actionGroup>
354+
355+
<!-- Perform reindex and flush cache -->
356+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
357+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
342358
</before>
343359
<after>
344360
<deleteData stepKey="deleteCategory" createDataKey="createCategory"/>
@@ -378,6 +394,10 @@
378394
<createData entity="downloadableLink1" stepKey="addDownloadableLink1">
379395
<requiredEntity createDataKey="createProduct"/>
380396
</createData>
397+
398+
<!-- Perform reindex and flush cache -->
399+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
400+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
381401
</before>
382402
<after>
383403
<deleteData stepKey="deleteProduct" createDataKey="createProduct"/>
@@ -408,6 +428,10 @@
408428
<requiredEntity createDataKey="createProduct"/>
409429
<requiredEntity createDataKey="simple1"/>
410430
</createData>
431+
432+
<!-- Perform reindex and flush cache -->
433+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
434+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
411435
</before>
412436
<after>
413437
<deleteData stepKey="deleteProduct" createDataKey="createProduct"/>
@@ -453,6 +477,10 @@
453477
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
454478
<amOnPage url="{{AdminProductEditPage.url($$createBundleProduct.id$$)}}" stepKey="goToProductEditPage"/>
455479
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
480+
481+
<!-- Perform reindex and flush cache -->
482+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
483+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
456484
</before>
457485
<after>
458486
<deleteData stepKey="deleteBundleProduct" createDataKey="createBundleProduct"/>
@@ -515,6 +543,10 @@
515543
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
516544
<amOnPage url="{{AdminProductEditPage.url($$createBundleProduct.id$$)}}" stepKey="goToProductEditPage"/>
517545
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
546+
547+
<!-- Perform reindex and flush cache -->
548+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
549+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
518550
</before>
519551
<after>
520552
<deleteData stepKey="deleteBundleProduct" createDataKey="createBundleProduct"/>
@@ -604,6 +636,10 @@
604636
<requiredEntity createDataKey="createConfigProduct"/>
605637
<requiredEntity createDataKey="createConfigChildProduct1"/>
606638
</createData>
639+
640+
<!-- Perform reindex and flush cache -->
641+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
642+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
607643
</before>
608644
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToFrontPage"/>
609645
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefront">

0 commit comments

Comments
 (0)