Skip to content
Snippets Groups Projects
Commit 69668dd1 authored by gloas's avatar gloas
Browse files

Ajout champ Nouveauté dans admin/tagSelectionChamp

parent 504cc8fe
Branches
Tags
No related merge requests found
......@@ -28,7 +28,7 @@ class ZendAfi_View_Helper_Admin_TagSelectionChamps extends ZendAfi_View_Helper_B
public function TagSelectionChamps($rubrique,$valeurs="")
{
if($rubrique == "libelles") return $this->getInitLibelles();
if($rubrique == "liste") $champs="JTANECR";
if($rubrique == "liste") $champs="JTANECR9";
if($rubrique == "facettes") {
$champs="AFMDPLGSBYZ";
$champs.=Class_CodifThesaurus::getFacettesIndex();
......
......@@ -744,6 +744,29 @@ class RechercheControllerSimpleActionWithListeFormatMurTest extends RechercheCon
}
class RechercheControllerListeCodeWithNouveauteTest extends AbstractControllerTestCase {
protected $_liste_format = Class_Systeme_ModulesAppli::LISTE_FORMAT_MUR;
public function setUp() {
parent::setUp();
Class_Profil::getCurrentProfil()
->setCfgModules(['recherche' => ['resultatsimple' => [
'liste_format' => $this->_liste_format ,
'liste_codes' => "TAN9",
'facettes_cochables' => 1]]])
->setSelTypeDoc('1');
$this->dispatch('/recherche/simple/expressionRecherche/hello/tri/%2A/facette/T1', true);
}
/** @test **/
public function pageShouldContainsNoticeWithDivNouveauté() {
$this->assertXPathContentContains('//div[@class="liste_mur"]//div[@class="notice"]//div[@class="nouveaute"]','Nouveauté',$this->_response->getBody());
}
}
class RechercheControllerFacetteCochablesTest extends AbstractControllerTestCase {
protected $_liste_format = Class_Systeme_ModulesAppli::LISTE_FORMAT_MUR;
......
......@@ -52,8 +52,12 @@ class ZendAfi_View_Helper_Admin_TagSelectionChampsTest extends ViewHelperTestCas
'//div[@id="facettes_box_Y"]');
}
/** @test */
public function linkToNouveauteShouldBePresent() {
$this->_result = $this->_helper->TagSelectionChamps('liste', '');
$this->_html=$this->_result['bloc_saisie'];
$this->assertXPath($this->_html, '//div[@id="liste_box_9"]', $this->_html);
}
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment