Skip to content

Commit 7153056

Browse files
author
Hwashiang Yu
committed
MC-17807: Store name rendering in customer section
- Resolved static and integration test failures
1 parent 0afa829 commit 7153056

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/optgroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ define([
222222
ko.utils.setTextContent(option, allBindings.get('optionsCaption'));
223223
ko.selectExtensions.writeValue(option, undefined);
224224
} else if (typeof arrayEntry[optionsValue] === 'undefined') { // empty value === optgroup
225-
if (arrayEntry['__disableTmpl']) {
225+
if (arrayEntry.__disableTmpl) {
226226
option = '<optgroup label="' + arrayEntry[optionsText] + '"></optgroup>';
227227
} else {
228228
option = utils.template(optgroupTmpl, {

dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Edit/FormTest.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,32 +234,35 @@ public static function getEntityStoresDataProvider()
234234
null,
235235
['entity_id' => 3, 'store_ids' => [1]],
236236
[
237-
['label' => 'Main Website', 'value' => []],
237+
['label' => 'Main Website', 'value' => [], '__disableTmpl' => true],
238238
[
239239
'label' => '    Main Website Store',
240-
'value' => [['label' => '    Default Store View', 'value' => 1]]
240+
'value' => [['label' => '    Default Store View', 'value' => 1]],
241+
'__disableTmpl' => true
241242
]
242243
],
243244
],
244245
[
245246
['entity_id' => 2, 'name' => 'product2', 'url_key' => 'product2', 'store_ids' => [1]],
246247
null,
247248
[
248-
['label' => 'Main Website', 'value' => []],
249+
['label' => 'Main Website', 'value' => [], '__disableTmpl' => true],
249250
[
250251
'label' => '    Main Website Store',
251-
'value' => [['label' => '    Default Store View', 'value' => 1]]
252+
'value' => [['label' => '    Default Store View', 'value' => 1]],
253+
'__disableTmpl' => true
252254
]
253255
]
254256
],
255257
[
256258
['entity_id' => 2, 'name' => 'product2', 'url_key' => 'product2', 'store_ids' => [1]],
257259
['entity_id' => 3, 'name' => 'product3', 'url_key' => 'product3', 'store_ids' => [1]],
258260
[
259-
['label' => 'Main Website', 'value' => []],
261+
['label' => 'Main Website', 'value' => [], '__disableTmpl' => true],
260262
[
261263
'label' => '    Main Website Store',
262-
'value' => [['label' => '    Default Store View', 'value' => 1]]
264+
'value' => [['label' => '    Default Store View', 'value' => 1]],
265+
'__disableTmpl' => true
263266
]
264267
]
265268
]

dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Cms/Page/Edit/FormTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ public function testGetEntityStores()
7878
$form = $this->_getFormInstance($args);
7979

8080
$expectedStores = [
81-
['label' => 'Main Website', 'value' => []],
81+
['label' => 'Main Website', 'value' => [], '__disableTmpl' => true],
8282
[
8383
'label' => '    Main Website Store',
84-
'value' => [['label' => '    Default Store View', 'value' => 1]]
84+
'value' => [['label' => '    Default Store View', 'value' => 1]],
85+
'__disableTmpl' => true
8586
],
8687
];
8788
$this->assertEquals($expectedStores, $form->getElement('store_id')->getValues());

0 commit comments

Comments
 (0)