File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
dev/tests/integration/testsuite/Magento/Framework/Search Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -537,9 +537,15 @@ public function testAdvancedSearchCompositeProductWithOutOfStockOption()
537
537
->create (Collection::class)
538
538
->setAttributeFilter ($ attribute ->getId ());
539
539
540
+ $ visibility = [
541
+ \Magento \Catalog \Model \Product \Visibility::VISIBILITY_IN_SEARCH ,
542
+ \Magento \Catalog \Model \Product \Visibility::VISIBILITY_BOTH ,
543
+ ];
544
+
540
545
$ firstOption = $ selectOptions ->getFirstItem ();
541
546
$ firstOptionId = $ firstOption ->getId ();
542
547
$ this ->requestBuilder ->bind ('test_configurable ' , $ firstOptionId );
548
+ $ this ->requestBuilder ->bind ('visibility ' , $ visibility );
543
549
$ this ->requestBuilder ->setRequestName ('filter_out_of_stock_child ' );
544
550
545
551
$ queryResponse = $ this ->executeQuery ();
@@ -548,6 +554,7 @@ public function testAdvancedSearchCompositeProductWithOutOfStockOption()
548
554
$ secondOption = $ selectOptions ->getLastItem ();
549
555
$ secondOptionId = $ secondOption ->getId ();
550
556
$ this ->requestBuilder ->bind ('test_configurable ' , $ secondOptionId );
557
+ $ this ->requestBuilder ->bind ('visibility ' , $ visibility );
551
558
$ this ->requestBuilder ->setRequestName ('filter_out_of_stock_child ' );
552
559
553
560
$ queryResponse = $ this ->executeQuery ();
Original file line number Diff line number Diff line change 394
394
<queries >
395
395
<query xsi : type =" boolQuery" name =" filter_out_of_stock_child" boost =" 1" >
396
396
<queryReference clause =" must" ref =" test_configurable" />
397
+ <queryReference clause =" must" ref =" visibility" />
397
398
</query >
398
399
<query xsi : type =" filteredQuery" name =" test_configurable" >
399
400
<filterReference clause =" must" ref =" test_configurable_filter" />
400
401
</query >
402
+ <query xsi : type =" filteredQuery" name =" visibility" >
403
+ <filterReference clause =" must" ref =" visibility_filter" />
404
+ </query >
401
405
</queries >
402
406
<filters >
403
407
<filter xsi : type =" termFilter" name =" test_configurable_filter" field =" test_configurable" value =" $test_configurable$" />
408
+ <filter xsi : type =" termFilter" name =" visibility_filter" field =" visibility" value =" $visibility$" />
404
409
</filters >
405
410
<aggregations />
406
411
<from >0</from >
You can’t perform that action at this time.
0 commit comments