diff --git a/VERSIONS_HOTLINE/156974 b/VERSIONS_HOTLINE/156974 new file mode 100644 index 0000000000000000000000000000000000000000..27f5b6f039a3cf2163707573cc50b91b4db28a52 --- /dev/null +++ b/VERSIONS_HOTLINE/156974 @@ -0,0 +1 @@ + - correctif #156974 : Magasin de Thèmes : Correctif dans la fonction de selection d'un domaine de recherche. \ No newline at end of file diff --git a/library/templates/Intonation/Library/Widget/Search/View.php b/library/templates/Intonation/Library/Widget/Search/View.php index f13dc2d7a98cac1501994cb35766738446065867..d31fc0b86bd21c4d02fc1e285ea867e533c5caee 100644 --- a/library/templates/Intonation/Library/Widget/Search/View.php +++ b/library/templates/Intonation/Library/Widget/Search/View.php @@ -370,7 +370,7 @@ abstract class IntonationSearchRenderAbstract { } - protected function _createDomainElement() : ?ZendAfi_Form { + protected function _createDomainElement() : ?Zend_Form_Element { if (!$domain_ids = trim($this->_settings->getDomainIds())) return null; diff --git a/tests/scenarios/Templates/TemplatesSearchTest.php b/tests/scenarios/Templates/TemplatesSearchTest.php index 1910d9cd0701bbbf164b6a1415399f6a502f3429..eda30b9a836a93457d54f8a0736985662e32f624 100644 --- a/tests/scenarios/Templates/TemplatesSearchTest.php +++ b/tests/scenarios/Templates/TemplatesSearchTest.php @@ -1328,4 +1328,34 @@ class TemplatesSearchSearchSubmitButtonTest extends Admin_AbstractControllerTes $this->assertXPath($xpath); } +} + + + + +class TemplatesSearchWithDomainIdsSettingsFromIndexPageTest extends Admin_AbstractControllerTestCase { + public function setUp() { + parent::setUp(); + $this->_buildTemplateProfil(['id' => 1, + 'libelle' => 'My search page']) + ->setBoiteOfTypeInDivision(1, + Intonation_Library_Widget_Search_Definition::CODE, + ['tri' => Class_CriteresRecherche::SORT_NOVELTY_DESC, + 'search_button' => 'Recherche simple', + 'placeholder' => 'Pomme, poire', + 'domain_ids' => '2-g3-4']); + + $this->dispatch('/'); + } + + /** @test */ + public function pageShouldContainsSearchWidget() { + $this->assertXPath('//div[contains(@class, "boite rech_simple")]'); + } + + + /** @test */ + public function expressionRecherchePlaceHolderShouldBePommePoire() { + $this->assertXPath('//input[@name="expressionRecherche"][@placeholder="Pomme, poire"]'); + } } \ No newline at end of file