@cqa-lib/cqa-ui 1.1.275 → 1.1.277
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/esm2020/lib/test-case-details/condition-step/condition-step.component.mjs +23 -8
- package/esm2020/lib/test-case-details/loop-step/loop-step.component.mjs +13 -5
- package/esm2020/lib/test-case-details/test-case-details-renderer/test-case-details-renderer.component.mjs +9 -2
- package/fesm2015/cqa-lib-cqa-ui.mjs +44 -13
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +42 -12
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/test-case-details/condition-step/condition-step.component.d.ts +2 -1
- package/lib/test-case-details/loop-step/loop-step.component.d.ts +2 -1
- package/lib/test-case-details/test-case-details-renderer/test-case-details-renderer.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -21861,7 +21861,14 @@ class TestCaseDetailsRendererComponent {
|
|
|
21861
21861
|
const editInDepthSub = instance.editInDepth.subscribe((v) => {
|
|
21862
21862
|
// If child component emits an object with step, use it; otherwise use current step and index
|
|
21863
21863
|
if (v != null && typeof v === 'object' && 'step' in v) {
|
|
21864
|
-
|
|
21864
|
+
const payload = {
|
|
21865
|
+
step: v.step,
|
|
21866
|
+
index: v.index ?? this.index,
|
|
21867
|
+
};
|
|
21868
|
+
if (v.templateOverride) {
|
|
21869
|
+
payload.templateOverride = v.templateOverride;
|
|
21870
|
+
}
|
|
21871
|
+
this.editInDepth.emit(payload);
|
|
21865
21872
|
}
|
|
21866
21873
|
else {
|
|
21867
21874
|
this.editInDepth.emit({ step: this.step, index: this.index });
|
|
@@ -22414,8 +22421,9 @@ class TestCaseLoopStepComponent {
|
|
|
22414
22421
|
}
|
|
22415
22422
|
this.cdr.detectChanges();
|
|
22416
22423
|
}
|
|
22417
|
-
// Auto-open Edit In depth
|
|
22418
|
-
|
|
22424
|
+
// Auto-open Edit In depth when user selects a condition from the autocomplete.
|
|
22425
|
+
// Pass fullTemplate so the modal shows the newly selected template, not the old step template.
|
|
22426
|
+
setTimeout(() => this.onEditInDepth(fullTemplate), 100);
|
|
22419
22427
|
}
|
|
22420
22428
|
buildTemplateVariablesForm() {
|
|
22421
22429
|
if (!this.templateVariablesForm) {
|
|
@@ -23048,10 +23056,17 @@ class TestCaseLoopStepComponent {
|
|
|
23048
23056
|
}
|
|
23049
23057
|
this.isEditing = false;
|
|
23050
23058
|
}
|
|
23051
|
-
onEditInDepth() {
|
|
23059
|
+
onEditInDepth(templateOverride) {
|
|
23052
23060
|
this.moreOptions.emit();
|
|
23053
23061
|
const index = typeof this.stepNumber === 'number' ? this.stepNumber : (typeof this.stepNumber === 'string' ? parseInt(this.stepNumber, 10) : 0);
|
|
23054
|
-
|
|
23062
|
+
const payload = {
|
|
23063
|
+
step: this.config,
|
|
23064
|
+
index: isNaN(index) ? 0 : index,
|
|
23065
|
+
};
|
|
23066
|
+
if (templateOverride) {
|
|
23067
|
+
payload.templateOverride = templateOverride;
|
|
23068
|
+
}
|
|
23069
|
+
this.editInDepth.emit(payload);
|
|
23055
23070
|
}
|
|
23056
23071
|
onLink() {
|
|
23057
23072
|
// Not used in loop step, but needed for recursive step groups
|
|
@@ -23484,7 +23499,11 @@ class TestCaseConditionStepComponent {
|
|
|
23484
23499
|
// If template not in option, try to find from naturalTextActionsOptions by matching naturalText
|
|
23485
23500
|
let fullTemplate = matchingTemplate;
|
|
23486
23501
|
if (!fullTemplate || !fullTemplate.variables) {
|
|
23487
|
-
const
|
|
23502
|
+
const optVal = (option.value ?? '').toString().trim();
|
|
23503
|
+
const matchingOption = this.naturalTextActionsOptions.find((opt) => {
|
|
23504
|
+
const n = (opt.naturalText ?? opt.name ?? opt.value ?? '').toString().trim();
|
|
23505
|
+
return n === optVal || (opt.template && opt.template.naturalText?.toString().trim() === optVal);
|
|
23506
|
+
});
|
|
23488
23507
|
// Use template property from option if available, otherwise use the option itself
|
|
23489
23508
|
fullTemplate = matchingOption?.template || matchingOption;
|
|
23490
23509
|
}
|
|
@@ -23516,8 +23535,11 @@ class TestCaseConditionStepComponent {
|
|
|
23516
23535
|
// Trigger change detection to update the template
|
|
23517
23536
|
this.cdr.detectChanges();
|
|
23518
23537
|
}
|
|
23519
|
-
// Auto-open Edit In depth
|
|
23520
|
-
|
|
23538
|
+
// Auto-open Edit In depth when user selects a condition from the autocomplete.
|
|
23539
|
+
// Pass the selected template so the modal shows the newly selected template, not the old step template.
|
|
23540
|
+
// Prefer selectedTemplate (validated), then fullTemplate, then option.template (from autocomplete)
|
|
23541
|
+
const templateToPass = this.selectedTemplate || fullTemplate || option.template;
|
|
23542
|
+
setTimeout(() => this.onEditInDepth(templateToPass), 100);
|
|
23521
23543
|
}
|
|
23522
23544
|
buildTemplateVariablesForm() {
|
|
23523
23545
|
if (!this.templateVariablesForm) {
|
|
@@ -23582,8 +23604,9 @@ class TestCaseConditionStepComponent {
|
|
|
23582
23604
|
// Trigger change detection to update the template
|
|
23583
23605
|
this.cdr.detectChanges();
|
|
23584
23606
|
}
|
|
23585
|
-
// Auto-open Edit In depth
|
|
23586
|
-
|
|
23607
|
+
// Auto-open Edit In depth when user selects a condition from the ELSE IF autocomplete.
|
|
23608
|
+
// Pass fullTemplate so the modal shows the newly selected template, not the old step template.
|
|
23609
|
+
setTimeout(() => this.onEditInDepth(fullTemplate), 100);
|
|
23587
23610
|
}
|
|
23588
23611
|
buildElseTemplateVariablesForm(branch) {
|
|
23589
23612
|
if (!branch.templateVariablesForm) {
|
|
@@ -24029,10 +24052,17 @@ class TestCaseConditionStepComponent {
|
|
|
24029
24052
|
this.stepUpdate.emit(updatedConfig);
|
|
24030
24053
|
this.editContext = null;
|
|
24031
24054
|
}
|
|
24032
|
-
onEditInDepth() {
|
|
24055
|
+
onEditInDepth(templateOverride) {
|
|
24033
24056
|
this.moreOptions.emit();
|
|
24034
24057
|
const index = typeof this.stepNumber === 'number' ? this.stepNumber : (typeof this.stepNumber === 'string' ? parseInt(this.stepNumber, 10) : 0);
|
|
24035
|
-
|
|
24058
|
+
const payload = {
|
|
24059
|
+
step: this.config,
|
|
24060
|
+
index: isNaN(index) ? 0 : index,
|
|
24061
|
+
};
|
|
24062
|
+
if (templateOverride) {
|
|
24063
|
+
payload.templateOverride = templateOverride;
|
|
24064
|
+
}
|
|
24065
|
+
this.editInDepth.emit(payload);
|
|
24036
24066
|
}
|
|
24037
24067
|
onLink() {
|
|
24038
24068
|
// Not used in condition step, but needed for recursive step groups
|