Skip to content

Commit

Permalink
MAGETWO-84087: 11792: Can't add customizable options to product #11965
Browse files Browse the repository at this point in the history
  • Loading branch information
ishakhsuvarov authored Nov 22, 2017
2 parents 26185ac + e65e4ad commit 1e4762a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,16 @@ public function testModifyMeta()
->method('getAll')
->willReturn([]);

$this->assertArrayHasKey(CustomOptions::GROUP_CUSTOM_OPTIONS_NAME, $this->getModel()->modifyMeta([]));
$meta = $this->getModel()->modifyMeta([]);

$this->assertArrayHasKey(CustomOptions::GROUP_CUSTOM_OPTIONS_NAME, $meta);

$buttonAdd = $meta['custom_options']['children']['container_header']['children']['button_add'];
$buttonAddTargetName = $buttonAdd['arguments']['data']['config']['actions'][0]['targetName'];
$expectedTargetName = '${ $.ns }.${ $.ns }.' . CustomOptions::GROUP_CUSTOM_OPTIONS_NAME
. '.' . CustomOptions::GRID_OPTIONS_NAME;

$this->assertEquals($expectedTargetName, $buttonAddTargetName);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ protected function getHeaderContainerConfig($sortOrder)
'sortOrder' => 20,
'actions' => [
[
'targetName' => 'ns = ${ $.ns }, index = ' . static::GRID_OPTIONS_NAME,
'targetName' => '${ $.ns }.${ $.ns }.' . static::GROUP_CUSTOM_OPTIONS_NAME
. '.' . static::GRID_OPTIONS_NAME,
'actionName' => 'processingAddChild',
]
]
Expand Down

0 comments on commit 1e4762a

Please sign in to comment.