Skip to content
Snippets Groups Projects

Hotline#28472 fix add box in front

Merged Ghost User requested to merge hotline#28472_Fix_add_box_in_front into hotline-master
Compare and
+ 38
0
Preferences
Compare changes
@@ -1135,3 +1135,41 @@ class AccueilControllerKiosqueWidgetWithFlashSettingsSavedAndJsSelectedTest exte
$this->assertNotXPath('//tr[@style="display: none"]//select[@name="profil_redirect"]');
}
}
class AccueilControllerAddBoxInFrontTest extends AccueilControllerConfigBoiteLoginTestCase {
protected $profil;
public function setUp() {
parent::setUp();
$this->postDispatch('/admin/accueil/add-block', ['division' => 4,
'module_type' => 'KIOSQUE',
'id_module' => 32,
'titre' => 'mon titre',
'boite' => '',
]);
$id_profil = Class_Profil::getCurrentProfil()->getId();
Class_Profil::clearCache();
$this->profil = Class_Profil::find($id_profil);
}
/** @test */
public function currentProfilShouldHaveTitre() {
$this->assertEquals('mon titre', $this->profil->getCfgAccueilAsArray()['modules'][1]['preferences']['titre']);
}
/** @test */
public function currentProfilShouldHaveTypeKiosque() {
$this->assertEquals('KIOSQUE', $this->profil->getCfgAccueilAsArray()['modules'][1]['type_module']);
}
/** @test */
public function currentProfilShouldHaveSlideShow() {
$this->assertEquals('slide_show', $this->profil->getCfgAccueilAsArray()['modules'][1]['preferences']['style_liste']);
}
/** @test */
public function currentProfilShouldHaveNbNotices() {
$this->assertEquals(20, $this->profil->getCfgAccueilAsArray()['modules'][1]['preferences']['nb_notices']);
}
}