Skip to content

Commit 49fbdda

Browse files
committed
B2B-2530: Unskip GraphQL cache tests skipped due to DEVOPS-4924
- Fixed on comments
1 parent 9aa3485 commit 49fbdda

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/PageCache/Cms/BlockCacheTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,10 @@ public function testCacheIsInvalidatedOnBlockUpdate()
116116
[CacheIdCalculator::CACHE_ID_HEADER => $cacheIdOfEnabledBlock]
117117
);
118118

119-
$this->assertNotEmpty($fixtureBlockHitResponse['body']);
120-
121119
//updated block data should be correct on fixture block
122-
$blocks = $fixtureBlockMissResponse['body']['cmsBlocks']['items'];
123-
$this->assertArrayNotHasKey('errors', $fixtureBlockMissResponse['body']);
120+
$this->assertNotEmpty($fixtureBlockHitResponse['body']);
121+
$blocks = $fixtureBlockHitResponse['body']['cmsBlocks']['items'];
122+
$this->assertArrayNotHasKey('errors', $fixtureBlockHitResponse['body']);
124123
$this->assertEquals($fixtureBlockIdentifier, $blocks[0]['identifier']);
125124
$this->assertEquals('CMS Block Title', $blocks[0]['title']);
126125
$this->assertEquals($newBlockContent, $blocks[0]['content']);

dev/tests/api-functional/testsuite/Magento/GraphQl/PageCache/Cms/PageCacheTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ public function testCacheIsInvalidatedOnPageUpdate()
112112
[CacheIdCalculator::CACHE_ID_HEADER => $cacheIdPageBlankResponse]
113113
);
114114

115-
//cache-debug should be a MISS after updating the blank page
115+
//updating the blank page
116116
$pageRepository = Bootstrap::getObjectManager()->get(PageRepository::class);
117117
$newPageContent = 'New page content for blank page.';
118118
$pageBlank->setContent($newPageContent);
119119
$pageRepository->save($pageBlank);
120-
$pageBlankResponseMissAfterUpdate = $this->graphQlQueryWithResponseHeaders($pageBlankQuery);
121-
// Verify we obtain a cache MISS after updating the page blank query
120+
121+
// Verify we obtain a cache MISS on page blank query after updating the page blank
122122
$this->assertCacheMissAndReturnResponse(
123123
$pageBlankQuery,
124124
[CacheIdCalculator::CACHE_ID_HEADER => $cacheIdPageBlankResponse]
@@ -128,16 +128,16 @@ public function testCacheIsInvalidatedOnPageUpdate()
128128
[CacheIdCalculator::CACHE_ID_HEADER => $cacheIdPageBlankResponse]
129129
);
130130

131-
// Verify we obtain a cache Hit after updating the page on page 100 query
131+
// Verify we obtain a cache HIT on page 100 query after updating the page blank
132132
$this->assertCacheHitAndReturnResponse(
133133
$page100Query,
134134
[CacheIdCalculator::CACHE_ID_HEADER => $cacheIdPage100Response]
135135
);
136136

137137
//updated page data should be correct for blank page
138138
$this->assertNotEmpty($pageBlankResponseHitAfterUpdate['body']);
139-
$pageData = $pageBlankResponseMissAfterUpdate['body']['cmsPage'];
140-
$this->assertArrayNotHasKey('errors', $pageBlankResponseMissAfterUpdate['body']);
139+
$pageData = $pageBlankResponseHitAfterUpdate['body']['cmsPage'];
140+
$this->assertArrayNotHasKey('errors', $pageBlankResponseHitAfterUpdate['body']);
141141
$this->assertEquals('Cms Page Design Blank', $pageData['title']);
142142
$this->assertEquals($newPageContent, $pageData['content']);
143143
}

0 commit comments

Comments
 (0)