Skip to content
Snippets Groups Projects
Commit f23c3277 authored by Laurent's avatar Laurent
Browse files

hotline #116135 Templates : update defaults for article widget : order selection, size 3

parent 7d547eb1
No related merge requests found
Pipeline #11407 failed with stage
in 40 minutes and 15 seconds
- ticket #116135 : Magasin de thèmes / Boite article : paramètres par défaut : tri des documents par ordre de sélection, trois documents à afficher
\ No newline at end of file
......@@ -43,7 +43,8 @@ class Intonation_Library_Widget_Carousel_Article_Definition extends Intonation_L
$this->_view_helper = 'Intonation_Library_Widget_Carousel_Article_View';
$this->_defaultValues = array_merge($this->_defaultValues,
['titre' => $this->_libelle,
'order' => static::SORT_RANDOM]);
'size' => 3,
'order' => static::SORT_SELECTION]);
}
......
......@@ -77,7 +77,6 @@ class Intonation_Library_Widget_Carousel_Definition extends Class_Systeme_Module
'type' => $type,
'configuration' => ['rendering' => $definition->rendering(),
'layout' => $layout,
'size' => $definition->size(),
'boite' => $styles_callback()]];
}
}
......
......@@ -34,7 +34,6 @@ abstract class TemplatesArticlesWidgetTestCase extends Admin_AbstractControllerT
->setBoiteOfTypeInDivision(2,
Intonation_Library_Widget_Carousel_Article_Definition::CODE,
['all_layout' => Intonation_Library_Widget_Carousel_Definition::LISTING,
'order' => 'Selection',
'id_items' => '5-6-7',
'rss' => 1,
'link_to_all' => 1,
......@@ -92,8 +91,14 @@ class TemplatesArticlesEditWidgetTest extends TemplatesArticlesWidgetTestCase {
/** @test */
public function editArticlesWidgetShouldContainsSelection() {
$this->assertXpath('//select[@name="order"]//option[@value="Selection"]');
public function editArticlesWidgetShouldContainsSelectionSelected() {
$this->assertXPath('//select[@name="order"]//option[@value="Selection"][@selected]');
}
/** @test */
public function inputForSizeShouldBeTypeNumberAndValueThree() {
$this->assertXPath('//input[@name="size"][@type="number"][@value="3"]');
}
}
......
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