From 5ab1eb19d9e7a6076f085cac5363ac4d870abf8d Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Wed, 2 Apr 2014 09:07:48 -0400 Subject: [PATCH 1/5] Avance de los features cases actions, cases list, input document y output document --- .../main_tests_cases_actions.feature | 3 +- .../main_tests_cases_lists_1_6.feature | 594 +++++++++--------- .../main_tests_input_document_case.feature | 69 +- ...egative_tests_output_document_case.feature | 19 + features/bootstrap/RestContext.php | 14 +- workflow/public_html/testInput.php | 6 +- 6 files changed, 357 insertions(+), 348 deletions(-) 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 8b74321b6..089cb3643 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 @@ -260,5 +260,4 @@ Scenario Outline: Delete of the cases created in this script. | 7 | | 8 | | 9 | - | 10 | - + | 10 | \ No newline at end of file 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 e4fce90d8..55d4d995d 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 @@ -1,7 +1,8 @@ @ProcessMakerMichelangelo @RestAPI Feature: Cases Actions - the features in this script are (inbox, draftCaseList, participatedCaseList, unassignedCaseList, pausedCaseList and advanced Search) and (getCaseInfo, taskCase, newCase, newCaseImpersonate, reassignCase and routeCase) Requirements: - a workspace with five of the process "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection", "Derivation rules - sequential" + a workspace with five of the process "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection", + "Derivation rules - sequential, Test Case Note, Test Case Note - Negative test, Test Case Variables, Test Designer Report Tables, Test Input Document Case, Test Michelangelo, Test Output Document Case" Background: Given that I have a valid access_token @@ -14,7 +15,7 @@ Scenario: Returns a list of the cases for the logged in user (Inbox) Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And store response count in session variable as "count_inbox" + And the response has 14 records Scenario: Returns a list of the cases for the logged in user (Draft) @@ -22,7 +23,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 store response count in session variable as "count_draft" + And the response has 15 records Scenario: Returns a list of the cases for the logged in user (Participated) @@ -30,7 +31,7 @@ Scenario: Returns a list of the cases for the logged in user (Participated) Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And store response count in session variable as "count_participated" + And the response has 57 records Scenario: Returns a list of the cases for the logged in user (Unassigned) @@ -38,7 +39,7 @@ Scenario: Returns a list of the cases for the logged in user (Unassigned) Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And store response count in session variable as "count_unassigned" + And the response has 12 records Scenario: Returns a list of the cases for the logged in user (Paused) @@ -46,41 +47,15 @@ Scenario: Returns a list of the cases for the logged in user (Paused) Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And store response count in session variable as "count_paused" + And the response has 12 records Scenario: Returns a list of the cases for the logged in user (Advanced-Search) - Given I request "cases/paused" + Given I request "cases/advanced-search" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And store response count in session variable as "count_advanced-search" - - -Scenario Outline: Create a new case in workspace with process "Derivation rules - sequential", "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection" - Given POST this data: - """ - { - "pro_uid": "", - "tas_uid": "", - "variables": [{"name": "admin", "lastname":"admin"}] - } - """ - And I request "cases" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the content type is "application/json" - And the type is "object" - And store "app_uid" in session array as variable "app_uid_" - And store "app_number" in session array as variable "app_number_" - - Examples: - | Description | app_uid_number | pro_uid | tas_uid | variables | - | Create new case with process "Derivation rules - sequential" | 1 | 99209594750ec27ea338927000421575 | 68707275350ec281ada1c95068712556 | | - | Create new case with process "Derivation rules - evaluation" | 2 | 46279907250ec73b9b25a78031279680 | 99371337850ec73c0a38eb6024620271 | | - | Create new case with process "Derivation rules - Parallel" | 3 | 35894775350ec7daa099378048029617 | 52838134750ec7dd0989fc0015625952 | | - | Create new case with process "Derivation rules - parallel evaluation" | 4 | 34579467750ec8d55e8b115057818502 | 89648437550ec8d593c2159010276089 | | - | Create new case with process "Derivation rules - selection" | 5 | 82458496050ec668981ecc7039804404 | 56900024450ec668e4a9243080698854 | | + And the response has 25 records @@ -90,37 +65,37 @@ Scenario Outline: Get paging of list inbox 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 "" - And the response has records more than "" + And the type is "array" + And the response has records in property "data" - Examples: + Examples: - | test_description | start | limit | records | http_code | type | - | lowercase in Start | a | 1 | 0 | 400 | string | - | uppercase in Start | A | 1 | 0 | 400 | string | - | lowercase in Limit | 1 | a | 0 | 400 | string | - | uppercase in Limit | 1 | A | 0 | 400 | string | - | limit=3 | 1 | 3 | 3 | 200 | array | - | start=3 | 3 | 5 | 3 | 200 | array | - | limit and start =3 | 3 | 3 | 1 | 200 | array | - | high number for start | 1000 | 1 | 0 | 200 | array | - | high number for start | 1000 | 0 | 0 | 200 | array | - | empty result | 1 | 0 | 1 | 200 | array | - | empty string | 1 | 10000 | 1 | 200 | array | - | invalid start | b | 25 | 0 | 400 | string | - | invalid limit | 1 | c | 0 | 400 | string | - | start equals zero | 0 | 20 | 20 | 200 | array | - | search 0 | 0 | 0 | 0 | 200 | array | - | search 0 | 0 | 100 | 100 | 200 | array | - | negative numbers in start | -10 | 25 | 25 | 200 | array | - | negative numbers in limit | 1 | -25 | 25 | 200 | array | - | real numbers | 0.0 | 1.0 | 0 | 400 | string | - | real numbers in start | 0.0 | 25 | 0 | 400 | string | - | real numbers in limit | 1 | 1.4599 | 0 | 400 | string | - | only start | 1 | | 1 | 200 | array | - | only limit | | 25 | 1 | 200 | array | - | without start and limit | | | 1 | 200 | array | + | test_description | start | limit | records | http_code | + | lowercase in Start | a | 1 | 1 | 200 | + | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in Limit | 1 | a | 1 | 200 | + | uppercase in Limit | 1 | A | 1 | 200 | + | limit=3 | 1 | 3 | 3 | 200 | + | start=3 | 3 | 5 | 3 | 200 | + | limit and start =3 | 3 | 3 | 1 | 200 | + | high number for start | 1000 | 1 | 0 | 200 | + | high number for start | 1000 | 0 | 0 | 200 | + | empty result | 1 | 0 | 1 | 200 | + | empty string | 1 | 10000 | 14 | 200 | + | invalid start | b | 25 | 14 | 200 | + | invalid limit | 1 | c | 1 | 200 | + | start equals zero | 0 | 20 | 14 | 200 | + | search 0 | 0 | 0 | 0 | 200 | + | search 0 | 0 | 100 | 14 | 200 | + | negative numbers in start | -10 | 25 | 14 | 200 | + | negative numbers in limit | 1 | -25 | 1 | 200 | + | real numbers | 0.0 | 1.0 | 1 | 200 | + | real numbers in start | 0.0 | 12 | 12 | 200 | + | real numbers in limit | 1 | 1.4599 | 1 | 200 | + | only start | 1 | | 1 | 200 | + | only limit | | 25 | 1 | 200 | + | without start and limit | | | 1 | 200 | Scenario Outline: Get order type of Descending and Acending @@ -129,13 +104,13 @@ 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 more than "" + And the response has records in property "data" Examples: | test_description | dir | records | | Order for Acending | asc | 1 | - | Order for Descending | desc | 1 | + | Order for Descending | desc | 2 | Scenario Outline: Get order type of Process Category @@ -144,13 +119,13 @@ 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 more than "" + And the response has records in property "data" Examples: | test_description | cat_uid | records | | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 1 | - | Filter all categories | | | + | Filter all categories | | 14 | Scenario Outline: Get order type of Process @@ -159,13 +134,13 @@ 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 more than "" + And the response has records in property "data" Examples: | test_description | pro_uid | records | - | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 1 | + | Filter all cases | | 14 | Scenario Outline: Get order type of Search of number the process @@ -174,13 +149,13 @@ 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 more than "" + And the response has records in property "data" -Examples: + Examples: | test_description | search | records | - | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 | + | Filter all cases | | 4 | Scenario: Returns a list of the cases for the logged in user (Draft) @@ -188,7 +163,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 records more than "" + And the response has 15 records Scenario Outline: Get paging of list Draft @@ -196,36 +171,36 @@ Scenario Outline: Get paging of list Draft 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 "" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: - | test_description | start | limit | records | http_code | type | - | lowercase in Start | a | 1 | 0 | 400 | string | - | uppercase in Start | A | 1 | 0 | 400 | string | - | lowercase in Limit | 1 | a | 0 | 400 | string | - | uppercase in Limit | 1 | A | 0 | 400 | string | - | limit=3 | 1 | 3 | 3 | 200 | array | - | start=3 | 3 | 25 | 22 | 200 | array | - | limit and start =3 | 3 | 3 | 1 | 200 | array | - | high number for start | 1000 | 1 | 0 | 200 | array | - | high number for start | 1000 | 0 | 0 | 200 | array | - | empty result | 1 | 0 | 1 | 200 | array | - | empty string | 1 | 10000 | 1 | 200 | array | - | invalid start | b | 25 | 0 | 400 | string | - | invalid limit | 1 | c | 0 | 400 | string | - | start equals zero | 0 | 20 | 20 | 200 | array | - | search 0 | 0 | 0 | 0 | 200 | array | - | search 0 | 0 | 100 | 100 | 200 | array | - | negative numbers in start | -10 | 25 | 25 | 200 | array | - | negative numbers in limit | 1 | -25 | 25 | 200 | array | - | real numbers | 0.0 | 1.0 | 0 | 400 | string | - | real numbers in start | 0.0 | 25 | 0 | 400 | string | - | real numbers in limit | 1 | 1.4599 | 0 | 400 | string | - | only start | 1 | | 1 | 200 | array | - | only limit | | 25 | 1 | 200 | array | - | without start and limit | | | 1 | 200 | array | + | test_description | start | limit | records | http_code | + | lowercase in Start | a | 1 | 1 | 200 | + | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in Limit | 1 | a | 1 | 200 | + | uppercase in Limit | 1 | A | 1 | 200 | + | limit=3 | 1 | 3 | 3 | 200 | + | start=3 | 3 | 5 | 3 | 200 | + | limit and start =3 | 3 | 3 | 1 | 200 | + | high number for start | 1000 | 1 | 0 | 200 | + | high number for start | 1000 | 0 | 0 | 200 | + | empty result | 1 | 0 | 1 | 200 | + | empty string | 1 | 10000 | 14 | 200 | + | invalid start | b | 25 | 15 | 200 | + | invalid limit | 1 | c | 1 | 200 | + | start equals zero | 0 | 20 | 15 | 200 | + | search 0 | 0 | 0 | 0 | 200 | + | search 0 | 0 | 100 | 15 | 200 | + | negative numbers in start | -10 | 25 | 15 | 200 | + | negative numbers in limit | 1 | -25 | 1 | 200 | + | real numbers | 0.0 | 1.0 | 1 | 200 | + | real numbers in start | 0.0 | 10 | 10 | 200 | + | real numbers in limit | 1 | 1.4599 | 1 | 200 | + | only start | 1 | | 1 | 200 | + | only limit | | 25 | 1 | 200 | + | without start and limit | | | 1 | 200 | Scenario Outline: Get order type of Descending and Ascending @@ -233,14 +208,14 @@ Scenario Outline: Get order type of Descending and Ascending Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | dir | records | - | Order for Acending | asc | | - | Order for Descending | desc | | + | Order for Acending | asc | 15 | + | Order for Descending | desc | 15 | @@ -249,14 +224,14 @@ Scenario Outline: Get order type of Process Category Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | cat_uid | records | - | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | | - | Filter all categories | | | + | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 9 | + | Filter all categories | | 15 | Scenario Outline: Get order type of Process @@ -264,14 +239,14 @@ Scenario Outline: Get order type of Process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | pro_uid | records | - | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 2 | + | Filter all cases | | 15 | Scenario Outline: Get order type of Search of the process @@ -279,14 +254,14 @@ Scenario Outline: Get order type of Search of the process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | search | records | - | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 4 | + | Filter all cases | | 5 | Scenario: Returns a list of the cases for the logged in user (Participated) @@ -294,44 +269,43 @@ Scenario: Returns a list of the cases for the logged in user (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 records more than "" - + And the response has 57 records Scenario Outline: Get paging of list Participated 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 "" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: - | test_description | start | limit | records | http_code | type | - | lowercase in Start | a | 1 | 0 | 400 | string | - | uppercase in Start | A | 1 | 0 | 400 | string | - | lowercase in Limit | 1 | a | 0 | 400 | string | - | uppercase in Limit | 1 | A | 0 | 400 | string | - | limit=3 | 1 | 3 | 3 | 200 | array | - | start=3 | 3 | 25 | 22 | 200 | array | - | limit and start =3 | 3 | 3 | 1 | 200 | array | - | high number for start | 1000 | 1 | 0 | 200 | array | - | high number for start | 1000 | 0 | 0 | 200 | array | - | empty result | 1 | 0 | 1 | 200 | array | - | empty string | 1 | 10000 | 1 | 200 | array | - | invalid start | b | 25 | 0 | 400 | string | - | invalid limit | 1 | c | 0 | 400 | string | - | start equals zero | 0 | 20 | 20 | 200 | array | - | search 0 | 0 | 0 | 0 | 200 | array | - | search 0 | 0 | 100 | 100 | 200 | array | - | negative numbers in start | -10 | 25 | 25 | 200 | array | - | negative numbers in limit | 1 | -25 | 25 | 200 | array | - | real numbers | 0.0 | 1.0 | 0 | 400 | string | - | real numbers in start | 0.0 | 25 | 0 | 400 | string | - | real numbers in limit | 1 | 1.4599 | 0 | 400 | string | - | only start | 1 | | 1 | 200 | array | - | only limit | | 25 | 1 | 200 | array | - | without start and limit | | | 1 | 200 | array | + | test_description | start | limit | records | http_code | + | lowercase in Start | a | 1 | 1 | 200 | + | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in Limit | 1 | a | 1 | 200 | + | uppercase in Limit | 1 | A | 1 | 200 | + | limit=3 | 1 | 3 | 3 | 200 | + | start=3 | 3 | 5 | 3 | 200 | + | limit and start =3 | 3 | 3 | 1 | 200 | + | high number for start | 1000 | 1 | 0 | 200 | + | high number for start | 1000 | 0 | 0 | 200 | + | empty result | 1 | 0 | 1 | 200 | + | empty string | 1 | 10000 | 57 | 200 | + | invalid start | b | 25 | 25 | 200 | + | invalid limit | 1 | c | 1 | 200 | + | start equals zero | 0 | 20 | 20 | 200 | + | search 0 | 0 | 0 | 0 | 200 | + | search 0 | 0 | 100 | 57 | 200 | + | negative numbers in start | -10 | 25 | 25 | 200 | + | negative numbers in limit | 1 | -25 | 1 | 200 | + | real numbers | 0.0 | 1.0 | 1 | 200 | + | real numbers in start | 0.0 | 12 | 12 | 200 | + | real numbers in limit | 1 | 1.4599 | 1 | 200 | + | only start | 1 | | 1 | 200 | + | only limit | | 25 | 25 | 200 | + | without start and limit | | | 1 | 200 | Scenario Outline: Get order type of Descending an Descending @@ -339,14 +313,14 @@ Scenario Outline: Get order type of Descending an Descending Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | dir | records | - | Order for Acending | asc | | - | Order for Descending | desc | | + | Order for Acending | asc | 57 | + | Order for Descending | desc | 57 | @@ -355,14 +329,14 @@ Scenario Outline: Get order type of Process Category Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | cat_uid | records | - | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | | - | Filter all categories | | | + | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 25 | + | Filter all categories | | 57 | Scenario Outline: Get order type of Process @@ -370,14 +344,14 @@ Scenario Outline: Get order type of Process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | pro_uid | records | - | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 3 | + | Filter all cases | | 57 | @@ -386,14 +360,14 @@ Scenario Outline: Get order type of Search Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | search | records | - | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 | + | Filter all cases | | 4 | Scenario: Returns a list of the cases for the logged in user (Unassigned) @@ -401,7 +375,7 @@ Scenario: Returns a list of the cases for the logged in user (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 records more than "" + And the response has 12 records Scenario Outline: Get paging of list Unassigned @@ -409,36 +383,36 @@ Scenario Outline: Get paging of list Unassigned 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 "" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: - | test_description | start | limit | records | http_code | type | - | lowercase in Start | a | 1 | 0 | 400 | string | - | uppercase in Start | A | 1 | 0 | 400 | string | - | lowercase in Limit | 1 | a | 0 | 400 | string | - | uppercase in Limit | 1 | A | 0 | 400 | string | - | limit=3 | 1 | 3 | 3 | 200 | array | - | start=3 | 3 | 25 | 22 | 200 | array | - | limit and start =3 | 3 | 3 | 1 | 200 | array | - | high number for start | 1000 | 1 | 0 | 200 | array | - | high number for start | 1000 | 0 | 0 | 200 | array | - | empty result | 1 | 0 | 1 | 200 | array | - | empty string | 1 | 10000 | 1 | 200 | array | - | invalid start | b | 25 | 0 | 400 | string | - | invalid limit | 1 | c | 0 | 400 | string | - | start equals zero | 0 | 20 | 20 | 200 | array | - | search 0 | 0 | 0 | 0 | 200 | array | - | search 0 | 0 | 100 | 100 | 200 | array | - | negative numbers in start | -10 | 25 | 25 | 200 | array | - | negative numbers in limit | 1 | -25 | 25 | 200 | array | - | real numbers | 0.0 | 1.0 | 0 | 400 | string | - | real numbers in start | 0.0 | 25 | 0 | 400 | string | - | real numbers in limit | 1 | 1.4599 | 0 | 400 | string | - | only start | 1 | | 1 | 200 | array | - | only limit | | 25 | 1 | 200 | array | - | without start and limit | | | 1 | 200 | array | + | test_description | start | limit | records | http_code | + | lowercase in Start | a | 1 | 1 | 200 | + | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in Limit | 1 | a | 1 | 200 | + | uppercase in Limit | 1 | A | 1 | 200 | + | limit=3 | 1 | 3 | 3 | 200 | + | start=3 | 3 | 5 | 3 | 200 | + | limit and start =3 | 3 | 3 | 1 | 200 | + | high number for start | 1000 | 1 | 0 | 200 | + | high number for start | 1000 | 0 | 0 | 200 | + | empty result | 1 | 0 | 1 | 200 | + | empty string | 1 | 10000 | 12 | 200 | + | invalid start | b | 25 | 12 | 200 | + | invalid limit | 1 | c | 1 | 200 | + | start equals zero | 0 | 20 | 12 | 200 | + | search 0 | 0 | 0 | 0 | 200 | + | search 0 | 0 | 100 | 12 | 200 | + | negative numbers in start | -10 | 25 | 12 | 200 | + | negative numbers in limit | 1 | -25 | 1 | 200 | + | real numbers | 0.0 | 1.0 | 1 | 200 | + | real numbers in start | 0.0 | 12 | 12 | 200 | + | real numbers in limit | 1 | 1.4599 | 1 | 200 | + | only start | 1 | | 1 | 200 | + | only limit | | 25 | 1 | 200 | + | without start and limit | | | 1 | 200 | Scenario Outline: Get order type of Descending and Acending @@ -446,14 +420,14 @@ Scenario Outline: Get order type of Descending and Acending Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | dir | records | - | Order for Acending | asc | | - | Order for Descending | desc | | + | Order for Acending | asc | 12 | + | Order for Descending | desc | 12 | Scenario Outline: Get order type of Process Category @@ -461,14 +435,14 @@ Scenario Outline: Get order type of Process Category Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | cat_uid | records | - | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | | - | Filter all categories | | | + | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 12 | + | Filter all categories | | 12 | Scenario Outline: Get order type of Process @@ -476,14 +450,14 @@ Scenario Outline: Get order type of Process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | pro_uid | records | - | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - sequential" | 35894775350ec7daa099378048029617 | 6 | + | Filter all cases | | 12 | Scenario Outline: Get order type of Search @@ -491,14 +465,14 @@ Scenario Outline: Get order type of Search Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | search | records | - | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 | + | Filter all cases | | 3 | @@ -507,7 +481,7 @@ Scenario: Returns a list of the cases for the logged in user (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 records more than "" + And the response has 12 records Scenario Outline: Get paging of list Paused @@ -515,36 +489,36 @@ Scenario Outline: Get paging of list Paused 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 "" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: - | test_description | start | limit | records | http_code | type | - | lowercase in Start | a | 1 | 0 | 400 | string | - | uppercase in Start | A | 1 | 0 | 400 | string | - | lowercase in Limit | 1 | a | 0 | 400 | string | - | uppercase in Limit | 1 | A | 0 | 400 | string | - | limit=3 | 1 | 3 | 3 | 200 | array | - | start=3 | 3 | 25 | 22 | 200 | array | - | limit and start =3 | 3 | 3 | 1 | 200 | array | - | high number for start | 1000 | 1 | 0 | 200 | array | - | high number for start | 1000 | 0 | 0 | 200 | array | - | empty result | 1 | 0 | 1 | 200 | array | - | empty string | 1 | 10000 | 1 | 200 | array | - | invalid start | b | 25 | 0 | 400 | string | - | invalid limit | 1 | c | 0 | 400 | string | - | start equals zero | 0 | 20 | 20 | 200 | array | - | search 0 | 0 | 0 | 0 | 200 | array | - | search 0 | 0 | 100 | 100 | 200 | array | - | negative numbers in start | -10 | 25 | 25 | 200 | array | - | negative numbers in limit | 1 | -25 | 25 | 200 | array | - | real numbers | 0.0 | 1.0 | 0 | 400 | string | - | real numbers in start | 0.0 | 25 | 0 | 400 | string | - | real numbers in limit | 1 | 1.4599 | 0 | 400 | string | - | only start | 1 | | 1 | 200 | array | - | only limit | | 25 | 1 | 200 | array | - | without start and limit | | | 1 | 200 | array | + | test_description | start | limit | records | http_code | + | lowercase in Start | a | 1 | 1 | 200 | + | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in Limit | 1 | a | 1 | 200 | + | uppercase in Limit | 1 | A | 1 | 200 | + | limit=3 | 1 | 3 | 3 | 200 | + | start=3 | 3 | 5 | 3 | 200 | + | limit and start =3 | 3 | 3 | 1 | 200 | + | high number for start | 1000 | 1 | 0 | 200 | + | high number for start | 1000 | 0 | 0 | 200 | + | empty result | 1 | 0 | 1 | 200 | + | empty string | 1 | 10000 | 12 | 200 | + | invalid start | b | 25 | 12 | 200 | + | invalid limit | 1 | c | 1 | 200 | + | start equals zero | 0 | 20 | 12 | 200 | + | search 0 | 0 | 0 | 0 | 200 | + | search 0 | 0 | 100 | 12 | 200 | + | negative numbers in start | -10 | 25 | 12 | 200 | + | negative numbers in limit | 1 | -25 | 1 | 200 | + | real numbers | 0.0 | 1.0 | 1 | 200 | + | real numbers in start | 0.0 | 12 | 12 | 200 | + | real numbers in limit | 1 | 1.4599 | 1 | 200 | + | only start | 1 | | 1 | 200 | + | only limit | | 25 | 1 | 200 | + | without start and limit | | | 1 | 200 | Scenario Outline: Get order type of Descending and Acending @@ -552,14 +526,14 @@ Scenario Outline: Get order type of Descending and Acending Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | dir | records | - | Order for Acending | asc | | - | Order for Descending | desc | | + | Order for Acending | asc | 12 | + | Order for Descending | desc | 12 | Scenario Outline: Get order type of Process Category @@ -567,14 +541,14 @@ Scenario Outline: Get order type of Process Category Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | cat_uid | records | - | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | | - | Filter all categories | | | + | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 1 | + | Filter all categories | | 12 | Scenario Outline: Get order type of Process @@ -582,14 +556,14 @@ Scenario Outline: Get order type of Process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | pro_uid | records | - | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - sequential" | 48270290453359748c82a76038662132 | 2 | + | Filter all cases | | 12 | Scenario Outline: Get order type of Search @@ -597,14 +571,14 @@ Scenario Outline: Get order type of Search Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | search | records | - | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 2 | + | Filter all cases | | 3 | Scenario: Returns a list of the cases for the logged in user (Advanced Search) @@ -612,7 +586,7 @@ Scenario: Returns a list of the cases for the logged in user (Advanced Search) Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And the response has records more than "" + And the response has 50 records Scenario Outline: Get paging of list Advanced Search @@ -620,36 +594,36 @@ Scenario Outline: Get paging of list Advanced Search 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 "" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: - | test_description | start | limit | records | http_code | type | - | lowercase in Start | a | 1 | 0 | 400 | string | - | uppercase in Start | A | 1 | 0 | 400 | string | - | lowercase in Limit | 1 | a | 0 | 400 | string | - | uppercase in Limit | 1 | A | 0 | 400 | string | - | limit=3 | 1 | 3 | 3 | 200 | array | - | start=3 | 3 | 25 | 22 | 200 | array | - | limit and start =3 | 3 | 3 | 1 | 200 | array | - | high number for start | 1000 | 1 | 0 | 200 | array | - | high number for start | 1000 | 0 | 0 | 200 | array | - | empty result | 1 | 0 | 1 | 200 | array | - | empty string | 1 | 10000 | 1 | 200 | array | - | invalid start | b | 25 | 0 | 400 | string | - | invalid limit | 1 | c | 0 | 400 | string | - | start equals zero | 0 | 20 | 20 | 200 | array | - | search 0 | 0 | 0 | 0 | 200 | array | - | search 0 | 0 | 100 | 100 | 200 | array | - | negative numbers in start | -10 | 25 | 25 | 200 | array | - | negative numbers in limit | 1 | -25 | 25 | 200 | array | - | real numbers | 0.0 | 1.0 | 0 | 400 | string | - | real numbers in start | 0.0 | 25 | 0 | 400 | string | - | real numbers in limit | 1 | 1.4599 | 0 | 400 | string | - | only start | 1 | | 1 | 200 | array | - | only limit | | 25 | 1 | 200 | array | - | without start and limit | | | 1 | 200 | array | + | test_description | start | limit | records | http_code | + | lowercase in Start | a | 1 | 1 | 200 | + | uppercase in Start | A | 1 | 1 | 200 | + | lowercase in Limit | 1 | a | 1 | 200 | + | uppercase in Limit | 1 | A | 1 | 200 | + | limit=3 | 1 | 3 | 3 | 200 | + | start=3 | 3 | 5 | 3 | 200 | + | limit and start =3 | 3 | 3 | 1 | 200 | + | high number for start | 1000 | 1 | 0 | 200 | + | high number for start | 1000 | 0 | 0 | 200 | + | empty result | 1 | 0 | 1 | 200 | + | empty string | 1 | 10000 | 50 | 200 | + | invalid start | b | 25 | 25 | 200 | + | invalid limit | 1 | c | 1 | 200 | + | start equals zero | 0 | 20 | 20 | 200 | + | search 0 | 0 | 0 | 0 | 200 | + | search 0 | 0 | 100 | 50 | 200 | + | negative numbers in start | -10 | 25 | 25 | 200 | + | negative numbers in limit | 1 | -25 | 1 | 200 | + | real numbers | 0.0 | 1.0 | 1 | 200 | + | real numbers in start | 0.0 | 12 | 12 | 200 | + | real numbers in limit | 1 | 1.4599 | 1 | 200 | + | only start | 1 | | 1 | 200 | + | only limit | | 25 | 1 | 200 | + | without start and limit | | | 1 | 200 | Scenario Outline: Get order type of Descending and Acending @@ -657,14 +631,14 @@ Scenario Outline: Get order type of Descending and Acending Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | dir | records | - | Order for Acending | asc | | - | Order for Descending | desc | | + | Order for Acending | asc | 50 | + | Order for Descending | desc | 50 | Scenario Outline: Get order type of Process Category @@ -672,14 +646,14 @@ Scenario Outline: Get order type of Process Category Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | cat_uid | records | - | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | | - | Filter all categories | | | + | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 25 | + | Filter all categories | | 50 | @@ -688,14 +662,14 @@ Scenario Outline: Get order type of Process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | pro_uid | records | - | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 3 | + | Filter all cases | | 50 | @@ -704,14 +678,14 @@ Scenario Outline: Get order type of Search Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | search | records | - | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | | - | Filter all cases | | | + | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 2 | + | Filter all cases | | 2 | Scenario Outline: Get order for Status @@ -719,16 +693,16 @@ Scenario Outline: Get order for Status Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | app_status | records | - | Filter Status = All Status | | | - | Filter Status = Completed | COMPLETED | | - | Filter Status = Draft | DRAFT | | - | Filter Status = To Do | TO_DO | | + | Filter Status = All Status | | 25 | + | Filter Status = Completed | COMPLETED | 2 | + | Filter Status = Draft | DRAFT | 15 | + | Filter Status = To Do | TO_DO | 25 | Scenario Outline: Get order for User @@ -736,16 +710,16 @@ Scenario Outline: Get order for User Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | usr_uid | records | - | Filter Status = All User | | | - | Filter Status = aaron | 51049032352d56710347233042615067 | | - | Filter Status = admin | 00000000000000000000000000000001 | | - | Filter Status = chris | 24166330352d56730cdd525035621101 | | + | Filter Status = All User | | 25 | + | Filter Status = aaron | 51049032352d56710347233042615067 | 2 | + | Filter Status = admin | 00000000000000000000000000000001 | 2 | + | Filter Status = chris | 24166330352d56730cdd525035621101 | 2 | Scenario Outline: Get order for date @@ -753,11 +727,11 @@ Scenario Outline: Get order for date Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "array" - And the response has records more than "" + And the type is "object" + And the response has records in property "data" Examples: | test_description | date_from | date_to | records | - | Filter date = 2014-03-01 | 2014-03-01 | 2014-03-20 | | - | Filter date = 2014-03-15 | 2014-03-15 | 2014-03-20 | | \ No newline at end of file + | Filter date = 2014-03-01 | 2014-03-01 | 2014-03-31 | 5 | + | Filter date = 2014-03-15 | 2014-03-15 | 2014-04-01 | 25 | \ No newline at end of file diff --git a/features/backend/application_cases/input_documents_case/main_tests_input_document_case.feature b/features/backend/application_cases/input_documents_case/main_tests_input_document_case.feature index c9db84a3f..5f154d3af 100644 --- a/features/backend/application_cases/input_documents_case/main_tests_input_document_case.feature +++ b/features/backend/application_cases/input_documents_case/main_tests_input_document_case.feature @@ -13,11 +13,34 @@ Scenario: Returns a list of the uploaded documents for a given case Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And the response has 5 records + +Scenario Outline: Post metadata and then upload documents for a given case + Given POST upload an input document "" to "cases//input-document" + """ + { + "inp_doc_uid": "", + "tas_uid": "", + "app_doc_comment": "" + + + } + """ + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "object" + And store "app_doc_uid" in session array as variable "app_doc_uid_" + + Examples: + | app_doc_uid_number | document_file | case_uid | inp_doc_uid | tas_uid | app_doc_comment | + | 1 | /home/wendy/uploadfiles/test1.html | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | + | 2 | /home/wendy/uploadfiles/random.jpg | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | + | 3 | /home/wendy/uploadfiles/test.pm | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | + | 4 | /home/wendy/uploadfiles/test.txt | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | Scenario Outline: Returns an uploaded documents for a given case - Given I request "cases/64654381053382b8bb4c415067063003/input-document/" + Given I request "cases//output-document/app_doc_uid" with the key "app_doc_uid" stored in session array as variable "app_doc_uid_" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "object" @@ -31,39 +54,16 @@ Scenario Outline: Returns an uploaded documents for a given case And the "app_doc_index" property equals "" And the "app_doc_link" property equals "" + Examples: - - | test_description | input-document | app_doc_uid | app_doc_filename | doc_uid | app_doc_version | app_doc_create_date | app_doc_create_user | app_doc_type | app_doc_index | app_doc_link | - | Get Input "Desert.jpg" | 6075490825331a1c5eebff9015468244 | 6075490825331a1c5eebff9015468244 | Desert.jpg | 68671480353319e5e1dee74089764900 | 1 | 2014-03-25 11:33:25 | , Administrator (admin) | INPUT | 1 | cases/cases_ShowDocument?a=6075490825331a1c5eebff9015468244&v=1 | - | Get Input "Screenshot Case Archive.docx" | 3770386635331a1f49c78e8070071944 | 3770386635331a1f49c78e8070071944 | Screenshot Case Archive.docx | 68671480353319e5e1dee74089764900 | 1 | 2014-03-25 11:34:12 | , Administrator (admin) | INPUT | 2 | cases/cases_ShowDocument?a=3770386635331a1f49c78e8070071944&v=1 | - | Get Input "alert_message.html" | 6382509235331a235b27a82003894796 | 6382509235331a235b27a82003894796 | alert_message.htm | 68588088053319e68d88f67081331478 | 1 | 2014-03-25 11:35:17 | , Administrator (admin) | INPUT | 4 | cases/cases_ShowDocument?a=6382509235331a235b27a82003894796&v=1 | - | Get Input "actionsByEmail-2.5.0.28.tar" | 3548449385331a24a34d273018695729 | 3548449385331a24a34d273018695729 | actionsByEmail-2.5.0.28.tar | 68588088053319e68d88f67081331478 | 1 | 2014-03-25 11:35:38 | , Administrator (admin) | INPUT | 5 | cases/cases_ShowDocument?a=3548449385331a24a34d273018695729&v=1 | - | Get Input "Step_ordenamiento (5).pm" | 3814366275331a21b80d603018480738 | 3814366275331a21b80d603018480738 | Step_ordenamiento (5).pm | 68588088053319e68d88f67081331478 | 2 | 2014-03-25 11:36:11 | , Administrator (admin) | INPUT | 6 | cases/cases_ShowDocument?a=3814366275331a21b80d603018480738&v=2 | - - - Scenario Outline: Post metadata and then upload documents for a given case - Given POST upload an input document "" to "cases//input-document" - """ - { - - "inp_doc_uid": "", - "tas_uid": "", - "app_doc_comment": "" - - - } - """ - 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" - And store "app_doc_uid" in session array as variable "app_doc_uid_" - - Examples: - | app_doc_uid_number | document_file | case_uid | inp_doc_uid | tas_uid | app_doc_comment | - | 1 | /home/wendy/uploadfiles/test1.html | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | + | test_description | app_doc_uid_number | case_uid | inp_doc_uid | tas_uid | app_doc_comment | + | Get Input "Desert.jpg" | 1 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | + | Get Input "Screenshot Case Archive.docx" | 2 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | + | Get Input "alert_message.html" | 3 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | + | Get Input "actionsByEmail-2.5.0.28.tar" | 4 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | + Scenario Outline: Delete an uploaded or generated document from a case. Given that I want to delete a resource with the key "app_doc_uid_" stored in session array And I request "cases/64654381053382b8bb4c415067063003/input-document/" @@ -74,4 +74,7 @@ Scenario Outline: Delete an uploaded or generated document from a case. Examples: | app_doc_uid_number | - | 1 | \ No newline at end of file + | 1 | + | 2 | + | 3 | + | 4 | \ 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 e69de29bb..e9e8713aa 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 @@ -0,0 +1,19 @@ +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 + And the response charset is "UTF-8" + And the type is "object" + And the "app_doc_uid" property equals "" + And the "app_doc_filename" property equals "" + And the "doc_uid" property equals "" + And the "app_doc_version" property equals "" + And the "app_doc_create_date" property equals "" + And the "app_doc_create_user" property equals "" + And the "app_doc_type" property equals "" + And the "app_doc_index" property equals "" + And the "app_doc_link" property equals "" + + Examples: + + | test_description | input-document | app_doc_uid | app_doc_filename | doc_uid | app_doc_version | app_doc_create_date | app_doc_create_user | app_doc_type | app_doc_index | app_doc_link | + | Get Input "Desert.jpg" | 6075490825331a1c5eebff9015468244 | 6075490825331a1c5eebff9015468244 | Desert.jpg | 68671480353319e5e1dee74089764900 | 1 | 2014-03-25 11:33:25 | , Administrator (admin) | INPUT | 1 | cases/cases_ShowDocument?a=6075490825331a1c5eebff9015468244&v=1 | \ No newline at end of file diff --git a/features/bootstrap/RestContext.php b/features/bootstrap/RestContext.php index 83b64d848..493ec176a 100644 --- a/features/bootstrap/RestContext.php +++ b/features/bootstrap/RestContext.php @@ -1118,10 +1118,20 @@ class RestContext extends BehatContext /** * @Then /^the response has (\d+) records$/ * @Then /^the response has (\d+) record$/ + * @Then /^the response has (\d+) records in property "([^"]*)"$/ + * @Then /^the response has (\d+) record in property "([^"]*)"$/ */ - public function theResponseHasRecords($quantityOfRecords) + public function theResponseHasRecords($quantityOfRecords, $responseProperty="") { - $data = $this->_data; + if($responseProperty!=""){ + if(!isset($this->_data->$responseProperty)){ + throw new Exception("the Response data doesn't have a property named: $responseProperty\n\n" ); + } + $data = $this->_data->$responseProperty; + }else{ + $data = $this->_data; + } + if (!is_array($data)) { if ($quantityOfRecords == 0) { //if we expect 0 records and the response in fact is not an array, just return as a valid test diff --git a/workflow/public_html/testInput.php b/workflow/public_html/testInput.php index 43e8cea97..ff2a28d51 100644 --- a/workflow/public_html/testInput.php +++ b/workflow/public_html/testInput.php @@ -12,8 +12,12 @@ $a = array('form'=>'@'.$file, 'inp_doc_uid'=>$inp_doc_uid, 'tas_uid' =>$tas_uid, curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_HTTPHEADER,$headr); curl_setopt($ch, CURLOPT_POSTFIELDS, $a); +print "

post

"; +print_r($a); curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $postResult = curl_exec($ch); curl_close($ch); -print_r($postResult); \ No newline at end of file +print "

response var_dump

"; +var_dump($postResult); +print ""; \ No newline at end of file From 34662538b87d04c513812ff793516221d8e80751 Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Wed, 2 Apr 2014 11:28:33 -0400 Subject: [PATCH 2/5] Avance de los features case note y cases list --- .../case_note/main_tests_case_note.feature | 2 +- .../main_tests_cases_lists_1_6.feature | 254 +++++++++--------- 2 files changed, 128 insertions(+), 128 deletions(-) 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 cee9e5aa9..3d2c6c233 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 @@ -14,7 +14,7 @@ Scenario: List of case notes for this case And the type is "array" -Scenario Outline: Create a new case note for specified case +Scenario: Create a new case note for specified case Given POST this data: """ { 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 55d4d995d..f11edc16e 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 @@ -31,7 +31,7 @@ Scenario: Returns a list of the cases for the logged in user (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 57 records + And the response has 30 records Scenario: Returns a list of the cases for the logged in user (Unassigned) @@ -55,7 +55,7 @@ Scenario: Returns a list of the cases for the logged in user (Advanced-Search) Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And the response has 25 records + And the response has 30 records @@ -74,28 +74,28 @@ Scenario Outline: Get paging of list inbox | test_description | start | limit | records | http_code | | lowercase in Start | a | 1 | 1 | 200 | | uppercase in Start | A | 1 | 1 | 200 | - | lowercase in Limit | 1 | a | 1 | 200 | - | uppercase in Limit | 1 | A | 1 | 200 | + | lowercase in Limit | 1 | a | 14 | 200 | + | uppercase in Limit | 1 | A | 14 | 200 | | limit=3 | 1 | 3 | 3 | 200 | - | start=3 | 3 | 5 | 3 | 200 | - | limit and start =3 | 3 | 3 | 1 | 200 | + | start=3 | 3 | 5 | 5 | 200 | + | limit and start =3 | 3 | 3 | 3 | 200 | | high number for start | 1000 | 1 | 0 | 200 | | high number for start | 1000 | 0 | 0 | 200 | - | empty result | 1 | 0 | 1 | 200 | + | empty result | 1 | 0 | 14 | 200 | | empty string | 1 | 10000 | 14 | 200 | | invalid start | b | 25 | 14 | 200 | - | invalid limit | 1 | c | 1 | 200 | + | invalid limit | 1 | c | 14 | 200 | | start equals zero | 0 | 20 | 14 | 200 | - | search 0 | 0 | 0 | 0 | 200 | + | search 0 | 0 | 0 | 14 | 200 | | search 0 | 0 | 100 | 14 | 200 | - | negative numbers in start | -10 | 25 | 14 | 200 | - | negative numbers in limit | 1 | -25 | 1 | 200 | + | negative numbers in start | -10 | 25 | 4 | 200 | + | negative numbers in limit | 1 | -25 | 14 | 200 | | real numbers | 0.0 | 1.0 | 1 | 200 | | real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in limit | 1 | 1.4599 | 1 | 200 | - | only start | 1 | | 1 | 200 | - | only limit | | 25 | 1 | 200 | - | without start and limit | | | 1 | 200 | + | only start | 1 | | 14 | 200 | + | only limit | | 25 | 14 | 200 | + | without start and limit | | | 14 | 200 | Scenario Outline: Get order type of Descending and Acending @@ -109,8 +109,8 @@ Scenario Outline: Get order type of Descending and Acending Examples: | test_description | dir | records | - | Order for Acending | asc | 1 | - | Order for Descending | desc | 2 | + | Order for Acending | asc | 14 | + | Order for Descending | desc | 14 | Scenario Outline: Get order type of Process Category @@ -171,7 +171,7 @@ Scenario Outline: Get paging of list Draft 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 "object" + And the type is "array" And the response has records in property "data" Examples: @@ -179,28 +179,28 @@ Scenario Outline: Get paging of list Draft | test_description | start | limit | records | http_code | | lowercase in Start | a | 1 | 1 | 200 | | uppercase in Start | A | 1 | 1 | 200 | - | lowercase in Limit | 1 | a | 1 | 200 | - | uppercase in Limit | 1 | A | 1 | 200 | + | lowercase in Limit | 1 | a | 15 | 200 | + | uppercase in Limit | 1 | A | 15 | 200 | | limit=3 | 1 | 3 | 3 | 200 | - | start=3 | 3 | 5 | 3 | 200 | - | limit and start =3 | 3 | 3 | 1 | 200 | + | start=3 | 3 | 5 | 5 | 200 | + | limit and start =3 | 3 | 3 | 3 | 200 | | high number for start | 1000 | 1 | 0 | 200 | | high number for start | 1000 | 0 | 0 | 200 | - | empty result | 1 | 0 | 1 | 200 | - | empty string | 1 | 10000 | 14 | 200 | + | empty result | 1 | 0 | 15 | 200 | + | empty string | 1 | 10000 | 15 | 200 | | invalid start | b | 25 | 15 | 200 | - | invalid limit | 1 | c | 1 | 200 | + | invalid limit | 1 | c | 15 | 200 | | start equals zero | 0 | 20 | 15 | 200 | - | search 0 | 0 | 0 | 0 | 200 | + | search 0 | 0 | 0 | 15 | 200 | | search 0 | 0 | 100 | 15 | 200 | - | negative numbers in start | -10 | 25 | 15 | 200 | - | negative numbers in limit | 1 | -25 | 1 | 200 | + | negative numbers in start | -10 | 25 | 5 | 200 | + | negative numbers in limit | 1 | -25 | 15 | 200 | | real numbers | 0.0 | 1.0 | 1 | 200 | - | real numbers in start | 0.0 | 10 | 10 | 200 | + | real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in limit | 1 | 1.4599 | 1 | 200 | - | only start | 1 | | 1 | 200 | - | only limit | | 25 | 1 | 200 | - | without start and limit | | | 1 | 200 | + | only start | 1 | | 15 | 200 | + | only limit | | 25 | 15 | 200 | + | without start and limit | | | 15 | 200 | Scenario Outline: Get order type of Descending and Ascending @@ -208,7 +208,7 @@ Scenario Outline: Get order type of Descending and Ascending Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -224,7 +224,7 @@ Scenario Outline: Get order type of Process Category Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -239,7 +239,7 @@ Scenario Outline: Get order type of Process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -254,14 +254,14 @@ Scenario Outline: Get order type of Search of the process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: | test_description | search | records | | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 4 | - | Filter all cases | | 5 | + | Filter all cases | | 15 | Scenario: Returns a list of the cases for the logged in user (Participated) @@ -269,14 +269,14 @@ Scenario: Returns a list of the cases for the logged in user (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 57 records + And the response has 30 records Scenario Outline: Get paging of list Participated 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 "object" + And the type is "array" And the response has records in property "data" Examples: @@ -284,28 +284,28 @@ Scenario Outline: Get paging of list Participated | test_description | start | limit | records | http_code | | lowercase in Start | a | 1 | 1 | 200 | | uppercase in Start | A | 1 | 1 | 200 | - | lowercase in Limit | 1 | a | 1 | 200 | - | uppercase in Limit | 1 | A | 1 | 200 | + | lowercase in Limit | 1 | a | 30 | 200 | + | uppercase in Limit | 1 | A | 30 | 200 | | limit=3 | 1 | 3 | 3 | 200 | - | start=3 | 3 | 5 | 3 | 200 | - | limit and start =3 | 3 | 3 | 1 | 200 | + | start=3 | 3 | 5 | 5 | 200 | + | limit and start =3 | 3 | 3 | 3 | 200 | | high number for start | 1000 | 1 | 0 | 200 | | high number for start | 1000 | 0 | 0 | 200 | - | empty result | 1 | 0 | 1 | 200 | - | empty string | 1 | 10000 | 57 | 200 | + | empty result | 1 | 0 | 30 | 200 | + | empty string | 1 | 10000 | 30 | 200 | | invalid start | b | 25 | 25 | 200 | - | invalid limit | 1 | c | 1 | 200 | - | start equals zero | 0 | 20 | 20 | 200 | - | search 0 | 0 | 0 | 0 | 200 | - | search 0 | 0 | 100 | 57 | 200 | - | negative numbers in start | -10 | 25 | 25 | 200 | - | negative numbers in limit | 1 | -25 | 1 | 200 | + | invalid limit | 1 | c | 30 | 200 | + | start equals zero | 0 | 20 | 30 | 200 | + | search 0 | 0 | 0 | 30 | 200 | + | search 0 | 0 | 100 | 30 | 200 | + | negative numbers in start | -10 | 25 | 15 | 200 | + | negative numbers in limit | 1 | -25 | 25 | 200 | | real numbers | 0.0 | 1.0 | 1 | 200 | | real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in limit | 1 | 1.4599 | 1 | 200 | - | only start | 1 | | 1 | 200 | - | only limit | | 25 | 25 | 200 | - | without start and limit | | | 1 | 200 | + | only start | 1 | | 30 | 200 | + | only limit | | 25 | 30 | 200 | + | without start and limit | | | 30 | 200 | Scenario Outline: Get order type of Descending an Descending @@ -313,14 +313,14 @@ Scenario Outline: Get order type of Descending an Descending Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: | test_description | dir | records | - | Order for Acending | asc | 57 | - | Order for Descending | desc | 57 | + | Order for Acending | asc | 30 | + | Order for Descending | desc | 30 | @@ -329,14 +329,14 @@ Scenario Outline: Get order type of Process Category Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: | test_description | cat_uid | records | - | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 25 | - | Filter all categories | | 57 | + | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 27 | + | Filter all categories | | 30 | Scenario Outline: Get order type of Process @@ -344,14 +344,14 @@ Scenario Outline: Get order type of Process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: | test_description | pro_uid | records | | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 3 | - | Filter all cases | | 57 | + | Filter all cases | | 30 | @@ -360,14 +360,14 @@ Scenario Outline: Get order type of Search Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: | test_description | search | records | | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 | - | Filter all cases | | 4 | + | Filter all cases | | 30 | Scenario: Returns a list of the cases for the logged in user (Unassigned) @@ -383,7 +383,7 @@ Scenario Outline: Get paging of list Unassigned 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 "object" + And the type is "array" And the response has records in property "data" Examples: @@ -391,28 +391,28 @@ Scenario Outline: Get paging of list Unassigned | test_description | start | limit | records | http_code | | lowercase in Start | a | 1 | 1 | 200 | | uppercase in Start | A | 1 | 1 | 200 | - | lowercase in Limit | 1 | a | 1 | 200 | - | uppercase in Limit | 1 | A | 1 | 200 | + | lowercase in Limit | 1 | a | 12 | 200 | + | uppercase in Limit | 1 | A | 12 | 200 | | limit=3 | 1 | 3 | 3 | 200 | - | start=3 | 3 | 5 | 3 | 200 | - | limit and start =3 | 3 | 3 | 1 | 200 | + | start=3 | 3 | 5 | 5 | 200 | + | limit and start =3 | 3 | 3 | 3 | 200 | | high number for start | 1000 | 1 | 0 | 200 | | high number for start | 1000 | 0 | 0 | 200 | - | empty result | 1 | 0 | 1 | 200 | + | empty result | 1 | 0 | 12 | 200 | | empty string | 1 | 10000 | 12 | 200 | | invalid start | b | 25 | 12 | 200 | - | invalid limit | 1 | c | 1 | 200 | + | invalid limit | 1 | c | 12 | 200 | | start equals zero | 0 | 20 | 12 | 200 | - | search 0 | 0 | 0 | 0 | 200 | + | search 0 | 0 | 0 | 12 | 200 | | search 0 | 0 | 100 | 12 | 200 | - | negative numbers in start | -10 | 25 | 12 | 200 | - | negative numbers in limit | 1 | -25 | 1 | 200 | + | negative numbers in start | -10 | 25 | 2 | 200 | + | negative numbers in limit | 1 | -25 | 12 | 200 | | real numbers | 0.0 | 1.0 | 1 | 200 | | real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in limit | 1 | 1.4599 | 1 | 200 | - | only start | 1 | | 1 | 200 | - | only limit | | 25 | 1 | 200 | - | without start and limit | | | 1 | 200 | + | only start | 1 | | 12 | 200 | + | only limit | | 25 | 12 | 200 | + | without start and limit | | | 12 | 200 | Scenario Outline: Get order type of Descending and Acending @@ -420,7 +420,7 @@ Scenario Outline: Get order type of Descending and Acending Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -435,7 +435,7 @@ Scenario Outline: Get order type of Process Category Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -450,7 +450,7 @@ Scenario Outline: Get order type of Process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -465,14 +465,14 @@ Scenario Outline: Get order type of Search Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: | test_description | search | records | | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 | - | Filter all cases | | 3 | + | Filter all cases | | 12 | @@ -489,7 +489,7 @@ Scenario Outline: Get paging of list Paused 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 "object" + And the type is "array" And the response has records in property "data" Examples: @@ -497,28 +497,28 @@ Scenario Outline: Get paging of list Paused | test_description | start | limit | records | http_code | | lowercase in Start | a | 1 | 1 | 200 | | uppercase in Start | A | 1 | 1 | 200 | - | lowercase in Limit | 1 | a | 1 | 200 | - | uppercase in Limit | 1 | A | 1 | 200 | + | lowercase in Limit | 1 | a | 12 | 200 | + | uppercase in Limit | 1 | A | 12 | 200 | | limit=3 | 1 | 3 | 3 | 200 | - | start=3 | 3 | 5 | 3 | 200 | - | limit and start =3 | 3 | 3 | 1 | 200 | + | start=3 | 3 | 5 | 5 | 200 | + | limit and start =3 | 3 | 3 | 3 | 200 | | high number for start | 1000 | 1 | 0 | 200 | | high number for start | 1000 | 0 | 0 | 200 | - | empty result | 1 | 0 | 1 | 200 | + | empty result | 1 | 0 | 12 | 200 | | empty string | 1 | 10000 | 12 | 200 | | invalid start | b | 25 | 12 | 200 | - | invalid limit | 1 | c | 1 | 200 | + | invalid limit | 1 | c | 12 | 200 | | start equals zero | 0 | 20 | 12 | 200 | - | search 0 | 0 | 0 | 0 | 200 | + | search 0 | 0 | 0 | 12 | 200 | | search 0 | 0 | 100 | 12 | 200 | - | negative numbers in start | -10 | 25 | 12 | 200 | - | negative numbers in limit | 1 | -25 | 1 | 200 | + | negative numbers in start | -10 | 25 | 2 | 200 | + | negative numbers in limit | 1 | -25 | 12 | 200 | | real numbers | 0.0 | 1.0 | 1 | 200 | | real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in limit | 1 | 1.4599 | 1 | 200 | - | only start | 1 | | 1 | 200 | - | only limit | | 25 | 1 | 200 | - | without start and limit | | | 1 | 200 | + | only start | 1 | | 12 | 200 | + | only limit | | 25 | 12 | 200 | + | without start and limit | | | 12 | 200 | Scenario Outline: Get order type of Descending and Acending @@ -526,7 +526,7 @@ Scenario Outline: Get order type of Descending and Acending Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -541,7 +541,7 @@ Scenario Outline: Get order type of Process Category Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -556,7 +556,7 @@ Scenario Outline: Get order type of Process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -571,14 +571,14 @@ Scenario Outline: Get order type of Search Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: | test_description | search | records | | Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 2 | - | Filter all cases | | 3 | + | Filter all cases | | 12 | Scenario: Returns a list of the cases for the logged in user (Advanced Search) @@ -586,7 +586,7 @@ Scenario: Returns a list of the cases for the logged in user (Advanced Search) Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And the response has 50 records + And the response has 30 records Scenario Outline: Get paging of list Advanced Search @@ -594,7 +594,7 @@ Scenario Outline: Get paging of list Advanced Search 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 "object" + And the type is "array" And the response has records in property "data" Examples: @@ -602,28 +602,28 @@ Scenario Outline: Get paging of list Advanced Search | test_description | start | limit | records | http_code | | lowercase in Start | a | 1 | 1 | 200 | | uppercase in Start | A | 1 | 1 | 200 | - | lowercase in Limit | 1 | a | 1 | 200 | - | uppercase in Limit | 1 | A | 1 | 200 | + | lowercase in Limit | 1 | a | 30 | 200 | + | uppercase in Limit | 1 | A | 30 | 200 | | limit=3 | 1 | 3 | 3 | 200 | - | start=3 | 3 | 5 | 3 | 200 | - | limit and start =3 | 3 | 3 | 1 | 200 | + | start=3 | 3 | 5 | 5 | 200 | + | limit and start =3 | 3 | 3 | 3 | 200 | | high number for start | 1000 | 1 | 0 | 200 | | high number for start | 1000 | 0 | 0 | 200 | - | empty result | 1 | 0 | 1 | 200 | - | empty string | 1 | 10000 | 50 | 200 | - | invalid start | b | 25 | 25 | 200 | - | invalid limit | 1 | c | 1 | 200 | + | empty result | 1 | 0 | 30 | 200 | + | empty string | 1 | 10000 | 30 | 200 | + | invalid start | b | 25 | 30 | 200 | + | invalid limit | 1 | c | 30 | 200 | | start equals zero | 0 | 20 | 20 | 200 | - | search 0 | 0 | 0 | 0 | 200 | - | search 0 | 0 | 100 | 50 | 200 | - | negative numbers in start | -10 | 25 | 25 | 200 | - | negative numbers in limit | 1 | -25 | 1 | 200 | + | search 0 | 0 | 0 | 30 | 200 | + | search 0 | 0 | 100 | 30 | 200 | + | negative numbers in start | -10 | 25 | 15 | 200 | + | negative numbers in limit | 1 | -25 | 25 | 200 | | real numbers | 0.0 | 1.0 | 1 | 200 | | real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in limit | 1 | 1.4599 | 1 | 200 | - | only start | 1 | | 1 | 200 | - | only limit | | 25 | 1 | 200 | - | without start and limit | | | 1 | 200 | + | only start | 1 | | 30 | 200 | + | only limit | | 25 | 30 | 200 | + | without start and limit | | | 30 | 200 | Scenario Outline: Get order type of Descending and Acending @@ -631,14 +631,14 @@ Scenario Outline: Get order type of Descending and Acending Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: | test_description | dir | records | - | Order for Acending | asc | 50 | - | Order for Descending | desc | 50 | + | Order for Acending | asc | 30 | + | Order for Descending | desc | 30 | Scenario Outline: Get order type of Process Category @@ -646,14 +646,14 @@ Scenario Outline: Get order type of Process Category Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: | test_description | cat_uid | records | | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 25 | - | Filter all categories | | 50 | + | Filter all categories | | 30 | @@ -662,14 +662,14 @@ Scenario Outline: Get order type of Process Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: | test_description | pro_uid | records | | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 3 | - | Filter all cases | | 50 | + | Filter all cases | | 30 | @@ -678,7 +678,7 @@ Scenario Outline: Get order type of Search Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -693,7 +693,7 @@ Scenario Outline: Get order for Status Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -710,7 +710,7 @@ Scenario Outline: Get order for User Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: @@ -727,7 +727,7 @@ Scenario Outline: Get order for date Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" - And the type is "object" + And the type is "array" And the response has records in property "data" Examples: From 47d20cbaa58376ef6ba8e719c97ef967907b4706 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Wed, 2 Apr 2014 13:16:26 -0400 Subject: [PATCH 3/5] Add mafe-translation --- workflow/engine/bin/tasks/cliMafe.php | 69 +++++++++++++++++++ workflow/engine/bin/tasks/cliWorkspaces.php | 3 + workflow/engine/classes/model/Translation.php | 14 ++++ workflow/engine/templates/designer/index.html | 4 +- 4 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 workflow/engine/bin/tasks/cliMafe.php diff --git a/workflow/engine/bin/tasks/cliMafe.php b/workflow/engine/bin/tasks/cliMafe.php new file mode 100644 index 000000000..0887a9f15 --- /dev/null +++ b/workflow/engine/bin/tasks/cliMafe.php @@ -0,0 +1,69 @@ +. + * + * For more information, contact Colosa Inc, 2566 Le Jeune Rd., + * Coral Gables, FL, 33134, USA, or email info@colosa.com. + * + * @package workflow-engine-bin-tasks + */ +G::LoadClass("system"); +G::LoadClass("wsTools"); + + +CLI::taskName('mafe-translation'); +CLI::taskDescription(<<setRootDir($rootDir); + $loadConstants = false; + + $workspaces = get_workspaces_from_args($args); + print_r($workspaces); + $lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en'; + + //$app->loadEnvironment("marcoantonio3", $loadConstants); + + $translation = new Translation(); + CLI::logging("Updating labels Mafe ...\n"); + foreach ($workspaces as $workspace) { + try { + echo "Updating labels for workspace " . pakeColor::colorize($workspace->name, "INFO") . "\n"; + $app->loadEnvironment($workspace->name, $loadConstants); + $translation->generateTransaltionMafe($lang); + } catch (Exception $e) { + echo "Errors upgrading labels for workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n"; + } + } + + CLI::logging("Create successful\n"); + +} diff --git a/workflow/engine/bin/tasks/cliWorkspaces.php b/workflow/engine/bin/tasks/cliWorkspaces.php index 00ad1f68d..cf8a9f172 100755 --- a/workflow/engine/bin/tasks/cliWorkspaces.php +++ b/workflow/engine/bin/tasks/cliWorkspaces.php @@ -258,6 +258,9 @@ function run_database_check($args, $opts) { } function database_upgrade($command, $args) { + print_r($command); + print_r($args); + die; $workspaces = get_workspaces_from_args($args); $checkOnly = (strcmp($command, "check") == 0); foreach ($workspaces as $workspace) { diff --git a/workflow/engine/classes/model/Translation.php b/workflow/engine/classes/model/Translation.php index b6508cfb8..5a0a77650 100755 --- a/workflow/engine/classes/model/Translation.php +++ b/workflow/engine/classes/model/Translation.php @@ -573,5 +573,19 @@ class Translation extends BaseTranslation } return false; } + + public function generateTransaltionMafe ($lang='en') + { + if (!file_exists(PATH_TRUNK .'vendor/colosa/MichelangeloFE/' . 'labels.php')) { + throw new Exception( PATH_TRUNK .'vendor/colosa/MichelangeloFE/' . 'labels.php'); + throw new Exception( 'labels.php not exist in MAFE '); + } + + include PATH_TRUNK .'vendor/colosa/MichelangeloFE/' . 'labels.php'; + + foreach ($labels as $key => $row) { + $this->addTranslation ('LABEL', 'ID_MAFE_'.MD5($row), $lang, $row); + } + } } diff --git a/workflow/engine/templates/designer/index.html b/workflow/engine/templates/designer/index.html index 10755be86..5e8cd6b4c 100644 --- a/workflow/engine/templates/designer/index.html +++ b/workflow/engine/templates/designer/index.html @@ -112,10 +112,10 @@ -
  • + From eefe69385224379d78703ec1a4c7a87824cfacac Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Wed, 2 Apr 2014 13:18:33 -0400 Subject: [PATCH 4/5] Add mafe-translation --- workflow/engine/bin/tasks/cliMafe.php | 6 +----- workflow/engine/classes/model/Translation.php | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/workflow/engine/bin/tasks/cliMafe.php b/workflow/engine/bin/tasks/cliMafe.php index 0887a9f15..b5ed6232f 100644 --- a/workflow/engine/bin/tasks/cliMafe.php +++ b/workflow/engine/bin/tasks/cliMafe.php @@ -33,8 +33,7 @@ CLI::taskDescription(<<loadEnvironment("marcoantonio3", $loadConstants); - $translation = new Translation(); CLI::logging("Updating labels Mafe ...\n"); foreach ($workspaces as $workspace) { diff --git a/workflow/engine/classes/model/Translation.php b/workflow/engine/classes/model/Translation.php index 5a0a77650..1f7347475 100755 --- a/workflow/engine/classes/model/Translation.php +++ b/workflow/engine/classes/model/Translation.php @@ -577,7 +577,6 @@ class Translation extends BaseTranslation public function generateTransaltionMafe ($lang='en') { if (!file_exists(PATH_TRUNK .'vendor/colosa/MichelangeloFE/' . 'labels.php')) { - throw new Exception( PATH_TRUNK .'vendor/colosa/MichelangeloFE/' . 'labels.php'); throw new Exception( 'labels.php not exist in MAFE '); } From 07ee040c00dfd0c13e0e98095daaa49f5411d665 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Wed, 2 Apr 2014 13:26:15 -0400 Subject: [PATCH 5/5] Add mafe-translation --- workflow/engine/bin/tasks/cliMafe.php | 2 +- workflow/engine/bin/tasks/cliWorkspaces.php | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/workflow/engine/bin/tasks/cliMafe.php b/workflow/engine/bin/tasks/cliMafe.php index b5ed6232f..d0655eede 100644 --- a/workflow/engine/bin/tasks/cliMafe.php +++ b/workflow/engine/bin/tasks/cliMafe.php @@ -35,7 +35,7 @@ EOT ); CLI::taskArg('workspace', true, true); -CLI::taskOpt("lang", "You must specify language on which rebuild of the case cache list builder will be done; if you don't specify this, it will use 'en' by default", "l:","lang="); +CLI::taskOpt("lang", "languaje", "l:","lang="); CLI::taskRun('run_create_translation'); function run_create_translation($args, $opts) diff --git a/workflow/engine/bin/tasks/cliWorkspaces.php b/workflow/engine/bin/tasks/cliWorkspaces.php index cf8a9f172..00ad1f68d 100755 --- a/workflow/engine/bin/tasks/cliWorkspaces.php +++ b/workflow/engine/bin/tasks/cliWorkspaces.php @@ -258,9 +258,6 @@ function run_database_check($args, $opts) { } function database_upgrade($command, $args) { - print_r($command); - print_r($args); - die; $workspaces = get_workspaces_from_args($args); $checkOnly = (strcmp($command, "check") == 0); foreach ($workspaces as $workspace) {