Skip to content

Commit f05364e

Browse files
committed
ACP2E-1239: Shifting of the PDP main image
- Added the test coverage.
1 parent fca9024 commit f05364e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryOptionsTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public function testGetOptionsJson()
108108
['Magento_Catalog', 'gallery/thumbmargin', '5'],
109109
['Magento_Catalog', 'gallery/transition/effect', 'slide'],
110110
['Magento_Catalog', 'gallery/transition/duration', '500'],
111+
['Magento_Catalog', 'product_image_white_borders', '1'],
111112
];
112113

113114
$imageAttributesMap = [
@@ -144,6 +145,7 @@ public function testGetOptionsJson()
144145
$this->assertSame(200, $decodedJson['width']);
145146
$this->assertSame(300, $decodedJson['thumbheight']);
146147
$this->assertSame(400, $decodedJson['thumbwidth']);
148+
$this->assertSame(1, $decodedJson['whiteBorders']);
147149
}
148150

149151
public function testGetFSOptionsJson()
@@ -159,7 +161,8 @@ public function testGetFSOptionsJson()
159161
['Magento_Catalog', 'gallery/fullscreen/navtype', 'thumbs'],
160162
['Magento_Catalog', 'gallery/fullscreen/thumbmargin', '10'],
161163
['Magento_Catalog', 'gallery/fullscreen/transition/effect', 'dissolve'],
162-
['Magento_Catalog', 'gallery/fullscreen/transition/duration', '300']
164+
['Magento_Catalog', 'gallery/fullscreen/transition/duration', '300'],
165+
['Magento_Catalog', 'product_image_white_borders', '1'],
163166
];
164167

165168
$this->configView->expects($this->any())
@@ -183,6 +186,7 @@ public function testGetFSOptionsJson()
183186
$this->assertSame('thumbs', $decodedJson['navtype']);
184187
$this->assertSame('dissolve', $decodedJson['transition']);
185188
$this->assertSame(300, $decodedJson['transitionduration']);
189+
$this->assertSame(1, $decodedJson['whiteBorders']);
186190
}
187191

188192
public function testGetOptionsJsonOptionals()

dev/tests/js/jasmine/tests/lib/mage/gallery/gallery.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ define([
3333
thumbwidth: 88,
3434
transition: 'slide',
3535
transitionduration: 500,
36-
width: 700
36+
width: 700,
37+
whiteBorders: 0
3738
},
3839
fullscreen: {
3940
arrows: true,
@@ -99,6 +100,7 @@ define([
99100
expect(gallery.settings.data).toBeDefined();
100101
expect(gallery.settings.api).toBeDefined();
101102
expect(gallery.settings.activeBreakpoint).toEqual({});
103+
expect(gallery.config.options.height).toEqual(element.height());
102104

103105
$.fn.data = originSpy;
104106
});

0 commit comments

Comments
 (0)