diff --git a/templates/patterns/context_nav/js/contextual_navigation.js b/templates/patterns/context_nav/js/contextual_navigation.js index 45c64715e..402fce636 100644 --- a/templates/patterns/context_nav/js/contextual_navigation.js +++ b/templates/patterns/context_nav/js/contextual_navigation.js @@ -1,11 +1,10 @@ /** * @file - * Contextual navigation initialisation code. + * Contextual navigation behavior. * - * Simplified version of javascript code for supporting contextual navigation composition which is not part of ECL - * anymore. Based on https://github.com/ec-europa/europa-component-library/tree/v2-dev/src/systems/ec/implementations/vanilla/packages/ec-component-contextual-navigation - * implementation. In opposite to original solution we don't use anymore 'autoInit' approach. Initialization of all - * existing + * Simplified version of the deprecated ECL contextual navigation javascript logic, based on + * https://github.com/ec-europa/europa-component-library/tree/v2-dev/src/systems/ec/implementations/vanilla/packages/ec-component-contextual-navigation. + * As opposed to using the original 'autoInit' approach we instead add a simple event listener to the appropriate elements. */ (function (Drupal) { /** diff --git a/tests/Functional/ParagraphsTest.php b/tests/Functional/ParagraphsTest.php index 15397e1f2..a796ec07a 100644 --- a/tests/Functional/ParagraphsTest.php +++ b/tests/Functional/ParagraphsTest.php @@ -42,6 +42,7 @@ public function testAccordionItemParagraph(): void { $this->assertSession()->fieldExists('field_oe_demo_body[0][subform][field_oe_paragraphs][0][subform][field_oe_text][0][value]'); $this->assertSession()->fieldExists('field_oe_demo_body[0][subform][field_oe_paragraphs][0][subform][field_oe_text_long][0][value]'); $this->assertSession()->fieldNotExists('field_oe_demo_body[0][subform][field_oe_paragraphs][0][subform][field_oe_icon]'); + $values = [ 'title[0][value]' => 'Test Accordion', 'field_oe_demo_body[0][subform][field_oe_paragraphs][0][subform][field_oe_text][0][value]' => 'Accordion item title',