@cqa-lib/cqa-ui 1.1.356 → 1.1.357
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 +13 -5
- package/fesm2015/cqa-lib-cqa-ui.mjs +14 -4
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +12 -4
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/test-case-details/condition-step/condition-step.component.d.ts +9 -2
- package/package.json +1 -1
|
@@ -24341,6 +24341,7 @@ class TestCaseConditionStepComponent {
|
|
|
24341
24341
|
this.addBranch = new EventEmitter();
|
|
24342
24342
|
/** Emitted when user clicks "Add Else" so the parent can call POST test_steps with conditionType CONDITION_ELSE */
|
|
24343
24343
|
this.addElse = new EventEmitter();
|
|
24344
|
+
/** Payload can be branch only (legacy) or { branch, stepNumber } for delete modal label e.g. "Step 5 ELSE". */
|
|
24344
24345
|
this.deleteBranch = new EventEmitter();
|
|
24345
24346
|
this.duplicate = new EventEmitter();
|
|
24346
24347
|
this.delete = new EventEmitter();
|
|
@@ -24936,7 +24937,9 @@ class TestCaseConditionStepComponent {
|
|
|
24936
24937
|
this.addBranch.emit();
|
|
24937
24938
|
}
|
|
24938
24939
|
onDeleteBranch(branch) {
|
|
24939
|
-
this.
|
|
24940
|
+
const branchIndex = this.branches?.indexOf(branch) ?? 0;
|
|
24941
|
+
const displayNumber = this.getBranchDisplayNumber(branchIndex);
|
|
24942
|
+
this.deleteBranch.emit({ branch, stepNumber: displayNumber });
|
|
24940
24943
|
}
|
|
24941
24944
|
onNestedConditionAddBranch(nestedStep) {
|
|
24942
24945
|
// Add a new branch to the nested condition step
|
|
@@ -24951,10 +24954,15 @@ class TestCaseConditionStepComponent {
|
|
|
24951
24954
|
};
|
|
24952
24955
|
nestedStep.branches.push(newBranch);
|
|
24953
24956
|
}
|
|
24954
|
-
onNestedConditionDeleteBranch(nestedStep,
|
|
24957
|
+
onNestedConditionDeleteBranch(nestedStep, payload) {
|
|
24955
24958
|
// Re-emit deleteBranch so step-list can open delete modal and call API.
|
|
24956
|
-
|
|
24957
|
-
this.
|
|
24959
|
+
const branch = payload && typeof payload === 'object' && 'branch' in payload ? payload.branch : payload;
|
|
24960
|
+
const branchIndex = this.branches?.indexOf(branch) ?? 0;
|
|
24961
|
+
const displayNumber = this.getBranchDisplayNumber(branchIndex);
|
|
24962
|
+
const toEmit = payload && typeof payload === 'object' && 'branch' in payload
|
|
24963
|
+
? { branch: payload.branch, stepNumber: payload.stepNumber ?? displayNumber }
|
|
24964
|
+
: { branch: payload, stepNumber: displayNumber };
|
|
24965
|
+
this.deleteBranch.emit(toEmit);
|
|
24958
24966
|
}
|
|
24959
24967
|
isNormalStep(step) {
|
|
24960
24968
|
return 'eventType' in step;
|