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

dev #56205 add tests to cover filters from profil applied to items table

parent d4a65f18
Branches
Tags
5 merge requests!2334Master,!2102#57574 : correction orthographe des jours de la semaine,!2088Master,!2086Dev#56205 2355 profil filtrant exclusif,!2072Dev#56205 2355 profil filtrant exclusif
Pipeline #768 passed with stage
in 12 minutes and 26 seconds
......@@ -36,7 +36,9 @@ abstract class NoticeAjaxControllerItemsTestCase extends AbstractControllerTestC
['id' => 12,
'id_bib' => 3,
'id_int_bib' => 3,
'section' => 14,
'cote' => 'A',
'annexe' => 87,
'dispo' => 'Non',
'zone995' => serialize([['code' => '9', 'valeur' => '12']])]);
......@@ -184,4 +186,48 @@ class NoticeAjaxControllerItemsWithOrder995Dollar9DescTest
$this->assertXPathContentOrder('//td[@class="cote"]',
['B', 'A', 'C']);
}
}
class NoticeAjaxControllerItemsFiltredByProfilSectionTest extends NoticeAjaxControllerItemsTestCase {
protected function _prepareFixtures() {
Class_Profil::getCurrentProfil()
->setSelSection('14;2');
}
/** @test */
public function itemAShouldBePresent() {
$this->assertXPathContentContains('//td[@class="cote"]', 'A');
}
/** @test */
public function itemBShouldNotBePresent() {
$this->assertNotXPathContentContains('//td[@class="cote"]', 'B');
}
}
class NoticeAjaxControllerItemsFiltredByProfilAnnexTest extends NoticeAjaxControllerItemsTestCase {
protected function _prepareFixtures() {
Class_Profil::getCurrentProfil()
->setSelAnnexe('87');
}
/** @test */
public function itemAShouldBePresent() {
$this->assertXPathContentContains('//td[@class="cote"]', 'A');
}
/** @test */
public function itemBShouldNotBePresent() {
$this->assertNotXPathContentContains('//td[@class="cote"]', 'B');
}
}
\ 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