Merge branch 'master' of bitbucket.org:colosa/processmaker

This commit is contained in:
Wendy Nestor
2014-03-18 15:20:34 -04:00
10 changed files with 642 additions and 358 deletions

View File

@@ -11,7 +11,6 @@ Feature: Case Scheduler Resources
"sch_option": "3",
"sch_name": "Test scheduler #1",
"sch_del_user_name": "admin",
"sch_del_user_pass": "admin",
"tas_uid": "46941969352af5be2ab3f39001216717",
"sch_start_time": "18:00",
"sch_start_date": "2014-01-20",
@@ -54,7 +53,6 @@ Feature: Case Scheduler Resources
{
"sch_name": "Test scheduler #1 modify",
"sch_del_user_name": "admin",
"sch_del_user_pass": "admin",
"tas_uid": "46941969352af5be2ab3f39001216717",
"sch_start_time": "20:00",
"sch_start_date": "2014-02-01",

View File

@@ -21,7 +21,6 @@ Feature: Case Scheduler Main Tests
"""
{
"sch_del_user_name": "<sch_del_user_name>",
"sch_del_user_pass": "<sch_del_user_pass>",
"tas_uid": "<tas_uid>",
"sch_name": "<sch_name>",
"sch_option": "<sch_option>",
@@ -46,20 +45,20 @@ Feature: Case Scheduler Main Tests
Examples:
| test_description | sch_uid_number | sch_del_user_name | sch_del_user_pass | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every | error_code |
| Create with Daily | 1 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ | 1 | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 201 |
| Create with Weekly, sch_week_days=monday | 2 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 201 |
| Create with Weekly, sch_week_days=tuesday, wednesday, thursday, friday, saturday, sunday | 3 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|4\|5\|6\|7 | | | | | | 201 |
| Create with Monthly and day of month, day of month=1, of the month(s)=3,4 | 4 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 1 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 201 |
| Create with Monthly and day of month, day of month=1, of the month=1,2,5,6,7,8,9,10,11,12 | 5 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 2 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 201 |
| Create with Monthly and the day=first and Monday | 6 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 3 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 1\|7 | | 201 |
| Create with Monthly and the day=second and Saturday | 7 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 4 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 2\|6 | | 201 |
| Create with Monthly and the day=Third and Friday | 8 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 5 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 3\|5 | | 201 |
| Create with Monthly and the day=second and Thursday | 9 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 6 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 2\|4 | | 201 |
| Create with Monthly and the day=last and Wednesday | 10 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 7 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 5\|3 | | 201 |
| Create with Monthly and the day=last and Wednesday, of the month=1,2,6,7,8,9,10,11,12 | 11 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 8 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 1\|2\|6\|7\|8\|9\|10\|11\|12 | 5\|3 | | 201 |
| Create with One time only | 12 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-One Time only 678%$@ | 4 | | | 20:00 | | | | | | | 201 |
| Create with Every | 13 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Every 987&%@ | 5 | | | | | | | | | 12.30 | 201 |
| test_description | sch_uid_number | sch_del_user_name | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every | error_code |
| Create with Daily | 1 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ | 1 | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 201 |
| Create with Weekly, sch_week_days=monday | 2 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 201 |
| Create with Weekly, sch_week_days=tuesday, wednesday, thursday, friday, saturday, sunday | 3 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|4\|5\|6\|7 | | | | | | 201 |
| Create with Monthly and day of month, day of month=1, of the month(s)=3,4 | 4 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 1 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 201 |
| Create with Monthly and day of month, day of month=1, of the month=1,2,5,6,7,8,9,10,11,12 | 5 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 2 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 201 |
| Create with Monthly and the day=first and Monday | 6 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 3 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 1\|7 | | 201 |
| Create with Monthly and the day=second and Saturday | 7 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 4 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 2\|6 | | 201 |
| Create with Monthly and the day=Third and Friday | 8 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 5 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 3\|5 | | 201 |
| Create with Monthly and the day=second and Thursday | 9 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 6 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 2\|4 | | 201 |
| Create with Monthly and the day=last and Wednesday | 10 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 7 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 5\|3 | | 201 |
| Create with Monthly and the day=last and Wednesday, of the month=1,2,6,7,8,9,10,11,12 | 11 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 8 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 1\|2\|6\|7\|8\|9\|10\|11\|12 | 5\|3 | | 201 |
| Create with One time only | 12 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-One Time only 678%$@ | 4 | | | 20:00 | | | | | | | 201 |
| Create with Every | 13 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Every 987&%@ | 5 | | | | | | | | | 12.30 | 201 |
Scenario: Create a new case scheduler with same name
@@ -69,8 +68,7 @@ Feature: Case Scheduler Main Tests
"sch_option": "5",
"sch_name": "Case Scheduler-Every 987&%@",
"sch_del_user_name": "admin",
"sch_del_user_pass": "admin",
"tas_uid": "46941969352af5be2ab3f39001216717",
"tas_uid": "46941969352af5be2ab3f39001216717",
"sch_start_time": "",
"sch_start_date": "",
"sch_end_date": "",
@@ -101,7 +99,6 @@ Feature: Case Scheduler Main Tests
"""
{
"sch_del_user_name": "<sch_del_user_name>",
"sch_del_user_pass": "<sch_del_user_pass>",
"tas_uid": "<tas_uid>",
"sch_name": "<sch_name>",
"sch_option": "<sch_option>",
@@ -125,12 +122,12 @@ Feature: Case Scheduler Main Tests
Examples:
| test_description | sch_uid_number | sch_del_user_name | sch_del_user_pass | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every |sch_state |
| Update Daily | 1 | admin | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Daily 123@#$ | 1 | 2014-02-30 | 2014-03-20 | 12:30 | | | | | | |ACTIVE |
| Update Weekly, sch_week_days=monday | 2 | admin | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Weekly monday 345%$# | 2 | 2014-03-20 | 2014-04-20 | 08:30 | 2 | | | | | |ACTIVE |
| Update Monthly and day of month, day of month=1, of the month(s)=3,4 | 4 | admin | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Monthly 567&^% 1 | 3 | 2014-04-21 | 2014-05-18 | 18:30 | | 1 | 18 | 3\|4\|5 | | |ACTIVE |
| Update One time only | 12 | admin | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-One Time only 678%$@ | 4 | | | 20:30 | | | | | | |ACTIVE |
| Update Every | 13 | admin | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Every 987&%@ | 5 | | | | | | | | | 18.30 |ACTIVE |
| test_description | sch_uid_number | sch_del_user_name | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every |sch_state |
| Update Daily | 1 | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Daily 123@#$ | 1 | 2014-02-30 | 2014-03-20 | 12:30 | | | | | | |ACTIVE |
| Update Weekly, sch_week_days=monday | 2 | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Weekly monday 345%$# | 2 | 2014-03-20 | 2014-04-20 | 08:30 | 2 | | | | | |ACTIVE |
| Update Monthly and day of month, day of month=1, of the month(s)=3,4 | 4 | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Monthly 567&^% 1 | 3 | 2014-04-21 | 2014-05-18 | 18:30 | | 1 | 18 | 3\|4\|5 | | |ACTIVE |
| Update One time only | 12 | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-One Time only 678%$@ | 4 | | | 20:30 | | | | | | |ACTIVE |
| Update Every | 13 | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Every 987&%@ | 5 | | | | | | | | | 18.30 |ACTIVE |
Scenario Outline: Get a single case scheduler of a project and check some properties

View File

@@ -10,7 +10,6 @@ Feature: Output Documents Negative Tests
"""
{
"sch_del_user_name": "<sch_del_user_name>",
"sch_del_user_pass": "<sch_del_user_pass>",
"tas_uid": "<tas_uid>",
"sch_name": "<sch_name>",
"sch_option": "<sch_option>",
@@ -32,28 +31,27 @@ Feature: Output Documents Negative Tests
Examples:
| test_description | sch_del_user_name | sch_del_user_pass | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every | error_code | error_message |
| Invalid sch_option | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 21 | 20 | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 400 | sch_option |
| Invalid sch_del_user_name | sample | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 400 | User |
| Invalid sch_del_user_pass | admin | sample | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# 22 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|5\|6\|7 | | | | | | 400 | password |
| Invalid tas_uid | admin | admin | 00000000000005be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 1 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 400 | Task not found |
| Invalid sch_start_time | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 2 | 3 | 2014-03-21 | 2014-04-18 | 39:00:99 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 400 | sch_start_time |
| Invalid sch_start_date | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 3 | 3 | 2014-20-35 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 1\|7 | | 400 | sch_start_date |
| Invalid sch_week_days | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 4 | 2 | 2014-03-21 | 2014-04-18 | 18:00 | 8\|9\|10 | | | | | | 400 | sch_week_days |
| Invalid sch_start_date | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 5 | 3 | 2014-33-76 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 3\|5 | | 400 | sch_start_date |
| Invalid sch_start_day_opt_1 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 6 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 87 | 3\|4\|5 | 2\|4 | | 400 | sch_start_day_opt_1 |
| Invalid sch_start_day_opt_2 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 7 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 9\|10 | | 400 | sch_start_day_opt_2 |
| Invalid sch_months | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 8 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 13\|54\|65 | 5\|3 | | 400 | sch_months |
| Invalid sch_end_date | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 23 | 1 | 2014-01-30 | 2015-54-87 | 12:00 | | | | | | | 400 | sch_end_date |
| Invalid sch_repeat_every | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Every 987&%@ 10 | 5 | | | | | | | | | 43:30 | 400 | sch_repeat_every |
| Field requered sch_option | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 11 | | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 400 | sch_option |
| Field requered sch_name | admin | admin | 46941969352af5be2ab3f39001216717 | | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 400 | sch_name |
| Field requered sch_del_user_name | | sample | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# 12 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|4\|5\|6\|7 | | | | | | 400 | User |
| Field requered sch_del_user_pass | admin | | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 113 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 400 | password |
| Field requered tas_uid | admin | admin | | Case Scheduler-Monthly 567&^% 14 | 3 | 2014-03-21 | 2014-04-18 | 39:00:99 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 400 | tas_uid |
| Field requered sch_start_time | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 15 | 3 | 2014-20-35 | 2014-04-18 | | | 2 | | 3\|4\|5 | 1\|7 | | 400 | sch_start_time |
| Field requered sch_start_date | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 16 | 3 | | 2014-04-18 | 18:00 | 8\|9\|10 | 2 | | 3\|4\|5 | 2\|6 | | 400 | sch_start_date |
| Field requered sch_week_days | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# 17 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | | | | | | | 400 | sch_week_days |
| Field requered sch_start_day | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 18 | 3 | 2014-33-76 | 2014-04-18 | 18:00 | | | | 3\|4\|5 | 3\|5 | | 400 | sch_start_day |
| Field requered sch_months | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 19 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 16 | | 2\|4 | | 400 | sch_months |
| Field requered sch_end_date | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 24 | 1 | 2014-01-30 | | 12:00 | | | | | | | 400 | sch_end_date |
| test_description | sch_del_user_name | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every | error_code | error_message |
| Invalid sch_option | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 21 | 20 | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 400 | sch_option |
| Invalid sch_del_user_name | sample | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 400 | User |
| Invalid tas_uid | admin | 00000000000005be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 1 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 400 | Task not found |
| Invalid sch_start_time | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 2 | 3 | 2014-03-21 | 2014-04-18 | 39:00:99 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 400 | sch_start_time |
| Invalid sch_start_date | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 3 | 3 | 2014-20-35 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 1\|7 | | 400 | sch_start_date |
| Invalid sch_week_days | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 4 | 2 | 2014-03-21 | 2014-04-18 | 18:00 | 8\|9\|10 | | | | | | 400 | sch_week_days |
| Invalid sch_start_date | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 5 | 3 | 2014-33-76 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 3\|5 | | 400 | sch_start_date |
| Invalid sch_start_day_opt_1 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 6 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 87 | 3\|4\|5 | 2\|4 | | 400 | sch_start_day_opt_1 |
| Invalid sch_start_day_opt_2 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 7 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 9\|10 | | 400 | sch_start_day_opt_2 |
| Invalid sch_months | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 8 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 13\|54\|65 | 5\|3 | | 400 | sch_months |
| Invalid sch_end_date | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 23 | 1 | 2014-01-30 | 2015-54-87 | 12:00 | | | | | | | 400 | sch_end_date |
| Invalid sch_repeat_every | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Every 987&%@ 10 | 5 | | | | | | | | | 43:30 | 400 | sch_repeat_every |
| Field requered sch_option | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 11 | | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 400 | sch_option |
| Field requered sch_name | admin | 46941969352af5be2ab3f39001216717 | | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 400 | sch_name |
| Field requered sch_del_user_name | | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# 12 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|4\|5\|6\|7 | | | | | | 400 | User |
| Field requered sch_del_user_pass | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 113 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 400 | password |
| Field requered tas_uid | admin | | Case Scheduler-Monthly 567&^% 14 | 3 | 2014-03-21 | 2014-04-18 | 39:00:99 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 400 | tas_uid |
| Field requered sch_start_time | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 15 | 3 | 2014-20-35 | 2014-04-18 | | | 2 | | 3\|4\|5 | 1\|7 | | 400 | sch_start_time |
| Field requered sch_start_date | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 16 | 3 | | 2014-04-18 | 18:00 | 8\|9\|10 | 2 | | 3\|4\|5 | 2\|6 | | 400 | sch_start_date |
| Field requered sch_week_days | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# 17 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | | | | | | | 400 | sch_week_days |
| Field requered sch_start_day | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 18 | 3 | 2014-33-76 | 2014-04-18 | 18:00 | | | | 3\|4\|5 | 3\|5 | | 400 | sch_start_day |
| Field requered sch_months | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 19 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 16 | | 2\|4 | | 400 | sch_months |
| Field requered sch_end_date | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 24 | 1 | 2014-01-30 | | 12:00 | | | | | | | 400 | sch_end_date |

View File

@@ -372,6 +372,8 @@ class WebApplication
\Propel::init(PATH_CONFIG . "databases.php");
\Bootstrap::LoadTranslationObject(defined( 'SYS_LANG' ) ? SYS_LANG : "en");
return true;
}
}

View File

@@ -20,7 +20,6 @@ class CaseScheduler
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_NAME );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_NAME );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_PASS );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::PRO_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::TAS_UID );
@@ -78,7 +77,6 @@ class CaseScheduler
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_NAME );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_NAME );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_PASS );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::PRO_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::TAS_UID );
@@ -190,74 +188,44 @@ class CaseScheduler
* Checks if the user exists
*
* @param string $userName Name
* @param string $userPass Password
* @param string $sProcessUID Process
* @param string $sTaskUID Task
*
* return message
*/
public function getUser($userName, $userPass, $sProcessUID, $sTaskUID)
public function getUser($userName, $sTaskUID)
{
try {
$sPRO_UID = $sProcessUID;
$sTASKS = $sTaskUID;
$sWS_USER = trim( $userName );
$sWS_PASS = trim( $userPass );
if (\G::is_https()) {
$http = 'https://';
} else {
$http = 'http://';
}
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
@$client = new \SoapClient( $endpoint );
$user = $sWS_USER;
$pass = $sWS_PASS;
$params = array ('userid' => $user,'password' => $pass);
$result = $client->__SoapCall('login', array ($params));
$fields['status_code'] = $result->status_code;
$fields['message'] = 'ProcessMaker WebService version: ' . $result->version . "\n" . $result->message;
$fields['version'] = $result->version;
$fields['time_stamp'] = $result->timestamp;
$messageCode = 1;
\G::LoadClass( 'Task' );
\G::LoadClass( 'User' );
\G::LoadClass( 'TaskUser' );
\G::LoadClass( 'Groupwf' );
if (! class_exists( 'GroupUser' )) {
\G::LoadClass( 'GroupUser' );
}
if ($result->status_code == 0) {
$oCriteria = new \Criteria( 'workflow' );
$oCriteria->addSelectColumn( \UsersPeer::USR_UID );
$oCriteria->addSelectColumn( \TaskUserPeer::USR_UID );
$oCriteria->addSelectColumn( \TaskUserPeer::TAS_UID );
$oCriteria->addSelectColumn( \UsersPeer::USR_USERNAME );
$oCriteria->addSelectColumn( \UsersPeer::USR_FIRSTNAME );
$oCriteria->addSelectColumn( \UsersPeer::USR_LASTNAME );
$oCriteria->addJoin( \TaskUserPeer::USR_UID, \UsersPeer::USR_UID, \Criteria::LEFT_JOIN );
$oCriteria->add( \TaskUserPeer::TAS_UID, $sTASKS );
$oCriteria->add( \UsersPeer::USR_USERNAME, $sWS_USER );
$userIsAssigned = \TaskUserPeer::doCount( $oCriteria );
if ($userIsAssigned < 1) {
$oCriteria = new \Criteria( 'workflow' );
$oCriteria->addSelectColumn( \UsersPeer::USR_UID );
$oCriteria->addSelectColumn( \TaskUserPeer::USR_UID );
$oCriteria->addSelectColumn( \TaskUserPeer::TAS_UID );
$oCriteria->addSelectColumn( \UsersPeer::USR_USERNAME );
$oCriteria->addSelectColumn( \UsersPeer::USR_FIRSTNAME );
$oCriteria->addSelectColumn( \UsersPeer::USR_LASTNAME );
$oCriteria->addJoin( \TaskUserPeer::USR_UID, \UsersPeer::USR_UID, \Criteria::LEFT_JOIN );
$oCriteria->addJoin( \UsersPeer::USR_UID, \GroupUserPeer::USR_UID, \Criteria::LEFT_JOIN );
$oCriteria->addJoin( \GroupUserPeer::GRP_UID, \TaskUserPeer::USR_UID, \Criteria::LEFT_JOIN );
$oCriteria->add( \TaskUserPeer::TAS_UID, $sTASKS );
$oCriteria->add( \UsersPeer::USR_USERNAME, $sWS_USER );
$userIsAssigned = \TaskUserPeer::doCount( $oCriteria );
if ($userIsAssigned < 1) {
$oCriteria = new \Criteria( 'workflow' );
$oCriteria->addSelectColumn( \UsersPeer::USR_UID );
$oCriteria->addJoin( \UsersPeer::USR_UID, \GroupUserPeer::USR_UID, \Criteria::LEFT_JOIN );
$oCriteria->addJoin( \GroupUserPeer::GRP_UID, \TaskUserPeer::USR_UID, \Criteria::LEFT_JOIN );
$oCriteria->add( \TaskUserPeer::TAS_UID, $sTASKS );
$oCriteria->add( \UsersPeer::USR_USERNAME, $sWS_USER );
$userIsAssigned = \GroupUserPeer::doCount( $oCriteria );
if (! ($userIsAssigned >= 1)) {
throw (new \Exception( "The User \'" . $sWS_USER . "\' doesn't have the activity \'" . $sTASKS . "\' assigned"));
}
$userIsAssigned = \GroupUserPeer::doCount( $oCriteria );
if (! ($userIsAssigned >= 1)) {
throw (new \Exception( "The User \'" . $sWS_USER . "\' doesn't have the activity \'" . $sTASKS . "\' assigned"));
}
$oDataset = \TaskUserPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
}
$oDataset = \TaskUserPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$messageCode = $aRow['USR_UID'];
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$messageCode = $aRow['USR_UID'];
$oDataset->next();
}
} else {
throw (new \Exception( $result->message));
}
return $messageCode;
} catch (\Exception $e) {
@@ -295,12 +263,13 @@ class CaseScheduler
if ($this->existsName($sProcessUID, $aData['SCH_NAME'])) {
throw (new \Exception( 'Duplicate Case Scheduler name'));
}
$mUser = $this->getUser($aData['SCH_DEL_USER_NAME'], $aData['SCH_DEL_USER_PASS'], $sProcessUID, $aData['TAS_UID']);
$mUser = $this->getUser($aData['SCH_DEL_USER_NAME'], $aData['TAS_UID']);
$oUser = \UsersPeer::retrieveByPK( $mUser );
if (is_null($oUser)) {
throw (new \Exception($mUser));
}
$aData['SCH_DEL_USER_PASS'] = md5( $aData['SCH_DEL_USER_PASS']);
$oUserPass = $oUser->getUsrPassword();
$aData['SCH_DEL_USER_PASS'] = $oUserPass;
if ($sOption != '5') {
$pattern="/^([0-1][0-9]|[2][0-3])[\:]([0-5][0-9])$/";
if (!preg_match($pattern, $aData['SCH_START_TIME'])) {
@@ -586,12 +555,13 @@ class CaseScheduler
if ($this->existsNameUpdate($sSchUID, $aData['SCH_NAME'])) {
throw (new \Exception( 'Duplicate Case Scheduler name'));
}
$mUser = $this->getUser($aData['SCH_DEL_USER_NAME'], $aData['SCH_DEL_USER_PASS'], $sProcessUID, $aData['TAS_UID']);
$mUser = $this->getUser($aData['SCH_DEL_USER_NAME'], $aData['TAS_UID']);
$oUser = \UsersPeer::retrieveByPK( $mUser );
if (is_null($oUser)) {
throw (new \Exception($mUser));
}
$aData['SCH_DEL_USER_PASS'] = md5( $aData['SCH_DEL_USER_PASS']);
$oUserPass = $oUser->getUsrPassword();
$aData['SCH_DEL_USER_PASS'] = $oUserPass;
if ($sOption != '5') {
$pattern="/^([0-1][0-9]|[2][0-3])[\:]([0-5][0-9])$/";
if (!preg_match($pattern, $aData['SCH_START_TIME'])) {
@@ -850,12 +820,11 @@ class CaseScheduler
/**
* Delete a case scheduler of a project
*
* @param string $sProcessUID
* @param string $sSchUID
*
* @access public
*/
public function deleteCaseScheduler($sProcessUID, $sSchUID)
public function deleteCaseScheduler($sSchUID)
{
try {
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes". PATH_SEP . "model" . PATH_SEP . "CaseScheduler.php");

File diff suppressed because it is too large Load Diff

View File

@@ -462,192 +462,5 @@ class InputDocument
throw $e;
}
}
/**
* Get data of Cases InputDocument
*
* @param string $caseUid
* @param string $userUid
*
* return array Return an array with data of an InputDocument
*/
public function getCasesInputDocument($caseUid, $userUid)
{
try {
///
global $G_PUBLISH;
$defaultEndpoint = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/classic/services/wsdl2';
$endpoint = isset( $_SESSION['END_POINT'] ) ? $_SESSION['END_POINT'] : $defaultEndpoint;
$sessionId = isset( $_SESSION['SESSION_ID'] ) ? $_SESSION['SESSION_ID'] : '';
//Apply proxy settings
$proxy = array ();
$sysConf = \System::getSystemConfiguration();
if ($sysConf['proxy_host'] != '') {
$proxy['proxy_host'] = $sysConf['proxy_host'];
if ($sysConf['proxy_port'] != '') {
$proxy['proxy_port'] = $sysConf['proxy_port'];
}
if ($sysConf['proxy_user'] != '') {
$proxy['proxy_login'] = $sysConf['proxy_user'];
}
if ($sysConf['proxy_pass'] != '') {
$proxy['proxy_password'] = $sysConf['proxy_pass'];
}
}
@$client = new \SoapClient( $endpoint, $proxy );
///
$caseId = $caseUid;
$sessionId = $userUid;
$params = array ('sessionId' => $sessionId,'caseId' => $caseId);
$wsResponse = $client->__SoapCall( 'InputDocumentList', array ($params));
//g::pr($wsResponse);
$result = \G::PMWSCompositeResponse( $wsResponse, 'documents' );
$G_PUBLISH = new \Publisher();
$rows[] = array ('guid' => 'char','name' => 'char','processId' => 'char');
if (is_array( $result )) {
foreach ($result as $key => $item) {
if (isset( $item->item )) {
foreach ($item->item as $index => $val) {
if ($val->key == 'guid') {
$guid = $val->value;
}
if ($val->key == 'filename') {
$filename = $val->value;
}
if ($val->key == 'docId') {
$docId = $val->value;
}
if ($val->key == 'version') {
$version = $val->value;
}
if ($val->key == 'createDate') {
$createDate = $val->value;
}
if ($val->key == 'createBy') {
$createBy = $val->value;
}
if ($val->key == 'type') {
$type = $val->value;
}
if ($val->key == 'link') {
$link = $val->value;
}
}
} elseif (is_array( $item )) {
foreach ($item as $index => $val) {
if ($val->key == 'guid') {
$guid = $val->value;
}
if ($val->key == 'filename') {
$filename = $val->value;
}
if ($val->key == 'docId') {
$docId = $val->value;
}
if ($val->key == 'version') {
$version = $val->value;
}
if ($val->key == 'createDate') {
$createDate = $val->value;
}
if ($val->key == 'createBy') {
$createBy = $val->value;
}
if ($val->key == 'type') {
$type = $val->value;
}
if ($val->key == 'link') {
$link = $val->value;
}
}
} else {
if (isset( $item->guid )) {
$guid = $item->guid;
}
if (isset( $item->filename )) {
$filename = $item->filename;
}
if (isset( $item->docId )) {
$docId = $item->docId;
}
if (isset( $item->version )) {
$version = $item->version;
}
if (isset( $item->createDate )) {
$createDate = $item->createDate;
}
if (isset( $item->createBy )) {
$createBy = $item->createBy;
}
if (isset( $item->type )) {
$type = $item->type;
}
if (isset( $item->link )) {
$link = $item->link;
}
}
$rows[] = array ('guid' => $guid,'filename' => $filename,'docId' => $docId,'version' => $version,'createDate' => $createDate,'createBy' => $createBy,'type' => $type,'link' => $link);
}
}
return $rows;
/* testing//
global $_DBArray;
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
$_DBArray['inputDocument'] = $rows;
$documentArray = array ();
$documentArray[] = array ('guid' => 'char','filename' => 'char'
);
if (isset( $_DBArray['inputDocument'] )) {
foreach ($_DBArray['inputDocument'] as $key => $val) {
if ($key != 0 && isset( $val['filename'] )) {
$documentArray[] = array ('guid' => $val['guid'],'filename' => $val['filename']
);
}
}
}
if (isset( $_DBArray['outputDocument'] )) {
foreach ($_DBArray['outputDocument'] as $key => $val) {
if ($key != 0 && isset( $val['filename'] )) {
$documentArray[] = array ('guid' => $val['guid'],'filename' => $val['filename']
);
}
}
}
$_DBArray['documents'] = $documentArray;
$_DBArray['WS_TMP_CASE_UID'] = $frm["CASE_ID"];
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass( 'ArrayPeer' );
$c = new Criteria( 'dbarray' );
$c->setDBArrayTable( 'inputDocument' );
$c->addAscendingOrderByColumn( 'name' );
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'setup/wsrInputDocumentList', $c );
} elseif (is_object( $result )) {
$_SESSION['WS_SESSION_ID'] = '';
$fields['status_code'] = $result->status_code;
$fields['message'] = $result->message;
$fields['time_stamp'] = date( "Y-m-d H:i:s" );
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
}
G::RenderPage( 'publish', 'raw' );
break;*/
} catch (\Exception $e) {
throw $e;
}
}
}

View File

@@ -175,9 +175,8 @@ class Cases extends Api
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$arrayData = $cases->getCaseInfo($cas_uid, $userUid);
$response = $arrayData;
return $response;
$oData = $cases->getCaseInfo($cas_uid, $userUid);
return $oData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
@@ -188,13 +187,12 @@ class Cases extends Api
*
* @param string $cas_uid {@min 32}{@max 32}
*/
public function doGetTaskCase($cas_uid)
public function doGetTaskCase($cas_uid)
{
try {
$cases = new \BusinessModel\Cases();
$arrayData = $cases->getTaskCase($cas_uid);
$response = $arrayData;
return $response;
$oData = $cases->getTaskCase($cas_uid);
return $oData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
@@ -214,8 +212,7 @@ class Cases extends Api
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$arrayData = $cases->addCase($prj_uid, $act_uid, $userUid, $variables);
$response = $arrayData;
return $response;
return $arrayData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
@@ -229,13 +226,12 @@ class Cases extends Api
* @param string $act_uid {@from body} {@min 32}{@max 32}
* @param array $variables {@from body}
*/
public function doPostCaseImpersonate($prj_uid, $usr_uid, $act_uid, $variables)
public function doPostCaseImpersonate($prj_uid, $usr_uid, $act_uid, $variables=null)
{
try {
$cases = new \BusinessModel\Cases();
$arrayData = $cases->addCaseImpersonate($prj_uid, $usr_uid, $act_uid, $variables);
$response = $arrayData;
return $response;
return $arrayData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
@@ -254,8 +250,7 @@ class Cases extends Api
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$arrayData = $cases->updateReassignCase($cas_uid, $userUid, $del_index, $usr_uid_source, $usr_uid_target);
$response = $arrayData;
return $response;
return $arrayData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
@@ -268,14 +263,13 @@ class Cases extends Api
* @param string $usr_uid_source {@from body} {@min 32}{@max 32}
* @param string $usr_uid_target {@from body} {@min 32}{@max 32}
*/
public function doPutRouteCase($cas_uid, $del_index, $usr_uid_source, $usr_uid_target)
public function doPutRouteCase($cas_uid, $del_index)
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$arrayData = $cases->updateRouteCase($cas_uid, $userUid, $del_index, $usr_uid_source, $usr_uid_target);
$response = $arrayData;
return $response;
$arrayData = $cases->updateRouteCase($cas_uid, $userUid, $del_index);
return $arrayData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}

View File

@@ -108,7 +108,7 @@ class CaseScheduler extends Api
{
try {
$caseScheduler = new \BusinessModel\CaseScheduler();
$caseScheduler->deleteCaseScheduler($prjUid, $schUid);
$caseScheduler->deleteCaseScheduler($schUid);
} catch (\Exception $e) {
//response
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
@@ -128,11 +128,6 @@ class CaseSchedulerStructure
*/
public $sch_del_user_name;
/**
* @var string {@from body} {@min 0} {@max 100}
*/
public $sch_del_user_pass;
/**
* @var string {@from body} {@min 0} {@max 100}
*/

View File

@@ -0,0 +1,175 @@
<?php
namespace Tests\BusinessModel;
if (!class_exists("Propel")) {
include_once (__DIR__ . "/../bootstrap.php");
}
/**
* Class Cases Test
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*
* @protected
* @package Tests\BusinessModel
*/
class CasesTest extends \PHPUnit_Framework_TestCase
{
protected $oCases;
/**
* Set class for test
*
* @coversNothing
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
public function setUp()
{
$this->oCases = new \BusinessModel\Cases();
return true;
}
/**
* Test error for type in first field the function
*
* @covers \BusinessModel\Cases::getList
* @expectedException Exception
* @expectedExceptionMessage Invalid value for '$dataList' it must be an array.
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
public function testGetListCasesErrorArray()
{
$this->oCases->getList(true);
}
/**
* Test error for empty userId in array
*
* @covers \BusinessModel\Cases::getList
* @expectedException Exception
* @expectedExceptionMessage The user with userId: '' does not exist.
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
public function testGetListCasesErrorUserIdArray()
{
$this->oCases->getList(array());
}
/**
* Test error for not exists userId in array
*
* @covers \BusinessModel\Cases::getList
* @expectedException Exception
* @expectedExceptionMessage The user with userId: 'UidInexistente' does not exist.
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
public function testGetListCasesErrorNotExistsUserIdArray()
{
$this->oCases->getList(array('userId' => 'UidInexistente'));
}
/**
* Test error for incorrect value $action in array
*
* @covers \BusinessModel\Cases::getList
* @expectedException Exception
* @expectedExceptionMessage The value for $action is incorrect.
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
public function testGetListCasesErrorIncorrectValueArray()
{
$this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'incorrect'));
}
/**
* Test get list to do
*
* @covers \BusinessModel\Cases::getList
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
public function testGetListCasesToDo()
{
$response = $this->oCases->getList(array('userId' => '00000000000000000000000000000001'));
$this->assertTrue(is_array($response));
$this->assertTrue(is_numeric($response['totalCount']));
$this->assertTrue(is_array($response['data']));
}
/**
* Test get list draft
*
* @covers \BusinessModel\Cases::getList
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
public function testGetListCasesDraft()
{
$response = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'draft'));
$this->assertTrue(is_array($response));
$this->assertTrue(is_numeric($response['totalCount']));
$this->assertTrue(is_array($response['data']));
}
/**
* Test get list participated
*
* @covers \BusinessModel\Cases::getList
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
public function testGetListCasesParticipated()
{
$response = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'sent'));
$this->assertTrue(is_array($response));
$this->assertTrue(is_numeric($response['totalCount']));
$this->assertTrue(is_array($response['data']));
}
/**
* Test get list unassigned
*
* @covers \BusinessModel\Cases::getList
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
public function testGetListCasesUnassigned()
{
$response = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'unassigned'));
$this->assertTrue(is_array($response));
$this->assertTrue(is_numeric($response['totalCount']));
$this->assertTrue(is_array($response['data']));
}
/**
* Test get list search
*
* @covers \BusinessModel\Cases::getList
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
public function testGetListCasesSearch()
{
$response = $this->oCases->getList(array('userId' => '00000000000000000000000000000001', 'action' => 'search'));
$this->assertTrue(is_array($response));
$this->assertTrue(is_numeric($response['totalCount']));
$this->assertTrue(is_array($response['data']));
}
}