Skip to content

Commit 2fc983f

Browse files
committed
MAGE-1134: fix tests
1 parent 8594cd2 commit 2fc983f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Test/Integration/Page/MultiStorePagesTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MultiStorePagesTest extends MultiStoreTestCase
3232
/** @var CollectionFactory */
3333
private $pageCollectionFactory;
3434

35-
const ABOUT_US_PAGE_ID = 7;
35+
const HOME_PAGE_ID = 2;
3636

3737
public function setUp():void
3838
{
@@ -70,16 +70,16 @@ public function testMultiStorePageIndices()
7070
$fixtureSecondStore = $this->storeRepository->get('fixture_second_store');
7171

7272
try {
73-
$aboutUsPage = $this->loadPage(self::ABOUT_US_PAGE_ID);
73+
$homePage = $this->loadPage(self::HOME_PAGE_ID);
7474
} catch (\Exception $e) {
7575
$this->markTestIncomplete('Page could not be found.');
7676
}
7777

7878
// Setting the page only for default store
79-
$aboutUsPage->setStores([$defaultStore->getId()]);
80-
$this->pageRepository->save($aboutUsPage);
79+
$homePage->setStores([$defaultStore->getId()]);
80+
$this->pageRepository->save($homePage);
8181

82-
$this->pagesIndexer->execute([self::ABOUT_US_PAGE_ID]);
82+
$this->pagesIndexer->execute([self::HOME_PAGE_ID]);
8383
$this->algoliaHelper->waitLastTask();
8484

8585
$this->assertNbOfRecordsPerStore(
@@ -129,7 +129,7 @@ protected function setupStore(StoreInterface $store, bool $enableInstantSearch =
129129
{
130130
// Exclude 2 pages on second store
131131
$excludedPages = $store->getCode() === 'fixture_second_store' ?
132-
[['attribute' => 'no-route'], ['attribute' => 'home']]:
132+
[['attribute' => 'no-route'], ['attribute' => 'enable-cookies']]:
133133
[];
134134

135135
$this->setConfig(
@@ -144,8 +144,8 @@ protected function setupStore(StoreInterface $store, bool $enableInstantSearch =
144144
public function tearDown(): void
145145
{
146146
// Restore page in case DB is not cleaned up
147-
$aboutUsPage = $this->loadPage(self::ABOUT_US_PAGE_ID);
148-
$this->resetPage($aboutUsPage);
147+
$homePage = $this->loadPage(self::HOME_PAGE_ID);
148+
$this->resetPage($homePage);
149149

150150
parent::tearDown();
151151
}

0 commit comments

Comments
 (0)