Skip to content

Commit 9593bd6

Browse files
committed
ACP2E-783: [Cloud] Mistyped search term does not result in accurate Search suggestions/corrections
1 parent af2a436 commit 9593bd6

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

dev/tests/integration/testsuite/Magento/AdvancedSearch/Model/SuggestedQueriesTest.php

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77

88
namespace Magento\AdvancedSearch\Model;
99

10+
use Magento\Catalog\Test\Fixture\Product as ProductFixture;
1011
use Magento\Search\Model\Query;
12+
use Magento\Store\Model\ScopeInterface;
13+
use Magento\TestFramework\Fixture\Config as FixtureConfig;
14+
use Magento\TestFramework\Fixture\DataFixture;
15+
use Magento\TestFramework\Fixture\DbIsolation;
1116
use Magento\TestFramework\Helper\Bootstrap;
1217
use PHPUnit\Framework\TestCase;
1318

@@ -24,14 +29,18 @@ protected function setUp(): void
2429
->create(SuggestedQueries::class);
2530
}
2631

27-
/**
28-
* @magentoDbIsolation disabled
29-
* @magentoDataFixture Magento\Catalog\Test\Fixture\Product with:{"name":"fresh arugula salad"}
30-
* @magentoDataFixture Magento/CatalogSearch/_files/full_reindex.php
31-
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix suggested_queries_test
32-
* @magentoConfigFixture current_store catalog/search/search_suggestion_enabled 1
33-
* @magentoConfigFixture current_store catalog/search/search_suggestion_count 8
34-
*/
32+
#[
33+
DbIsolation(false),
34+
FixtureConfig(
35+
'catalog/search/elasticsearch_index_prefix',
36+
'suggested_queries_test',
37+
ScopeInterface::SCOPE_STORE
38+
),
39+
FixtureConfig(SuggestedQueriesInterface::SEARCH_SUGGESTION_ENABLED, 1, ScopeInterface::SCOPE_STORE),
40+
FixtureConfig(SuggestedQueriesInterface::SEARCH_SUGGESTION_COUNT, 8, ScopeInterface::SCOPE_STORE),
41+
DataFixture(ProductFixture::class, ['name' => 'fresh arugula salad']),
42+
DataFixture('Magento/CatalogSearch/_files/full_reindex.php'),
43+
]
3544
public function testGetItems(): void
3645
{
3746
$query = Bootstrap::getObjectManager()

0 commit comments

Comments
 (0)