diff --git a/VERSIONS_HOTLINE/126005 b/VERSIONS_HOTLINE/126005 new file mode 100644 index 0000000000000000000000000000000000000000..b4932da441f920e85997a4d211dcc73fd86e3f63 --- /dev/null +++ b/VERSIONS_HOTLINE/126005 @@ -0,0 +1 @@ + - ticket #126005 : Magasin de thèmes : Dans le thème Chili, le style de représentation accordéon présente tous les éléments fermé par défaut. \ No newline at end of file diff --git a/library/templates/Chili/View/RenderAccordionCarousel.php b/library/templates/Chili/View/RenderAccordionCarousel.php index 55117683b4c9f1e2ddf78dd7f2272f8efd27dbb1..7743402a8bdbb814d75b4910bc9532cdb6608d85 100644 --- a/library/templates/Chili/View/RenderAccordionCarousel.php +++ b/library/templates/Chili/View/RenderAccordionCarousel.php @@ -39,13 +39,6 @@ class Chili_View_RenderAccordionCarousel extends ZendAfi_View_Helper_BaseHelper if (!$elements = $elements->getArrayCopy()) return ''; - $first_element = array_shift($elements); - - $html = [(new Chili_View_RenderAccordionCarousel_Content($this->view, - $first_element, - $this->_id)) - ->render($content_callback)]; - foreach($elements as $element) { $html []= (new Chili_View_RenderAccordionCarousel_Content($this->view, $element, diff --git a/tests/scenarios/Templates/ChiliAccordionTest.php b/tests/scenarios/Templates/ChiliAccordionTest.php index e12eca63190688487627ccfc66c690b8e8a8a3ca..2faec970414b61ac42a15ef3d866dfda71f9bd0d 100644 --- a/tests/scenarios/Templates/ChiliAccordionTest.php +++ b/tests/scenarios/Templates/ChiliAccordionTest.php @@ -67,14 +67,14 @@ class ChiliAccordionWidgetTest extends AbstractControllerTestCase { /** @test */ - public function articleLeSystemeSolaireButtonShouldBeExpanded() { - $this->assertXPathContentContains('//div[contains(@class, "boite news")]//div[contains(@class, "accordion")]//button[@aria-expanded="true"][contains(@class, "accordion_button btn btn-link")]', 'Le systeme Solaire'); + public function articleLeSystemeSolaireButtonShouldBeCollapsed() { + $this->assertXPathContentContains('//div[contains(@class, "boite news")]//div[contains(@class, "accordion")]//button[contains(@class, "accordion_button collapsed btn btn-link")]', 'Le systeme Solaire'); } /** @test */ - public function articleLeSystemeSolaireContentShouldBeShown() { - $this->assertXPathContentContains('//div[contains(@class, "boite news")]//div[contains(@class, "accordion")]//div[contains(@class, "accordion_content collapse show")]', '9 planètes'); + public function articleLeSystemeSolaireContentShouldBeCollapse() { + $this->assertXPathContentContains('//div[contains(@class, "boite news")]//div[contains(@class, "accordion")]//div[@class="accordion_content collapse"]', '9 planètes'); }