From 7bc831c4e9e0057b65b49ed29afae4c252609de5 Mon Sep 17 00:00:00 2001 From: Daniel Rojas Date: Wed, 2 Apr 2014 16:35:31 -0400 Subject: [PATCH 01/11] Se agrega test unit para PROCESS CATEGORY. Se modifican respuestas de PROCESS CATEGORY. --- .../src/BusinessModel/ProcessCategory.php | 11 ++- .../BusinessModel/ProcessCategoryTest.php | 76 +++++++++++++++++++ 2 files changed, 83 insertions(+), 4 deletions(-) diff --git a/workflow/engine/src/BusinessModel/ProcessCategory.php b/workflow/engine/src/BusinessModel/ProcessCategory.php index 5ceb1502f..db507532c 100644 --- a/workflow/engine/src/BusinessModel/ProcessCategory.php +++ b/workflow/engine/src/BusinessModel/ProcessCategory.php @@ -261,7 +261,9 @@ class ProcessCategory } //Return if ($oProcessCategory != '') { - return $oProcessCategory; + $oProcessCategory = array_change_key_case($oProcessCategory, CASE_LOWER); + $oResponse = json_decode(json_encode($oProcessCategory), false); + return $oResponse; } else { throw (new \Exception( 'The Category with cat_uid: '.$cat_uid.' doesn\'t exist!')); } @@ -291,7 +293,7 @@ class ProcessCategory $pcat->setCategoryUid( $catUid ); $pcat->setCategoryName( $catName ); $pcat->save(); - $oProcessCategory = array_change_key_case($this->getCategory( $catUid ), CASE_LOWER); + $oProcessCategory = $this->getCategory( $catUid ); //Return return $oProcessCategory; } catch (\Exception $e) { @@ -321,9 +323,10 @@ class ProcessCategory $pcat->setCategoryUid( $catUID ); $pcat->setCategoryName( $catName ); $pcat->save(); - $oProcessCategory = array_change_key_case($this->getCategory( $cat_uid ), CASE_LOWER); + $oProcessCategory = $this->getCategory( $cat_uid ); //Return - return $oProcessCategory; + $oResponse = json_decode(json_encode($oProcessCategory), false); + return $oResponse; } catch (\Exception $e) { throw $e; diff --git a/workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php b/workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php index 1d36f6b2c..b795ce996 100644 --- a/workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php +++ b/workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php @@ -13,6 +13,20 @@ if (!class_exists("Propel")) { class ProcessCategoryTest extends \PHPUnit_Framework_TestCase { protected static $arrayUid = array(); + protected $oCategory; + + /** + * Set class for test + * + * @coversNothing + * + * @copyright Colosa - Bolivia + */ + public function setUp() + { + $this->oCategory = new \BusinessModel\ProcessCategory(); + } + public static function tearDownAfterClass() { @@ -26,6 +40,67 @@ class ProcessCategoryTest extends \PHPUnit_Framework_TestCase } } + /** + * Test add Category + * + * @covers \BusinessModel\ProcessCategory::addCategory + * + * @copyright Colosa - Bolivia + */ + public function testAddCategory() + { + $response = $this->oCategory->addCategory('New Category Test'); + $this->assertTrue(is_object($response)); + $aResponse = json_decode(json_encode($response), true); + return $aResponse; + } + + /** + * Test put Category + * + * @covers \BusinessModel\ProcessCategory::updateCategory + * @depends testAddCategory + * @param array $aResponse + * + * @copyright Colosa - Bolivia + */ + public function testUpdateCategory(array $aResponse) + { + $response = $this->oCategory->updateCategory($aResponse["cat_uid"], 'Name Update Category Test'); + $this->assertTrue(is_object($response)); + } + + /** + * Test get Category + * + * @covers \BusinessModel\ProcessCategory::getCategory + * @depends testAddCategory + * @param array $aResponse + * + * @copyright Colosa - Bolivia + */ + public function testGetCategory(array $aResponse) + { + $response = $this->oCategory->getCategory($aResponse["cat_uid"]); + $this->assertTrue(is_object($response)); + } + + + /** + * Test delete Category + * + * @covers \BusinessModel\ProcessCategory::deleteCategory + * @depends testAddCategory + * @param array $aResponse + * + * @copyright Colosa - Bolivia + */ + public function testDeleteCategory(array $aResponse) + { + $response = $this->oCategory->deleteCategory($aResponse["cat_uid"]); + $this->assertTrue(empty($response)); + } + public function testCreate() { try { @@ -46,6 +121,7 @@ class ProcessCategoryTest extends \PHPUnit_Framework_TestCase $this->assertNotEmpty($processCategoryUid); } + public function testGetCategories() { $processCategory = new \BusinessModel\ProcessCategory(); From 1a70103cff9de6fa24a2bd8e3c4e18714f774f79 Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Wed, 2 Apr 2014 17:17:44 -0400 Subject: [PATCH 02/11] Avance de los features cases actions y cases list --- .../basic_sequence_cases_actions.feature | 275 +++++++++++++++--- .../main_tests_cases_actions.feature | 42 +++ .../main_tests_cases_lists_1_6.feature | 104 +++---- .../negative_tests_cases_lists_1_6.feature | 12 +- 4 files changed, 340 insertions(+), 93 deletions(-) diff --git a/features/backend/application_cases/case_actions/basic_sequence_cases_actions.feature b/features/backend/application_cases/case_actions/basic_sequence_cases_actions.feature index c9a5f36b2..a93042222 100644 --- a/features/backend/application_cases/case_actions/basic_sequence_cases_actions.feature +++ b/features/backend/application_cases/case_actions/basic_sequence_cases_actions.feature @@ -1,33 +1,68 @@ @ProcessMakerMichelangelo @RestAPI -Feature: Cases Actions - the features in this script are (getCaseInfo, taskCase, newCase, newCaseImpersonate, reassignCase and routeCase) +Feature: Cases Actions - the features in this script are (getCaseInfo, taskCase, newCase, newCaseImpersonate, reassignCase, routeCase, cancelCase, pauseCase, unpauseCase, executeTrigger, DELETE Case) Requirements: - a workspace with five cases of the process "Test micheangelo" and "Test Users-Step-Properties End Point" + a workspace with 57 cases distributed in the processes "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection", "Derivation rules - sequential" Background: Given that I have a valid access_token -Scenario: Returns information about a given case of the list Inbox - Given I request "cases/48177942153275bfa28bd04070312685" +#Listado de casos +Scenario: Returns a list of the cases for the logged in user (Inbox) + Given I request "cases" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And the "app_uid" property equals "48177942153275bfa28bd04070312685" - And the "app_number" property equals 16 - And the "app_name" property equals "#16" - And the "app_status" property equals "TO_DO" - And the "app_init_usr_uid" property equals "00000000000000000000000000000001" - And the "app_init_usr_username" property equals "Administrator" - And the "pro_uid" property equals "99209594750ec27ea338927000421575" - And the "pro_name" property equals "Derivation rules - sequential" - And the "app_create_date" property equals "2014-03-17 16:32:58" - And the "app_update_date" property equals "2014-03-17 16:33:01" - + And the response has 14 records -Scenario: Returns the current task for a given case of the list Inbox - Given I request "cases/48177942153275bfa28bd04070312685/current-task" + +Scenario: Returns a list of the cases for the logged in user (Draft) + Given I request "cases/draft" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" + And the response has 15 records + + +Scenario: Returns a list of the cases for the logged in user (Participated) + Given I request "cases/participated" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 30 records + + +Scenario: Returns a list of the cases for the logged in user (Unassigned) + Given I request "cases/unassigned" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 12 records + + +Scenario: Returns a list of the cases for the logged in user (Paused) + Given I request "cases/paused" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 12 records + + +Scenario: Returns information about a given case of the list Inbox of process "Derivation rules - Parallel" + Given I request "cases/220090038533b0c40688174019225585" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And the "app_uid" property equals "220090038533b0c40688174019225585" + And the "app_number" property equals 137 + And the "app_name" property equals "#137" + And the "app_status" property equals "TO_DO" + + +Scenario: Returns the current task for a given case of the list Inbox, case 167 of process "derivation rules - sequencial" + Given I request "cases/356811158533b13641ef789000630231/current-task" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" And the "tas_uid" property equals "73641967750ec281cf015d9009265327" And the "tas_title" property equals "Cyclical" And the "del_index" property equals "2" @@ -37,8 +72,8 @@ Scenario Outline: Create a new case in workspace with process "Derivation rules Given POST this data: """ { - "pro_uid": "99209594750ec27ea338927000421575", - "tas_uid": "68707275350ec281ada1c95068712556", + "pro_uid": "", + "tas_uid": "", "variables": [{"name": "admin", "lastname":"admin"}] } """ @@ -51,8 +86,9 @@ Scenario Outline: Create a new case in workspace with process "Derivation rules And store "caseNumber" in session array as variable "caseNumber_" Examples: - | case_number | - | 1 | + | Description | case_number | pro_uid | tas_uid | + | Create case 16 in draft | 1 | 99209594750ec27ea338927000421575 | 68707275350ec281ada1c95068712556 | + | Create case 17 in draft | 2 | 99209594750ec27ea338927000421575 | 68707275350ec281ada1c95068712556 | Scenario Outline: Create a new case Impersonate in workspace with process "Derivation rules - sequential" @@ -60,7 +96,7 @@ Scenario Outline: Create a new case Impersonate in workspace with process "Deriv """ { "pro_uid": "99209594750ec27ea338927000421575", - "usr_uid": "24166330352d56730cdd525035621101", + "usr_uid": "", "tas_uid": "68707275350ec281ada1c95068712556", "variables": [{"name": "pruebaQA", "amount":"10400"}] } @@ -74,8 +110,9 @@ Scenario Outline: Create a new case Impersonate in workspace with process "Deriv And store "caseNumber" in session array as variable "caseNumber_" Examples: - | case_number | - | 1 | + | Description | case_number | usr_uid | + | Create new case 18 with user chris | 3 | 24166330352d56730cdd525035621101 | + | Create new case 18 with user adam | 4 | 44811996752d567110634a1013636964 | Scenario: Returns a list of the cases for the logged in user (Draft) @@ -83,36 +120,204 @@ Scenario: Returns a list of the cases for the logged in user (Draft) Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And the response has 2 records + And the response has 18 records -Scenario: Reassigns a case to a different user +Scenario Outline: Reassigns a case to a different user, from user "administrator" to user "aaron" Given PUT this data: """ { - "usr_uid_source": "62625000752d5672d6661e6072881167", - "usr_uid_target": "24166330352d56730cdd525035621101", + "usr_uid_source": "00000000000000000000000000000001", + "usr_uid_target": "51049032352d56710347233042615067", } """ - And that I want to update a resource with the key "case_number" stored in session array - And I request "case/{uid}/reassign-case" + And I request "case//reassign-case" Then the response status code should be 200 And the content type is "application/json" And the response charset is "UTF-8" And the type is "object" + And that I want to update a resource with the key "case_number" stored in session array as variable "caseNumber_" + And that I want to update a resource with the key "caseId" stored in session array as variable "caseId_" + + Examples: + + | test_description | case_number | + | Reassig case 1, created in this script | 1 | -Scenario: Autoderivate a case to the next task in the process +Scenario: Route a case to the next task in the process Given PUT this data: """ { - "case_uid": "78ef3ca7905019270643749052af5bd7", + "case_uid": "", "del_index": "1" } """ - And that I want to update a resource with the key "" stored in session array - And I request "case/{uid}/route-case" + And I request "cases//route-case" Then the response status code should be 200 And the content type is "application/json" And the response charset is "UTF-8" - And the type is "object" \ No newline at end of file + And the type is "object" + And that I want to update a resource with the key "case_number" stored in session array as variable "caseNumber_" + And that I want to update a resource with the key "caseId" stored in session array as variable "caseId_" + + + Examples: + + | test_description | case_number | + | Derivate case 2 to inbox of Administrator, created in this script | 2 | + + + +Scenario: Cancel a case + Given PUT this data: + """ + { + + } + """ + And I request "cases//cancel" + Then the response status code should be 200 + And the content type is "application/json" + And the response charset is "UTF-8" + And the type is "object" + And that I want to update a resource with the key "case_number" stored in session array as variable "caseNumber_" + And that I want to update a resource with the key "caseId" stored in session array as variable "caseId_" + + + Examples: + + | test_description | case_number | + | Cancel case 3, created in this script | 3 | + + +Scenario: Pause a case + Given PUT this data: + """ + { + "unpaused_date": "2016-12-12" + } + """ + And I request "cases//pause" + Then the response status code should be 200 + And the content type is "application/json" + And the response charset is "UTF-8" + And the type is "object" + And that I want to update a resource with the key "case_number" stored in session array as variable "caseNumber_" + And that I want to update a resource with the key "caseId" stored in session array as variable "caseId_" + + + Examples: + + | test_description | case_number | + | Pause case 4, created in this script | 4 | + + +Scenario: Unpause a case + Given PUT this data: + """ + { + + } + """ + And I request "cases//unpause" + Then the response status code should be 200 + And the content type is "application/json" + And the response charset is "UTF-8" + And the type is "object" + And that I want to update a resource with the key "case_number" stored in session array as variable "caseNumber_" + And that I want to update a resource with the key "caseId" stored in session array as variable "caseId_" + + + Examples: + + | test_description | case_number | + | Unpause case 4, created in this script | 4 | + + +Scenario: Executes a ProcessMaker trigger for a case + Given PUT this data: + """ + { + + } + """ + And I request "cases//execute-trigger/{tri_uid}" + Then the response status code should be 200 + And the content type is "application/json" + And the response charset is "UTF-8" + And the type is "object" + And that I want to update a resource with the key "case_number" stored in session array as variable "caseNumber_" + And that I want to update a resource with the key "caseId" stored in session array as variable "caseId_" + + + Examples: + + | test_description | case_number | + | | | + + +Scenario: Delete a case + Given PUT this data: + """ + { + + } + """ + And I request "cases/" + Then the response status code should be 200 + And the content type is "application/json" + And the response charset is "UTF-8" + And the type is "object" + And that I want to update a resource with the key "case_number" stored in session array as variable "caseNumber_" + And that I want to update a resource with the key "caseId" stored in session array as variable "caseId_" + + + Examples: + + | test_description | case_number | + | Delete a case 1, created in this script | 1 | + | Delete a case 2, created in this script | 2 | + | Delete a case 3, created in this script | 3 | + | Delete a case 4, created in this script | 4 | + + +#Listado de casos +Scenario: Returns a list of the cases for the logged in user (Inbox) + Given I request "cases" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 14 records + + +Scenario: Returns a list of the cases for the logged in user (Draft) + Given I request "cases/draft" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 15 records + + +Scenario: Returns a list of the cases for the logged in user (Participated) + Given I request "cases/participated" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 30 records + + +Scenario: Returns a list of the cases for the logged in user (Unassigned) + Given I request "cases/unassigned" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 12 records + + +Scenario: Returns a list of the cases for the logged in user (Paused) + Given I request "cases/paused" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 12 records \ No newline at end of file diff --git a/features/backend/application_cases/case_actions/main_tests_cases_actions.feature b/features/backend/application_cases/case_actions/main_tests_cases_actions.feature index 089cb3643..cac5b2773 100644 --- a/features/backend/application_cases/case_actions/main_tests_cases_actions.feature +++ b/features/backend/application_cases/case_actions/main_tests_cases_actions.feature @@ -6,6 +6,48 @@ Requirements: Background: Given that I have a valid access_token + +#Listado de casos +Scenario: Returns a list of the cases for the logged in user (Inbox) + Given I request "cases" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 14 records + + +Scenario: Returns a list of the cases for the logged in user (Draft) + Given I request "cases/draft" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 15 records + + +Scenario: Returns a list of the cases for the logged in user (Participated) + Given I request "cases/participated" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 30 records + + +Scenario: Returns a list of the cases for the logged in user (Unassigned) + Given I request "cases/unassigned" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 12 records + + +Scenario: Returns a list of the cases for the logged in user (Paused) + Given I request "cases/paused" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 12 records + + Scenario: Returns information about a given case of the list Inbox Given I request "cases/48177942153275bfa28bd04070312685" Then the response status code should be 200 diff --git a/features/backend/application_cases/cases_lists_1-6/main_tests_cases_lists_1_6.feature b/features/backend/application_cases/cases_lists_1-6/main_tests_cases_lists_1_6.feature index f11edc16e..4bc362d16 100644 --- a/features/backend/application_cases/cases_lists_1-6/main_tests_cases_lists_1_6.feature +++ b/features/backend/application_cases/cases_lists_1-6/main_tests_cases_lists_1_6.feature @@ -59,21 +59,21 @@ Scenario: Returns a list of the cases for the logged in user (Advanced-Search) -#Scenarios para filtros y paginacion de las listas +#Scenarios para filtros y paginacion en listas Scenario Outline: Get paging of list inbox - Given I request "cases/paged?Start=&limit=" + Given I request "cases/paged?start=&limit=" Then the response status code should be And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: | test_description | start | limit | records | http_code | - | lowercase in Start | a | 1 | 1 | 200 | - | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in start | a | 1 | 1 | 200 | + | uppercase in start | A | 1 | 1 | 200 | | lowercase in Limit | 1 | a | 14 | 200 | | uppercase in Limit | 1 | A | 14 | 200 | | limit=3 | 1 | 3 | 3 | 200 | @@ -104,7 +104,7 @@ Scenario Outline: Get order type of Descending and Acending And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -119,7 +119,7 @@ Scenario Outline: Get order type of Process Category And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -134,7 +134,7 @@ Scenario Outline: Get order type of Process And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -149,7 +149,7 @@ Scenario Outline: Get order type of Search of number the process And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -167,18 +167,18 @@ Scenario: Returns a list of the cases for the logged in user (Draft) Scenario Outline: Get paging of list Draft - Given I request "cases/draft/paged?Start=&limit=" + Given I request "cases/draft/paged?start=&limit=" Then the response status code should be And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: | test_description | start | limit | records | http_code | - | lowercase in Start | a | 1 | 1 | 200 | - | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in start | a | 1 | 1 | 200 | + | uppercase in start | A | 1 | 1 | 200 | | lowercase in Limit | 1 | a | 15 | 200 | | uppercase in Limit | 1 | A | 15 | 200 | | limit=3 | 1 | 3 | 3 | 200 | @@ -209,7 +209,7 @@ Scenario Outline: Get order type of Descending and Ascending And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -225,7 +225,7 @@ Scenario Outline: Get order type of Process Category And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -240,7 +240,7 @@ Scenario Outline: Get order type of Process And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -255,7 +255,7 @@ Scenario Outline: Get order type of Search of the process And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -272,18 +272,18 @@ Scenario: Returns a list of the cases for the logged in user (Participated) And the response has 30 records Scenario Outline: Get paging of list Participated - Given I request "cases/participated/paged?Start=&limit=" + Given I request "cases/participated/paged?start=&limit=" Then the response status code should be And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: | test_description | start | limit | records | http_code | - | lowercase in Start | a | 1 | 1 | 200 | - | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in start | a | 1 | 1 | 200 | + | uppercase in start | A | 1 | 1 | 200 | | lowercase in Limit | 1 | a | 30 | 200 | | uppercase in Limit | 1 | A | 30 | 200 | | limit=3 | 1 | 3 | 3 | 200 | @@ -314,7 +314,7 @@ Scenario Outline: Get order type of Descending an Descending And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -330,7 +330,7 @@ Scenario Outline: Get order type of Process Category And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -345,7 +345,7 @@ Scenario Outline: Get order type of Process And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -361,7 +361,7 @@ Scenario Outline: Get order type of Search And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -379,18 +379,18 @@ Scenario: Returns a list of the cases for the logged in user (Unassigned) Scenario Outline: Get paging of list Unassigned - Given I request "cases/Unassigned/paged?Start=&limit=" + Given I request "cases/Unassigned/paged?start=&limit=" Then the response status code should be And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: | test_description | start | limit | records | http_code | - | lowercase in Start | a | 1 | 1 | 200 | - | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in start | a | 1 | 1 | 200 | + | uppercase in start | A | 1 | 1 | 200 | | lowercase in Limit | 1 | a | 12 | 200 | | uppercase in Limit | 1 | A | 12 | 200 | | limit=3 | 1 | 3 | 3 | 200 | @@ -421,7 +421,7 @@ Scenario Outline: Get order type of Descending and Acending And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -436,7 +436,7 @@ Scenario Outline: Get order type of Process Category And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -451,7 +451,7 @@ Scenario Outline: Get order type of Process And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -466,7 +466,7 @@ Scenario Outline: Get order type of Search And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -485,18 +485,18 @@ Scenario: Returns a list of the cases for the logged in user (Paused) Scenario Outline: Get paging of list Paused - Given I request "cases/paused/paged?Start=&limit=" + Given I request "cases/paused/paged?start=&limit=" Then the response status code should be And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: | test_description | start | limit | records | http_code | - | lowercase in Start | a | 1 | 1 | 200 | - | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in start | a | 1 | 1 | 200 | + | uppercase in start | A | 1 | 1 | 200 | | lowercase in Limit | 1 | a | 12 | 200 | | uppercase in Limit | 1 | A | 12 | 200 | | limit=3 | 1 | 3 | 3 | 200 | @@ -527,7 +527,7 @@ Scenario Outline: Get order type of Descending and Acending And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -542,7 +542,7 @@ Scenario Outline: Get order type of Process Category And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -557,7 +557,7 @@ Scenario Outline: Get order type of Process And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -572,7 +572,7 @@ Scenario Outline: Get order type of Search And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -590,18 +590,18 @@ Scenario: Returns a list of the cases for the logged in user (Advanced Search) Scenario Outline: Get paging of list Advanced Search - Given I request "cases/advanced-search/paged?Start=&limit=" + Given I request "cases/advanced-search/paged?start=&limit=" Then the response status code should be And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: | test_description | start | limit | records | http_code | - | lowercase in Start | a | 1 | 1 | 200 | - | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in start | a | 1 | 1 | 200 | + | uppercase in start | A | 1 | 1 | 200 | | lowercase in Limit | 1 | a | 30 | 200 | | uppercase in Limit | 1 | A | 30 | 200 | | limit=3 | 1 | 3 | 3 | 200 | @@ -632,7 +632,7 @@ Scenario Outline: Get order type of Descending and Acending And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -647,7 +647,7 @@ Scenario Outline: Get order type of Process Category And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -663,7 +663,7 @@ Scenario Outline: Get order type of Process And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -679,7 +679,7 @@ Scenario Outline: Get order type of Search And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -694,7 +694,7 @@ Scenario Outline: Get order for Status And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -711,7 +711,7 @@ Scenario Outline: Get order for User And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: @@ -728,7 +728,7 @@ Scenario Outline: Get order for date And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has records in property "data" + And the response has records Examples: diff --git a/features/backend/application_cases/cases_lists_1-6/negative_tests_cases_lists_1_6.feature b/features/backend/application_cases/cases_lists_1-6/negative_tests_cases_lists_1_6.feature index bb386ba8f..99a86a625 100644 --- a/features/backend/application_cases/cases_lists_1-6/negative_tests_cases_lists_1_6.feature +++ b/features/backend/application_cases/cases_lists_1-6/negative_tests_cases_lists_1_6.feature @@ -9,38 +9,38 @@ Scenario: Returns a list of the cases for the logged in user (Inbox) Given I request "cases" Then the response status code should be 400 And the response has 4 records - And the response status message should have the following text "" + And the response status message should have the following text "Records" Scenario: Returns a list of the cases for the logged in user (Draft) Given I request "cases/draft" Then the response status code should be 400 And the response has 4 records - And the response status message should have the following text "" + And the response status message should have the following text "Records" Scenario: Returns a list of the cases for the logged in user (Participated) Given I request "cases/participated" Then the response status code should be 400 And the response has 4 records - And the response status message should have the following text "" + And the response status message should have the following text "Records" Scenario: Returns a list of the cases for the logged in user (Unassigned) Given I request "cases/unassigned" Then the response status code should be 400 And the response has 4 records - And the response status message should have the following text "" + And the response status message should have the following text "Records" Scenario: Returns a list of the cases for the logged in user (Paused) Given I request "cases/paused" Then the response status code should be 400 And the response has 4 records - And the response status message should have the following text "" + And the response status message should have the following text "Records" Scenario: Returns a list of the cases for the logged in user (Advanced Search) Given I request "cases/advanced-search" Then the response status code should be 400 And the response has 4 records - And the response status message should have the following text "" \ No newline at end of file + And the response status message should have the following text "Records" \ No newline at end of file From adee81e1acdc80a0d79ce26df643623f92e3427e Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Wed, 2 Apr 2014 17:23:31 -0400 Subject: [PATCH 03/11] Moving Extension\Restler\UploadFormat class --- .../Extension/Restler/UploadFormat.php | 0 framework/src/Maveriks/WebApplication.php | 29 +++++++------------ 2 files changed, 11 insertions(+), 18 deletions(-) rename {workflow/engine/src => framework/src/Maveriks}/Extension/Restler/UploadFormat.php (100%) diff --git a/workflow/engine/src/Extension/Restler/UploadFormat.php b/framework/src/Maveriks/Extension/Restler/UploadFormat.php similarity index 100% rename from workflow/engine/src/Extension/Restler/UploadFormat.php rename to framework/src/Maveriks/Extension/Restler/UploadFormat.php diff --git a/framework/src/Maveriks/WebApplication.php b/framework/src/Maveriks/WebApplication.php index 81e13a50d..eb95f5e4a 100644 --- a/framework/src/Maveriks/WebApplication.php +++ b/framework/src/Maveriks/WebApplication.php @@ -2,6 +2,7 @@ namespace Maveriks; use Maveriks\Util; +use ProcessMaker\Services; class WebApplication { @@ -141,6 +142,8 @@ class WebApplication */ header('Access-Control-Allow-Origin: *'); + require_once $this->rootDir . "framework/src/Maveriks/Extension/Restler/UploadFormat.php"; + // $servicesDir contains directory where Services Classes are allocated $servicesDir = $this->workflowDir . 'engine' . DS . 'src' . DS . 'ProcessMaker' . DS . 'Services' . DS; // $apiDir - contains directory to scan classes and add them to Restler @@ -161,9 +164,7 @@ class WebApplication } // Setting current workspace to Api class - \ProcessMaker\Services\Api::setWorkspace(SYS_SYS); - // TODO remove this setting on the future, it is not needed, but if it is not present is throwing a warning - //\Luracast\Restler\Format\HtmlFormat::$viewPath = $servicesDir . 'oauth2/views'; + Services\Api::setWorkspace(SYS_SYS); // create a new Restler instance //$rest = new \Luracast\Restler\Restler(); @@ -179,20 +180,13 @@ class WebApplication // Setting database connection source list($host, $port) = strpos(DB_HOST, ':') !== false ? explode(':', DB_HOST) : array(DB_HOST, ''); $port = empty($port) ? '' : ";port=$port"; - \ProcessMaker\Services\OAuth2\Server::setDatabaseSource(DB_USER, DB_PASS, DB_ADAPTER.":host=$host;dbname=".DB_NAME.$port); + Services\OAuth2\Server::setDatabaseSource(DB_USER, DB_PASS, DB_ADAPTER.":host=$host;dbname=".DB_NAME.$port); // Setting default OAuth Client id, for local PM Web Designer - \ProcessMaker\Services\OAuth2\Server::setPmClientId($pmOauthClientId); + Services\OAuth2\Server::setPmClientId($pmOauthClientId); - require_once $this->workflowDir . "engine/src/Extension/Restler/UploadFormat.php"; - //require_once PATH_CORE - - //$rest->setSupportedFormats('JsonFormat', 'XmlFormat', 'UploadFormat'); - //$rest->setOverridingFormats('UploadFormat', 'JsonFormat', 'XmlFormat', 'HtmlFormat'); $rest->setOverridingFormats('JsonFormat', 'UploadFormat'); - // Override $_SERVER['REQUEST_URI'] to Restler handles the current url correctly - $isPluginRequest = strpos($uri, '/plugin-') !== false ? true : false; if ($isPluginRequest) { @@ -204,6 +198,7 @@ class WebApplication $uri = str_replace('/plugin-'.$pluginName, '', $uri); } + // Override $_SERVER['REQUEST_URI'] to Restler handles the modified url $_SERVER['REQUEST_URI'] = $uri; if (! $isPluginRequest) { // if it is not a request for a plugin endpoint @@ -213,17 +208,15 @@ class WebApplication foreach ($classesList as $classFile) { if (pathinfo($classFile, PATHINFO_EXTENSION) === 'php') { $namespace = '\\ProcessMaker\\Services\\' . str_replace( - DIRECTORY_SEPARATOR, - '\\', - str_replace('.php', '', str_replace($servicesDir, '', $classFile)) - ); - //var_dump($namespace); die; + DIRECTORY_SEPARATOR, + '\\', + str_replace('.php', '', str_replace($servicesDir, '', $classFile)) + ); $rest->addAPIClass($namespace); } } // adding aliases for Restler - //print_r($apiIniConf); if (array_key_exists('alias', $apiIniConf)) { foreach ($apiIniConf['alias'] as $alias => $aliasData) { if (is_array($aliasData)) { From a50bb11e5c907c7ea2bc355c16a54c7c17fe056b Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Wed, 2 Apr 2014 18:08:34 -0400 Subject: [PATCH 04/11] Routine to cache api.ini file to .php file to improve the performace to API Responses --- framework/src/Maveriks/WebApplication.php | 31 ++++++++++++++++++----- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/framework/src/Maveriks/WebApplication.php b/framework/src/Maveriks/WebApplication.php index eb95f5e4a..8d645659f 100644 --- a/framework/src/Maveriks/WebApplication.php +++ b/framework/src/Maveriks/WebApplication.php @@ -8,6 +8,8 @@ class WebApplication { protected $rootDir = ""; protected $workflowDir = ""; + protected $workspaceDir = ""; + protected $workspaceCacheDir = ""; protected $requestUri = ""; protected $responseMultipart = array(); @@ -85,7 +87,7 @@ class WebApplication } else { $this->dispatchApiRequest($request["uri"], $request["version"]); } - Util\Logger::log("API::End Dispatching ".$_SERVER["REQUEST_METHOD"]." ".$request["uri"]); + Util\Logger::log("API::End Dispatch"); break; } } @@ -158,9 +160,23 @@ class WebApplication /* * Load Api ini file for Rest Service */ - $apiIniConf = array(); + $config = array(); + if (file_exists($apiIniFile)) { - $apiIniConf = Util\Common::parseIniFile($apiIniFile); + $cachedConfig = $this->workspaceCacheDir . "api-config.php"; + + // verify if config cache file exists, is array and the last modification date is the same when cache was created. + if (! file_exists($cachedConfig) || ! is_array($config = include($cachedConfig)) || $config["_chk"] != filemtime($apiIniFile)) { + $config = Util\Common::parseIniFile($apiIniFile); + $config["_chk"] = filemtime($apiIniFile); + if (! is_dir(dirname($cachedConfig))) { + Util\Common::mk_dir(dirname($cachedConfig)); + } + file_put_contents($cachedConfig, " $aliasData) { + if (array_key_exists('alias', $config)) { + foreach ($config['alias'] as $alias => $aliasData) { if (is_array($aliasData)) { foreach ($aliasData as $label => $namespace) { $namespace = '\\' . ltrim($namespace, '\\'); @@ -373,7 +389,10 @@ class WebApplication require_once (PATH_DB . SYS_SYS . "/db.php"); // defining constant for workspace shared directory - define("PATH_WORKSPACE", PATH_DB . SYS_SYS . PATH_SEP); + $this->workspaceDir = PATH_DB . SYS_SYS . PATH_SEP; + $this->workspaceCacheDir = PATH_DB . SYS_SYS . PATH_SEP . "cache" . PATH_SEP; + + define("PATH_WORKSPACE", $this->workspaceDir); // including workspace shared classes -> particularlly for pmTables set_include_path(get_include_path() . PATH_SEPARATOR . PATH_WORKSPACE); From 20fadab8d971df7cf40592e5f007492678d87594 Mon Sep 17 00:00:00 2001 From: Daniel Rojas Date: Thu, 3 Apr 2014 09:14:39 -0400 Subject: [PATCH 05/11] Se agrega test unit para PROCESS CATEGORY --- .../engine/src/Tests/BusinessModel/ProcessCategoryTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php b/workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php index 2bbddc314..f0a1a3e25 100644 --- a/workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php +++ b/workflow/engine/src/Tests/BusinessModel/ProcessCategoryTest.php @@ -8,7 +8,7 @@ if (!class_exists("Propel")) { /** * Class ProcessCategoryTest * - * @package Tests\BusinessModel + * @package Tests/ProcessMaker/BusinessModel */ class ProcessCategoryTest extends \PHPUnit_Framework_TestCase { @@ -24,7 +24,7 @@ class ProcessCategoryTest extends \PHPUnit_Framework_TestCase */ public function setUp() { - $this->oCategory = new \BusinessModel\ProcessCategory(); + $this->oCategory = new \ProcessMaker\BusinessModel\ProcessCategory(); } From 3e2420bc55daa33e7bfa7c8d112c46be24cb82ca Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Thu, 3 Apr 2014 10:22:37 -0400 Subject: [PATCH 06/11] Arreglos en cases actions, case note, case variables y output document --- .../basic_sequence_cases_actions.feature | 32 ++++++----- .../case_note/main_tests_case_note.feature | 3 +- .../main_tests_case_variables.feature | 5 +- .../negative_tests_case_variables.feature | 56 +------------------ ...egative_tests_output_document_case.feature | 9 +++ 5 files changed, 29 insertions(+), 76 deletions(-) diff --git a/features/backend/application_cases/case_actions/basic_sequence_cases_actions.feature b/features/backend/application_cases/case_actions/basic_sequence_cases_actions.feature index bcb72e222..c9d78e232 100644 --- a/features/backend/application_cases/case_actions/basic_sequence_cases_actions.feature +++ b/features/backend/application_cases/case_actions/basic_sequence_cases_actions.feature @@ -121,7 +121,7 @@ Scenario: Returns a list of the cases for the logged in user (Draft) Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And the response has 17 records + And the response has 18 records Scenario Outline: Reassigns a case to a different user, from user "administrator" to user "aaron" @@ -129,10 +129,10 @@ Scenario Outline: Reassigns a case to a different user, from user "administrator """ { "usr_uid_source": "00000000000000000000000000000001", - "usr_uid_target": "51049032352d56710347233042615067", + "usr_uid_target": "51049032352d56710347233042615067" } """ - And I request "cases//reassign-case" with the key "app_uid" stored in session array as variable "app_uid_" + And I request "cases/app_uid/reassign-case" with the key "app_uid" stored in session array as variable "app_uid_" Then the response status code should be 200 And the content type is "application/json" And the response charset is "UTF-8" @@ -145,7 +145,7 @@ Scenario Outline: Reassigns a case to a different user, from user "administrator | Reassig case 1, created in this script | 1 | -Scenario: Route a case to the next task in the process +Scenario Outline: Route a case to the next task in the process Given PUT this data: """ { @@ -153,7 +153,7 @@ Scenario: Route a case to the next task in the process "del_index": "1" } """ - And I request "cases//route-case" with the key "app_uid" stored in session array as variable "app_uid_" + And I request "cases/app_uid/route-case" with the key "app_uid" stored in session array as variable "app_uid_" Then the response status code should be 200 And the content type is "application/json" And the response charset is "UTF-8" @@ -167,14 +167,14 @@ Scenario: Route a case to the next task in the process -Scenario: Cancel a case +Scenario Outline: Cancel a case Given PUT this data: """ { } """ - And I request "cases//cancel" with the key "app_uid" stored in session array as variable "app_uid_" + And I request "cases/app_uid/cancel" with the key "app_uid" stored in session array as variable "app_uid_" Then the response status code should be 200 And the content type is "application/json" And the response charset is "UTF-8" @@ -187,14 +187,14 @@ Scenario: Cancel a case | Cancel case 3, created in this script | 3 | -Scenario: Pause a case +Scenario Outline: Pause a case Given PUT this data: """ { "unpaused_date": "2016-12-12" } """ - And I request "cases//pause" with the key "app_uid" stored in session array as variable "app_uid_" + And I request "cases/app_uid/pause" with the key "app_uid" stored in session array as variable "app_uid_" Then the response status code should be 200 And the content type is "application/json" And the response charset is "UTF-8" @@ -207,14 +207,14 @@ Scenario: Pause a case | Pause case 4, created in this script | 4 | -Scenario: Unpause a case +Scenario Outline: Unpause a case Given PUT this data: """ { } """ - And I request "cases//unpause" with the key "app_uid" stored in session array as variable "app_uid_" + And I request "cases/app_uid/unpause" with the key "app_uid" stored in session array as variable "app_uid_" Then the response status code should be 200 And the content type is "application/json" And the response charset is "UTF-8" @@ -227,14 +227,14 @@ Scenario: Unpause a case | Unpause case 4, created in this script | 4 | -Scenario: Executes a ProcessMaker trigger for a case +Scenario Outline: Executes a ProcessMaker trigger for a case Given PUT this data: """ { } """ - And I request "cases//execute-trigger/" with the key "app_uid" stored in session array as variable "app_uid_" + And I request "cases/app_uid/execute-trigger/" with the key "app_uid" stored in session array as variable "app_uid_" Then the response status code should be 200 And the content type is "application/json" And the response charset is "UTF-8" @@ -247,19 +247,21 @@ Scenario: Executes a ProcessMaker trigger for a case | Ejecucion de trigger | 5 | 54962158250ec613ba5bc89016850103 | -Scenario: Delete a case +Scenario Outline: Delete a case Given PUT this data: """ { } """ + + And that I want to delete a resource with the key "app_uid" stored in session array as variable "app_uid_" And I request "cases" Then the response status code should be 200 And the content type is "application/json" And the response charset is "UTF-8" And the type is "object" - And that I want to delete a resource with the key "app_uid" stored in session array as variable "app_uid_" + Examples: diff --git a/features/backend/application_cases/case_note/main_tests_case_note.feature b/features/backend/application_cases/case_note/main_tests_case_note.feature index 3d2c6c233..d0268b94e 100644 --- a/features/backend/application_cases/case_note/main_tests_case_note.feature +++ b/features/backend/application_cases/case_note/main_tests_case_note.feature @@ -26,5 +26,4 @@ Scenario: Create a new case note for specified case Then the response status code should be 201 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" - \ No newline at end of file + And the type is "object" \ No newline at end of file diff --git a/features/backend/application_cases/case_variables/main_tests_case_variables.feature b/features/backend/application_cases/case_variables/main_tests_case_variables.feature index 4fcfa9613..528f33be3 100644 --- a/features/backend/application_cases/case_variables/main_tests_case_variables.feature +++ b/features/backend/application_cases/case_variables/main_tests_case_variables.feature @@ -46,10 +46,7 @@ Scenario: Returns the variables can be system variables and/or case variables. And the "date3" property equals "2014-03-03" And the "date4" property equals "2014-03-01" And the "suggest2" property equals "51049032352d56710347233042615067" - And the "suggest2_label" property equals "aaron" - - - + And the "suggest2_label" property equals "aaron" And the "sample" property in row 1 of property "grid" equals "jose" And the "currency1" property equals "12,334,444.00" And the "percentage1" property equals "333.00 %" diff --git a/features/backend/application_cases/case_variables/negative_tests_case_variables.feature b/features/backend/application_cases/case_variables/negative_tests_case_variables.feature index 3dfdc81ca..c47891fdb 100644 --- a/features/backend/application_cases/case_variables/negative_tests_case_variables.feature +++ b/features/backend/application_cases/case_variables/negative_tests_case_variables.feature @@ -38,58 +38,4 @@ Scenario: Sends variables to a case (negative tests) Then the response status code should be 200 And the content type is "application/json" And the response charset is "UTF-8" - And the type is "object" - - - - 18130826553359171798e40060879912 - - "nameany": "wendy344%", - "namealphabetic": "nestor123", - "namealphanumeric": "rad1233$%", - "nameinteger": "342432,7", - "namerealnumber": "35353", - "nameemail": "wendycolosacom", - "namelogin": "sample", - "valorreal": "242343253,253.00", - "valorinteger": "346436363", - "porcentagereal": "64600", - "porcentageinteger": "464", - "observaciones": "ninguna", - "areascolosa": "sample", - "areascolosa_label": "sample", - "COUNTRY": "BOA", - "COUNTRY_label": "Bolivia", - "STATE": "aH", - "STATE_label": "Chuquisaca", - "LOCATION": "SRE", - "LOCATION_label": "Sucre", - "aprobado": "20", - "aprobadohint": "0", - "checkbox1": "sample", - "checkbox2": "oki", - "checkbox3": "Off", - "radiogroup1": "hola", - "radiogroup1_label": "Primero", - "date1": "hola", - "date2": "2013-11-08", - "date3": "2014-03-09", - "date4": "2014-03-02", - "suggest2": "51049032352d56710347233042615067", - "suggest2_label": "sample", - "grid": { - "1": { - "sample": "hugo", - "currency1": "2,424,234.00", - "percentage1": "354.00 %", - "suggest1_label": "dorothy", - "suggest1": "81205219852d56719a97fc3086456770", - "textarea1": "ninguno", - "dropdown1": "uno", - "yesno1": "0", - "checkbox1": "On", - "date1": "2014-03-20", - "link1": "http://www.google.com/", - "link1_label": "link1", - "file1": "Tuesday.docx", - "dropdown1_label": "uno" \ No newline at end of file + And the type is "object" \ No newline at end of file diff --git a/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature b/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature index e9e8713aa..4d3b0aec7 100644 --- a/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature +++ b/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature @@ -1,3 +1,12 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Output Documents cases Main Tests +Requirements: + a workspace with one case of the process "Test Output Document Case" + and there are six Output Documents in the process + +Background: + Given that I have a valid access_token + Scenario Outline: Pull information of an inexistent input document. should return an error Given I request "cases/64654381053382b8bb4c415067063003/input-document/" Then the response status code should be 200 From 4db659ff8b0a4e12f741a54ce96003e434619ede Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Thu, 3 Apr 2014 10:30:47 -0400 Subject: [PATCH 07/11] Updating phpunit execution task on build.xml for jenkins --- build.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 9377409c4..cfb6cc966 100644 --- a/build.xml +++ b/build.xml @@ -122,7 +122,9 @@ - + + + From 3160985f3335f43ef19f5bebdafde00ba1fb4530 Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Thu, 3 Apr 2014 10:35:17 -0400 Subject: [PATCH 08/11] Error de sintaxis en case note --- .../case_note/negative_tests_case_note.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/backend/application_cases/case_note/negative_tests_case_note.feature b/features/backend/application_cases/case_note/negative_tests_case_note.feature index aa92b5d44..9000c45e0 100644 --- a/features/backend/application_cases/case_note/negative_tests_case_note.feature +++ b/features/backend/application_cases/case_note/negative_tests_case_note.feature @@ -1,4 +1,4 @@ -ProcessMakerMichelangelo @RestAPI +@ProcessMakerMichelangelo @RestAPI Feature: Case Note Negative Tests Requirements: a workspace with three cases of the process "Test Users-Step-Properties End Point" From 193c090451e298c26043f799c627563419d92020 Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Thu, 3 Apr 2014 11:09:54 -0400 Subject: [PATCH 09/11] error de sintaxis en output document cases --- .../basic_sequence_output_document_case.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/backend/application_cases/output_document_case/basic_sequence_output_document_case.feature b/features/backend/application_cases/output_document_case/basic_sequence_output_document_case.feature index 74db0a059..eaf808238 100644 --- a/features/backend/application_cases/output_document_case/basic_sequence_output_document_case.feature +++ b/features/backend/application_cases/output_document_case/basic_sequence_output_document_case.feature @@ -41,7 +41,7 @@ Scenario: Generate or regenerates an output documents for a given case Scenario: Delete an uploaded or generated document from a case. And that I want to delete a resource with the key "app_doc_uid_0" stored in session array - Gie I request "output-document" + Given I request "output-document" Then the response status code should be 200 And the content type is "application/json" And the response charset is "UTF-8" From 1847ed4549a2fbce01b30472c67f18f42717074d Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Thu, 3 Apr 2014 11:18:57 -0400 Subject: [PATCH 10/11] Updating phpunit execution task on build.xml for jenkins --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index cfb6cc966..4d81eee93 100644 --- a/build.xml +++ b/build.xml @@ -2,7 +2,7 @@ + depends="prepare,lint,phploc,pdepend,phpcs-ci,phpunit,phpdox,behat"/> From a43c1d36c433d6237dff8cdb4e4fad8a7a40ac8c Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Thu, 3 Apr 2014 12:06:52 -0400 Subject: [PATCH 11/11] Updating build.xml and phpunit.xml to add and run API unit tests suite --- build.xml | 5 ++++- phpunit.xml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 4d81eee93..bac41ff99 100644 --- a/build.xml +++ b/build.xml @@ -123,7 +123,10 @@ - + + + + diff --git a/phpunit.xml b/phpunit.xml index d3ed5e4d7..a5de70e63 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -20,6 +20,9 @@ ./tests/unit/ --> + + ./workflow/engine/src/ +