PMCORE-2536
This commit is contained in:
@@ -678,11 +678,8 @@ class AbstractCasesTest extends TestCase
|
||||
'caseNumber' => rand(),
|
||||
'caseTitle' => G::generateUniqueID(),
|
||||
// Home - Search
|
||||
'priorities' => ['N'],
|
||||
'caseStatuses' => ['TO_DO','DRAFT'],
|
||||
'filterCases'=> '1,3-5,8,10-15',
|
||||
'delegationDateFrom' => date('Y-m-d'),
|
||||
'delegationDateTo' => date('Y-m-d'),
|
||||
// Home - My cases
|
||||
'filter'=> 'STARTED',
|
||||
'caseStatus' => 'TO_DO',
|
||||
@@ -691,8 +688,6 @@ class AbstractCasesTest extends TestCase
|
||||
'finishCaseFrom' => date('Y-m-d'),
|
||||
'finishCaseTo' => date('Y-m-d'),
|
||||
// Other
|
||||
'search' => G::generateUniqueID(),
|
||||
'category' => G::generateUniqueID(),
|
||||
'caseLink' => G::generateUniqueID(),
|
||||
'appUidCheck' => [G::generateUniqueID()],
|
||||
'sort' => 'APP_NUMBER',
|
||||
@@ -714,8 +709,6 @@ class AbstractCasesTest extends TestCase
|
||||
$actual = $absCases->getCaseTitle();
|
||||
$this->assertEquals($properties['caseTitle'], $actual);
|
||||
// Home - Search
|
||||
$actual = $absCases->getPriorities();
|
||||
$this->assertEmpty($actual);
|
||||
$actual = $absCases->getCaseStatuses();
|
||||
$this->assertNotEmpty($actual);
|
||||
$actual = $absCases->getFilterCases();
|
||||
@@ -724,28 +717,28 @@ class AbstractCasesTest extends TestCase
|
||||
$this->assertEmpty($actual);
|
||||
$actual = $absCases->getRangeCasesFromTo();
|
||||
$this->assertEmpty($actual);
|
||||
$actual = $absCases->getDelegateFrom();
|
||||
$actual = $absCases->getStartCaseFrom();
|
||||
$this->assertEmpty($actual);
|
||||
$actual = $absCases->getDelegateTo();
|
||||
$actual = $absCases->getStartCaseTo();
|
||||
$this->assertEmpty($actual);
|
||||
$actual = $absCases->getFinishCaseFrom();
|
||||
$this->assertEmpty($actual);
|
||||
$actual = $absCases->getFinishCaseTo();
|
||||
$this->assertEmpty($actual);
|
||||
// Home - My cases
|
||||
$actual = $absCases->getParticipatedStatus();
|
||||
$this->assertEmpty($actual);
|
||||
$actual = $absCases->getCaseStatus();
|
||||
$this->assertEquals(2, $actual);
|
||||
$this->assertEmpty($actual);
|
||||
$actual = $absCases->getStartCaseFrom();
|
||||
$this->assertEquals($properties['startCaseFrom'], $actual);
|
||||
$this->assertEmpty($actual);
|
||||
$actual = $absCases->getStartCaseTo();
|
||||
$this->assertEquals($properties['startCaseTo'], $actual);
|
||||
$this->assertEmpty($actual);
|
||||
$actual = $absCases->getFinishCaseFrom();
|
||||
$this->assertEquals($properties['finishCaseFrom'], $actual);
|
||||
$this->assertEmpty($actual);
|
||||
$actual = $absCases->getFinishCaseTo();
|
||||
$this->assertEquals($properties['finishCaseTo'], $actual);
|
||||
$this->assertEmpty($actual);
|
||||
// Other
|
||||
$actual = $absCases->getValueToSearch();
|
||||
$this->assertEquals($properties['search'], $actual);
|
||||
$actual = $absCases->getCategoryUid();
|
||||
$this->assertEquals($properties['category'], $actual);
|
||||
$actual = $absCases->getCaseUid();
|
||||
$this->assertEquals($properties['caseLink'], $actual);
|
||||
$actual = $absCases->getCasesUids();
|
||||
|
||||
@@ -44,7 +44,7 @@ class SearchTest extends TestCase
|
||||
* It tests the getData method without filters
|
||||
*
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getData()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Unassigned::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getColumnsView()
|
||||
* @test
|
||||
*/
|
||||
public function it_get_result_without_filters()
|
||||
@@ -62,7 +62,7 @@ class SearchTest extends TestCase
|
||||
* It tests the getData with case number
|
||||
*
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getData()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Unassigned::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::filters()
|
||||
* @test
|
||||
*/
|
||||
@@ -84,7 +84,7 @@ class SearchTest extends TestCase
|
||||
* It tests the getData with process
|
||||
*
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getData()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Unassigned::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::filters()
|
||||
* @test
|
||||
*/
|
||||
@@ -106,7 +106,7 @@ class SearchTest extends TestCase
|
||||
* It tests the getData with task
|
||||
*
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getData()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Unassigned::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::filters()
|
||||
* @test
|
||||
*/
|
||||
@@ -128,7 +128,7 @@ class SearchTest extends TestCase
|
||||
* It tests the getData method with case title filter
|
||||
*
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getData()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Unassigned::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::filters()
|
||||
* @test
|
||||
*/
|
||||
@@ -153,7 +153,7 @@ class SearchTest extends TestCase
|
||||
* It tests the getData with user
|
||||
*
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getData()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Unassigned::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::filters()
|
||||
* @test
|
||||
*/
|
||||
@@ -175,17 +175,17 @@ class SearchTest extends TestCase
|
||||
* It tests the getData with priority
|
||||
*
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getData()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Unassigned::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::getColumnsView()
|
||||
* @covers \ProcessMaker\BusinessModel\Cases\Search::filters()
|
||||
* @test
|
||||
*/
|
||||
public function it_filter_by_priority()
|
||||
public function it_filter_by_status()
|
||||
{
|
||||
// Create factories related to the delegation cases
|
||||
$cases = $this->createSearch();
|
||||
// Create new Search object
|
||||
$search = new Search();
|
||||
$search->setPriority('N');
|
||||
$search->setCaseStatuses(['TO_DO']);
|
||||
// Set order by column value
|
||||
$search->setOrderByColumn('APP_NUMBER');
|
||||
$result = $search->getData();
|
||||
|
||||
@@ -929,9 +929,9 @@ class UnassignedTest extends TestCase
|
||||
{
|
||||
// Create factories related to the unassigned cases
|
||||
$cases = $this->createSelfServiceUser();
|
||||
$usrUid = $cases->last()->USR_UID;
|
||||
$usrId = $cases->last()->USR_ID;
|
||||
$title = $cases->last()->DEL_TITLE;
|
||||
$usrUid = $cases['taskUser']->USR_UID;
|
||||
$usrId = $cases['delegation']->USR_ID;
|
||||
$title = $cases['delegation']->DEL_TITLE;
|
||||
// We need to commit the records inserted because is needed for the "fulltext" index
|
||||
DB::commit();
|
||||
// Create new Unassigned object
|
||||
|
||||
Reference in New Issue
Block a user