complexqa_frontend_core 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/publish/complexqa_frontend_core.js +235 -10
package/package.json
CHANGED
|
@@ -234,6 +234,24 @@ export class ApiAbstractElementClass
|
|
|
234
234
|
throw new Error('Error #10-1152 in ApiAbstractClass');
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
if (this.stage === 'development')
|
|
238
|
+
{
|
|
239
|
+
return {
|
|
240
|
+
response: payload,
|
|
241
|
+
payload : payload
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
let url = `/${ this.api_prefix }/${ this.module_prefix }/update_property`;
|
|
246
|
+
|
|
247
|
+
payload = this.#handle_request_payload(payload);
|
|
248
|
+
let response = this.#api_request(url, payload);
|
|
249
|
+
response = this.#handle_response(response);
|
|
250
|
+
|
|
251
|
+
return {
|
|
252
|
+
response: response,
|
|
253
|
+
payload : payload
|
|
254
|
+
};
|
|
237
255
|
}
|
|
238
256
|
|
|
239
257
|
|
|
@@ -249,6 +267,24 @@ export class ApiAbstractElementClass
|
|
|
249
267
|
throw new Error('Error #10-1152 in ApiAbstractClass');
|
|
250
268
|
}
|
|
251
269
|
|
|
270
|
+
if (this.stage === 'development')
|
|
271
|
+
{
|
|
272
|
+
return {
|
|
273
|
+
response: payload,
|
|
274
|
+
payload : payload
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
let url = `/${ this.api_prefix }/${ this.module_prefix }/delete`;
|
|
279
|
+
|
|
280
|
+
payload = this.#handle_request_payload(payload);
|
|
281
|
+
let response = this.#api_request(url, payload);
|
|
282
|
+
response = this.#handle_response(response);
|
|
283
|
+
|
|
284
|
+
return {
|
|
285
|
+
response: response,
|
|
286
|
+
payload : payload
|
|
287
|
+
};
|
|
252
288
|
}
|
|
253
289
|
|
|
254
290
|
|
|
@@ -547,6 +583,7 @@ export class Api
|
|
|
547
583
|
this.test_plan = new TestPlanApi(payload);
|
|
548
584
|
this.project = new ProjectApi(payload);
|
|
549
585
|
this.service = new ServiceApi(payload);
|
|
586
|
+
this.test_case = new TestCaseApi(payload);
|
|
550
587
|
}
|
|
551
588
|
}
|
|
552
589
|
|
|
@@ -2363,6 +2400,7 @@ export class typeTeam extends familyGeneralElement
|
|
|
2363
2400
|
users_get() {}
|
|
2364
2401
|
}
|
|
2365
2402
|
|
|
2403
|
+
|
|
2366
2404
|
/**
|
|
2367
2405
|
* @version v.0.2 (11/11/2024)
|
|
2368
2406
|
*/
|
|
@@ -2510,13 +2548,13 @@ export class typeTestCase extends familyGeneralElement
|
|
|
2510
2548
|
project_id : 'integer | require',
|
|
2511
2549
|
team_id : 'integer | require',
|
|
2512
2550
|
functional_id : 'integer | optional',
|
|
2513
|
-
test_case_title
|
|
2551
|
+
test_case_title : 'string | require',
|
|
2514
2552
|
test_case_descriptions : 'string | require',
|
|
2515
2553
|
test_case_time_to_execute: 'integer | optional',
|
|
2516
2554
|
test_case_complexity : 'string | enum | optional',
|
|
2517
2555
|
test_case_importance : 'string | enum | optional',
|
|
2518
|
-
created_at
|
|
2519
|
-
updated_at
|
|
2556
|
+
created_at : 'timestamp | require',
|
|
2557
|
+
updated_at : 'timestamp | optional',
|
|
2520
2558
|
};
|
|
2521
2559
|
|
|
2522
2560
|
available_enum_values = {
|
|
@@ -2555,29 +2593,179 @@ export class typeTestCase extends familyGeneralElement
|
|
|
2555
2593
|
|
|
2556
2594
|
/**
|
|
2557
2595
|
*
|
|
2558
|
-
* @
|
|
2596
|
+
* @param {familyGeneralElement|object} payload
|
|
2597
|
+
*
|
|
2598
|
+
* @param {typeFunctionCallback|object|false} callback
|
|
2599
|
+
*
|
|
2600
|
+
* @param {?function} callback.before
|
|
2601
|
+
* @param {?function} callback.success
|
|
2602
|
+
* @param {?function} callback.error
|
|
2603
|
+
* @param {?function} callback.final
|
|
2604
|
+
*
|
|
2605
|
+
* @version v.0.1 (17/05/2025)
|
|
2559
2606
|
*/
|
|
2560
|
-
async create()
|
|
2561
|
-
{
|
|
2607
|
+
async create(payload, callback)
|
|
2608
|
+
{
|
|
2609
|
+
if (typeof callback?.before === 'function')
|
|
2610
|
+
{
|
|
2611
|
+
callback?.before({ payload });
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
payload = this.normalize_payload(payload);
|
|
2615
|
+
|
|
2616
|
+
|
|
2617
|
+
/**
|
|
2618
|
+
* {Api} ApiService
|
|
2619
|
+
*/
|
|
2620
|
+
return ApiService.test_case.create(payload).then((response) =>
|
|
2621
|
+
{
|
|
2622
|
+
if (typeof callback?.success === 'function')
|
|
2623
|
+
{
|
|
2624
|
+
callback?.success({ response, payload })
|
|
2625
|
+
}
|
|
2626
|
+
}).catch((error) =>
|
|
2627
|
+
{
|
|
2628
|
+
echo({ error });
|
|
2629
|
+
if (typeof callback?.error === 'function')
|
|
2630
|
+
{
|
|
2631
|
+
callback?.error({ error, payload })
|
|
2632
|
+
}
|
|
2633
|
+
}).finally((response) =>
|
|
2634
|
+
{
|
|
2635
|
+
if (typeof callback?.final === 'function')
|
|
2636
|
+
{
|
|
2637
|
+
callback?.final({ response, payload })
|
|
2638
|
+
}
|
|
2639
|
+
});
|
|
2640
|
+
}
|
|
2562
2641
|
|
|
2563
2642
|
|
|
2564
2643
|
/**
|
|
2565
2644
|
*
|
|
2566
2645
|
* @version v.0.1 (07/07/2024)
|
|
2567
2646
|
*/
|
|
2568
|
-
async update()
|
|
2647
|
+
async update(payload, callback)
|
|
2569
2648
|
{
|
|
2649
|
+
if (typeof callback?.before === 'function')
|
|
2650
|
+
{
|
|
2651
|
+
callback?.before({ payload });
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
payload = this.normalize_payload(payload);
|
|
2570
2655
|
|
|
2656
|
+
|
|
2657
|
+
/**
|
|
2658
|
+
* {Api} ApiService
|
|
2659
|
+
*/
|
|
2660
|
+
return ApiService.test_case.update(payload).then((response) =>
|
|
2661
|
+
{
|
|
2662
|
+
if (typeof callback?.success === 'function')
|
|
2663
|
+
{
|
|
2664
|
+
callback?.success({ response, payload })
|
|
2665
|
+
}
|
|
2666
|
+
}).catch((error) =>
|
|
2667
|
+
{
|
|
2668
|
+
echo({ error });
|
|
2669
|
+
if (typeof callback?.error === 'function')
|
|
2670
|
+
{
|
|
2671
|
+
callback?.error({ error, payload })
|
|
2672
|
+
}
|
|
2673
|
+
}).finally((response) =>
|
|
2674
|
+
{
|
|
2675
|
+
if (typeof callback?.final === 'function')
|
|
2676
|
+
{
|
|
2677
|
+
callback?.final({ response, payload })
|
|
2678
|
+
}
|
|
2679
|
+
});
|
|
2571
2680
|
}
|
|
2572
2681
|
|
|
2573
2682
|
|
|
2574
2683
|
/**
|
|
2575
2684
|
*
|
|
2576
|
-
* @
|
|
2685
|
+
* @param key
|
|
2686
|
+
* @param value
|
|
2687
|
+
* @param callback
|
|
2688
|
+
* @returns {Promise<>}
|
|
2577
2689
|
*/
|
|
2578
|
-
async
|
|
2690
|
+
async update_property(key, value, callback)
|
|
2691
|
+
{
|
|
2692
|
+
let payload = {
|
|
2693
|
+
key : key,
|
|
2694
|
+
value : value,
|
|
2695
|
+
test_case_id: this.test_case_id
|
|
2696
|
+
};
|
|
2697
|
+
|
|
2698
|
+
if (typeof callback?.before === 'function')
|
|
2699
|
+
{
|
|
2700
|
+
callback?.before({ payload });
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2703
|
+
/**
|
|
2704
|
+
* {Api} ApiService
|
|
2705
|
+
*/
|
|
2706
|
+
return ApiService.test_case.update_property(payload).then((response) =>
|
|
2707
|
+
{
|
|
2708
|
+
if (typeof callback?.success === 'function')
|
|
2709
|
+
{
|
|
2710
|
+
callback?.success({ response, payload })
|
|
2711
|
+
}
|
|
2712
|
+
}).catch((error) =>
|
|
2713
|
+
{
|
|
2714
|
+
echo({ error });
|
|
2715
|
+
if (typeof callback?.error === 'function')
|
|
2716
|
+
{
|
|
2717
|
+
callback?.error({ error, payload })
|
|
2718
|
+
}
|
|
2719
|
+
}).finally((response) =>
|
|
2720
|
+
{
|
|
2721
|
+
if (typeof callback?.final === 'function')
|
|
2722
|
+
{
|
|
2723
|
+
callback?.final({ response, payload })
|
|
2724
|
+
}
|
|
2725
|
+
});
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
|
|
2729
|
+
/**
|
|
2730
|
+
*
|
|
2731
|
+
* @version v.0.1 (17/05/2025)
|
|
2732
|
+
*/
|
|
2733
|
+
async delete(element = false, callback = {})
|
|
2579
2734
|
{
|
|
2735
|
+
if (!element)
|
|
2736
|
+
{
|
|
2737
|
+
element = this;
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2740
|
+
let payload = {
|
|
2741
|
+
test_case_id: element.test_case_id
|
|
2742
|
+
};
|
|
2743
|
+
|
|
2744
|
+
if (typeof callback?.before === 'function')
|
|
2745
|
+
{
|
|
2746
|
+
callback?.before({ payload });
|
|
2747
|
+
}
|
|
2580
2748
|
|
|
2749
|
+
return ApiService.test_case.delete(payload).then((response) =>
|
|
2750
|
+
{
|
|
2751
|
+
if (typeof callback?.success === 'function')
|
|
2752
|
+
{
|
|
2753
|
+
callback?.success({ response, payload })
|
|
2754
|
+
}
|
|
2755
|
+
}).catch((error) =>
|
|
2756
|
+
{
|
|
2757
|
+
echo({ error });
|
|
2758
|
+
if (typeof callback?.error === 'function')
|
|
2759
|
+
{
|
|
2760
|
+
callback?.error({ error, payload })
|
|
2761
|
+
}
|
|
2762
|
+
}).finally((response) =>
|
|
2763
|
+
{
|
|
2764
|
+
if (typeof callback?.final === 'function')
|
|
2765
|
+
{
|
|
2766
|
+
callback?.final({ response, payload })
|
|
2767
|
+
}
|
|
2768
|
+
});
|
|
2581
2769
|
}
|
|
2582
2770
|
|
|
2583
2771
|
|
|
@@ -2944,13 +3132,50 @@ export class typeAppConfiguration extends familyService
|
|
|
2944
3132
|
}
|
|
2945
3133
|
}
|
|
2946
3134
|
|
|
3135
|
+
/**
|
|
3136
|
+
*
|
|
3137
|
+
* @version v.1.0 (25/05/2025)
|
|
3138
|
+
*/
|
|
3139
|
+
export class typeFilter extends familyService
|
|
3140
|
+
{
|
|
3141
|
+
object = {
|
|
3142
|
+
attribute : false,
|
|
3143
|
+
};
|
|
3144
|
+
operator;
|
|
3145
|
+
value;
|
|
3146
|
+
|
|
3147
|
+
/**
|
|
3148
|
+
*
|
|
3149
|
+
* @version v.1.0 (25/05/2025)
|
|
3150
|
+
* @param {any} data
|
|
3151
|
+
* @param {boolean} normalize
|
|
3152
|
+
* @return {typeFilter}
|
|
3153
|
+
*/
|
|
3154
|
+
constructor(data = null, normalize = false)
|
|
3155
|
+
{
|
|
3156
|
+
super();
|
|
3157
|
+
if (data && typeof data === 'object')
|
|
3158
|
+
{
|
|
3159
|
+
_.mapObject(data, (value, key) =>
|
|
3160
|
+
{
|
|
3161
|
+
if (this.hasOwnProperty(key))
|
|
3162
|
+
{
|
|
3163
|
+
this [ key ] = value;
|
|
3164
|
+
}
|
|
3165
|
+
});
|
|
3166
|
+
}
|
|
3167
|
+
|
|
3168
|
+
return this;
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
|
|
2947
3172
|
/**
|
|
2948
3173
|
*
|
|
2949
3174
|
* @version v.0.1 (26/01/2025)
|
|
2950
3175
|
*/
|
|
2951
3176
|
export class typeFOR extends familyService
|
|
2952
3177
|
{
|
|
2953
|
-
|
|
3178
|
+
filters;
|
|
2954
3179
|
object;
|
|
2955
3180
|
response;
|
|
2956
3181
|
|