Skip to content

Commit 5d3db70

Browse files
committed
B2B-2677: [MediaGallery]Implement data caching for GraphQL results on resolver level
- Add 'update video description' scenario
1 parent 867358b commit 5d3db70

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ResolverCache/MediaGalleryTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,18 @@ function (ProductInterface $product) use ($galleryManagement) {
223223
},
224224
true
225225
],
226+
'update video description' => [
227+
function (ProductInterface $product) use ($galleryManagement) {
228+
$mediaEntry = $product->getMediaGalleryEntries()[0];
229+
$mediaEntry
230+
->getExtensionAttributes()
231+
->getVideoContent()
232+
->setVideoDescription('Something different');
233+
234+
$galleryManagement->update($product->getSku(), $mediaEntry);
235+
},
236+
true
237+
],
226238
'update product name' => [
227239
function (ProductInterface $product) use ($productRepository) {
228240
$product->setName('new name');

0 commit comments

Comments
 (0)