Skip to content
Snippets Groups Projects
Commit 3592845c authored by lbrun's avatar lbrun
Browse files

dev#23223_sito_widget_pagination : add ajax pagination tests

parent 8042af35
Branches
Tags
6 merge requests!1553Master,!1502Master,!1501Stable,!1289Master,!1288Dev#23223 sito widget pagination,!1275Dev#23223 sito widget pagination
......@@ -254,7 +254,7 @@ class SelectedStrategy extends SitoDisplayStrategy {
'action' => 'widget-page',
'id_module' => $this->id_module,
'id_division' => $this->division],
'link_attribs' => [ 'data-reload-module' => 'true' ]
'link_attribs' => [ 'data-ajax-reload' => 'true' ]
]);
}
}
......
......@@ -17,7 +17,7 @@
function initializeReloadModule() {
$('a[data-reload-module="true"]').click(function(event) {
$('.boite a[data-ajax-reload="true"]').click(function(event) {
event.preventDefault();
$(this).closest('.boite').reload($(this).attr('href'));
......
......@@ -177,6 +177,12 @@ class SitoViewHelperSelectItemsBySelectionOrderPaginationTest extends SitoViewHe
public function paginatorPreviousLinkShouldBeDisabled() {
$this->assertXPathContentContains($this->html, '//div[@class="paginationControl"]//span[@class="disabled"]', utf8_encode('Précédent'));
}
/** @test */
public function anchorsShouldHaveDataReloadModule() {
$this->assertXPathCount($this->html, '//div[@class="paginationControl"]//a[@data-ajax-reload="true"]', 2);
}
}
......
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