Skip to content

Commit 89c00bd

Browse files
committed
MAGETWO-93522: Custom customer attributes don't show in admin unless they're configured to show on frontend
1 parent f2e6fdd commit 89c00bd

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,16 +1087,15 @@ public function testGetDataWithVisibleAttributesWithAccountEdit()
10871087

10881088
$meta = $dataProvider->getMeta();
10891089
$this->assertNotEmpty($meta);
1090-
$this->assertEquals($this->getExpectationForVisibleAttributes(false), $meta);
1090+
$this->assertEquals($this->getExpectationForVisibleAttributes(), $meta);
10911091
}
10921092

10931093
/**
10941094
* Retrieve all customer variations of attributes with all variations of visibility
10951095
*
1096-
* @param bool $isRegistration
10971096
* @return array
10981097
*/
1099-
private function getCustomerAttributeExpectations($isRegistration)
1098+
private function getCustomerAttributeExpectations()
11001099
{
11011100
return [
11021101
self::ATTRIBUTE_CODE . "_1" => [
@@ -1106,7 +1105,7 @@ private function getCustomerAttributeExpectations($isRegistration)
11061105
'dataType' => 'frontend_input',
11071106
'formElement' => 'frontend_input',
11081107
'options' => 'test-options',
1109-
'visible' => !$isRegistration,
1108+
'visible' => true,
11101109
'required' => 'is_required',
11111110
'label' => __('frontend_label'),
11121111
'sortOrder' => 'sort_order',
@@ -1143,7 +1142,7 @@ private function getCustomerAttributeExpectations($isRegistration)
11431142
'config' => [
11441143
'dataType' => 'frontend_input',
11451144
'formElement' => 'frontend_input',
1146-
'visible' => $isRegistration,
1145+
'visible' => true,
11471146
'required' => 'is_required',
11481147
'label' => __('frontend_label'),
11491148
'sortOrder' => 'sort_order',
@@ -1166,7 +1165,7 @@ private function getCustomerAttributeExpectations($isRegistration)
11661165
'config' => [
11671166
'dataType' => 'frontend_input',
11681167
'formElement' => 'frontend_input',
1169-
'visible' => $isRegistration,
1168+
'visible' => true,
11701169
'required' => 'is_required',
11711170
'label' => __('frontend_label'),
11721171
'sortOrder' => 'sort_order',
@@ -1189,14 +1188,13 @@ private function getCustomerAttributeExpectations($isRegistration)
11891188
/**
11901189
* Retrieve all variations of attributes with all variations of visibility
11911190
*
1192-
* @param bool $isRegistration
11931191
* @return array
11941192
*/
1195-
private function getExpectationForVisibleAttributes($isRegistration = true)
1193+
private function getExpectationForVisibleAttributes()
11961194
{
11971195
return [
11981196
'customer' => [
1199-
'children' => $this->getCustomerAttributeExpectations($isRegistration),
1197+
'children' => $this->getCustomerAttributeExpectations(),
12001198
],
12011199
'address' => [
12021200
'children' => [

0 commit comments

Comments
 (0)