Skip to content
Snippets Groups Projects
Commit f4b5e3a2 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

fix chili template search result

parent f06c2f5f
Branches
Tags
1 merge request!4394fix chili template search result
Pipeline #16705 passed with stage
in 34 minutes and 6 seconds
......@@ -251,8 +251,15 @@ class Intonation_View_Search_Result extends ZendAfi_View_Helper_BaseHelper {
protected function _renderWall(array $records) : string {
return $this->view->renderWall(new Storm_Collection($records),
fn($wrapper) => $this->view->cardify($wrapper));
// Strictly use this helper to avoid Chili_View_RenderWall
$helper = (new Intonation_View_RenderWall)
->setView($this->view);
return $helper->renderWall(new Storm_Collection($records),
function($wrapped)
{
return $this->view->cardify($wrapped);
});
}
......
......@@ -853,6 +853,12 @@ class TemplatesSearchDispatchWithNouveauteNowParamTest extends AbstractControlle
public function linkWithNouveauteMaintantShouldBeDisplayedInRecord89() {
$this->assertXPathContentContains('//div[@id="89"]/following-sibling::div//a[contains(@href, "nouveaute/maintenant")]//span', 'Nouveauté');
}
/** @test */
public function pageShouldBeHtml5Valid() {
$this->assertHTML5();
}
}
......@@ -1019,3 +1025,32 @@ class TemplatesSearchCollectionWithoutSerie extends AbstractControllerTestCase {
$this->assertNotXPath('//div//a[contains(@class,"record_serie")]');
}
}
class TemplatesSearchDispatchWallModeRenderingInChiliTest extends TemplatesSearchDispatchTest {
public function setUp() {
parent::setUp();
$this->dispatch('/opac/recherche/simple/expressionRecherche/pomme/id_profil/5/liste_format/4');
}
/** @test */
public function renderingShouldBeWallModeMasonry() {
$this->assertXPath('//main//div[contains(@class,"search_records_col")]//div[contains(@class, "masonry")]//div[contains(@class, "card")]');
}
/** @test */
public function pageShouldNotContainsWallGridLg() {
$this->assertNotXPath('//main//div[contains(@class, "wall_grid_lg")]');
}
/** @test */
public function pageShouldBeHtml5Valid() {
$this->assertHTML5();
}
}
\ 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