diff --git a/library/templates/Intonation/Library/FormCustomizer/Widget/Default.php b/library/templates/Intonation/Library/FormCustomizer/Widget/Default.php index 8881658093cfe9ba2a5cbbf447a19b63c21732cf..d7053ff65847815cb5270abbb05d0debbd313ac7 100644 --- a/library/templates/Intonation/Library/FormCustomizer/Widget/Default.php +++ b/library/templates/Intonation/Library/FormCustomizer/Widget/Default.php @@ -56,18 +56,20 @@ class Intonation_Library_FormCustomizer_Widget_Default extends Intonation_Librar protected function _addStylesPack() : self { return $this->_addPack('styles_pack', $this->_template->getStylesPack(), - $this->_('Modèle de styles')); + $this->_('Modèle de styles'), + 'addToStyleGroup'); } protected function _addResponsivePack() : self { return $this->_addPack('responsive_pack', $this->_template->getResponsivePack(), - $this->_('Modèle d\'adaptabilité')); + $this->_('Modèle d\'adaptabilité'), + 'addToResponsiveGroup'); } - protected function _addPack(string $id, array $packs, string $label) : self { + protected function _addPack(string $id, array $packs, string $label, string $group) : self { $name = $this->_template->withNameSpace($id); $multi_options = ['#' => '']; @@ -81,7 +83,7 @@ class Intonation_Library_FormCustomizer_Widget_Default extends Intonation_Librar 'multiOptions' => $multi_options, 'value' => '#']) - ->addToStyleGroup([$name]); + ->$group([$name]); return $this; } diff --git a/tests/scenarios/Templates/TemplatesResponsivePackTest.php b/tests/scenarios/Templates/TemplatesResponsivePackTest.php index 2806cf9ab597405fcc8f3f609553225edbb81208..fd224f1b39e7dd7d7d3ae6a362195b1ea59a2c09 100644 --- a/tests/scenarios/Templates/TemplatesResponsivePackTest.php +++ b/tests/scenarios/Templates/TemplatesResponsivePackTest.php @@ -711,7 +711,7 @@ class TemplatesResponsivePackWidgetAgendaEditTest extends Admin_AbstractControll /** @test */ public function formShouldContainsSelectResponsivePackWithBoitePleineLargeur() { - $this->assertXPath('//form//select[@name="ChiliResponsivePack"]//option[@value="#"][@selected]/following-sibling::option[@value="1"][@label="boite pleine largeur"]'); + $this->assertXPath('//form//fieldset[@id="fieldset-responsive_group"]//select[@name="ChiliResponsivePack"]//option[@value="#"][@selected]/following-sibling::option[@value="1"][@label="boite pleine largeur"]'); } } diff --git a/tests/scenarios/Templates/TemplatesStylesPackTest.php b/tests/scenarios/Templates/TemplatesStylesPackTest.php index 894ab544eea6c3592e76d6acbaafa29f13de0a3e..39bf35dad1628dc3804451e91e699cc53e781c52 100644 --- a/tests/scenarios/Templates/TemplatesStylesPackTest.php +++ b/tests/scenarios/Templates/TemplatesStylesPackTest.php @@ -723,7 +723,7 @@ class TemplatesStylesPackWidgetAgendaEditTest extends Admin_AbstractControllerTe /** @test */ public function formShouldContainsSelectStylesPackWithBoiteRose() { - $this->assertXPath('//form//select[@name="ChiliStylesPack"]//option[@value="#"][@selected]/following-sibling::option[@value="1"][@label="boite rose"]'); + $this->assertXPath('//form//fieldset[@id="fieldset-style_group"]//select[@name="ChiliStylesPack"]//option[@value="#"][@selected]/following-sibling::option[@value="1"][@label="boite rose"]'); } }