-
Notifications
You must be signed in to change notification settings - Fork 47
EZP-26120: Expose the navigation items identifier in the navigation hub #654
EZP-26120: Expose the navigation items identifier in the navigation hub #654
Conversation
Can you please include the issue number in the commit and in the PR title and in the pull request with a link to the issue (and move the issue on the board) ? Also this is not the correct approach, as mentioned in the issue description, we should add the identifier in a data attribute on the view container. This would avoid adding such logic in the template and would make this behavior more robust when extending this class (it is meant for that). (In addition, your patch is probably breaking a unit tests and you'll have to add some unit tests as well). |
5a6fd39
to
3c527c8
Compare
ping @dpobel if I understand correctly this should do it, if not could you provide an example. |
@@ -51,6 +51,7 @@ YUI.add('ez-navigationitemview', function (Y) { | |||
render: function () { | |||
var container = this.get('container'); | |||
|
|||
container.setAttribute('data-navigation-item-identifier', this.get('identifier')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move that to the initializer where the containerTemplate
is defined. Also this needs to be unit tested.
3c527c8
to
cdcfa93
Compare
@dpobel unit test added |
@@ -44,6 +46,19 @@ YUI.add('ez-navigationitemview-tests', function (Y) { | |||
); | |||
}, | |||
|
|||
"The Container should have a data identifier": function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Should add the navigation identifier on the container"
besides the 2 nitpicks +1 |
20f0f46
to
304cced
Compare
+1 |
304cced
to
384f7b2
Compare
ping @yannickroger @glye all green |
+1 |
As discussed on PR #653 the navigation items identifier should be exposed in order to the improve element searching in behat tests.
jira: https://jira.ez.no/browse/EZP-26120