@cqa-lib/cqa-ui 1.1.342 → 1.1.343
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/step-builder/step-builder-action/step-builder-action.component.mjs +6 -2
- package/esm2020/lib/step-builder/template-variables-form/template-variables-form.component.mjs +21 -4
- package/fesm2015/cqa-lib-cqa-ui.mjs +26 -6
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +25 -4
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -31063,12 +31063,12 @@ class TemplateVariablesFormComponent {
|
|
|
31063
31063
|
* Get select config for test data profile dropdown (first dropdown for parameters)
|
|
31064
31064
|
*/
|
|
31065
31065
|
getTestDataProfileSelectConfig(variable, index) {
|
|
31066
|
-
var _a, _b, _c, _d;
|
|
31066
|
+
var _a, _b, _c, _d, _e, _f;
|
|
31067
31067
|
const cacheKey = `${variable.name}_testDataProfile`;
|
|
31068
31068
|
// Get unique test data profiles
|
|
31069
31069
|
const profiles = this.getUniqueTestDataProfiles();
|
|
31070
31070
|
// Create options with profile name and ID (display name with ID)
|
|
31071
|
-
|
|
31071
|
+
let optionsArray = profiles.map(profile => {
|
|
31072
31072
|
// Find the test data profile to get the ID
|
|
31073
31073
|
const testDataProfile = this.parameterOptions.find((testData) => {
|
|
31074
31074
|
const name = testData.name || testData.testDataName;
|
|
@@ -31119,9 +31119,26 @@ class TemplateVariablesFormComponent {
|
|
|
31119
31119
|
}
|
|
31120
31120
|
}
|
|
31121
31121
|
}
|
|
31122
|
-
//
|
|
31122
|
+
// Ensure the currently selected profile is always in the options list so when the user
|
|
31123
|
+
// reopens the select after searching/selecting, the selected option still shows.
|
|
31124
|
+
const currentFormValue = (_e = variableGroup === null || variableGroup === void 0 ? void 0 : variableGroup.get('selectedTestDataProfile')) === null || _e === void 0 ? void 0 : _e.value;
|
|
31125
|
+
const selectedId = variable.selectedTestDataProfileId != null ? String(variable.selectedTestDataProfileId) : (currentFormValue != null && currentFormValue !== '' ? String(currentFormValue) : null);
|
|
31126
|
+
if (selectedId && !optionsArray.some(opt => String(opt.id) === selectedId)) {
|
|
31127
|
+
const displayName = variable.selectedTestDataProfile || selectedId;
|
|
31128
|
+
optionsArray = [
|
|
31129
|
+
{ id: selectedId, value: displayName, name: displayName, label: displayName },
|
|
31130
|
+
...optionsArray
|
|
31131
|
+
];
|
|
31132
|
+
}
|
|
31133
|
+
// Only use cache if the cached config's options include the current selection (so reopening shows selected)
|
|
31123
31134
|
if (this.testDataProfileSelectConfigCache.has(cacheKey)) {
|
|
31124
|
-
|
|
31135
|
+
const cached = this.testDataProfileSelectConfigCache.get(cacheKey);
|
|
31136
|
+
const controlVal = (_f = variableGroup === null || variableGroup === void 0 ? void 0 : variableGroup.get('selectedTestDataProfile')) === null || _f === void 0 ? void 0 : _f.value;
|
|
31137
|
+
const selectedInCached = controlVal == null || controlVal === '' || (cached.options || []).some((o) => String(o.id) === String(controlVal) || o.value === controlVal);
|
|
31138
|
+
if (selectedInCached) {
|
|
31139
|
+
return cached;
|
|
31140
|
+
}
|
|
31141
|
+
this.testDataProfileSelectConfigCache.delete(cacheKey);
|
|
31125
31142
|
}
|
|
31126
31143
|
// Check if default values are set - if so, disable the dropdown
|
|
31127
31144
|
const isDisabled = this.hasDefaultTestDataSelection();
|
|
@@ -32598,7 +32615,7 @@ class StepBuilderActionComponent {
|
|
|
32598
32615
|
metadata: this.metadata,
|
|
32599
32616
|
description: this.description,
|
|
32600
32617
|
templateVariables: currentTemplateVariables,
|
|
32601
|
-
testDataList: this.buildTestDataList(currentTemplateVariables),
|
|
32618
|
+
// testDataList: this.buildTestDataList(currentTemplateVariables),
|
|
32602
32619
|
advancedSettingsVariables: this.advancedSettingsVariables,
|
|
32603
32620
|
environmentIds: environmentIds // Map of variable name to environment ID
|
|
32604
32621
|
};
|
|
@@ -32636,22 +32653,25 @@ class StepBuilderActionComponent {
|
|
|
32636
32653
|
const dataType = (variable === null || variable === void 0 ? void 0 : variable.dataType) || this.parseVariableDataType(formattedValue);
|
|
32637
32654
|
const selectedTestDataProfileId = this.resolveSelectedTestDataProfileId(variable);
|
|
32638
32655
|
if (dataType === 'parameter') {
|
|
32639
|
-
return Object.assign({ testData: rawValue, testDataType: 'parameter' }, (selectedTestDataProfileId != null && { testDataProfileId: selectedTestDataProfileId }));
|
|
32656
|
+
return Object.assign({ testData: rawValue, testDataType: 'parameter', testDataKey: variable.name }, (selectedTestDataProfileId != null && { testDataProfileId: selectedTestDataProfileId }));
|
|
32640
32657
|
}
|
|
32641
32658
|
if (dataType === 'runtime') {
|
|
32642
32659
|
return {
|
|
32643
32660
|
testData: rawValue,
|
|
32661
|
+
testDataKey: variable.name,
|
|
32644
32662
|
testDataType: 'runtime',
|
|
32645
32663
|
};
|
|
32646
32664
|
}
|
|
32647
32665
|
if (dataType === 'environment') {
|
|
32648
32666
|
return {
|
|
32649
32667
|
testData: rawValue,
|
|
32668
|
+
testDataKey: variable.name,
|
|
32650
32669
|
testDataType: 'environment',
|
|
32651
32670
|
};
|
|
32652
32671
|
}
|
|
32653
32672
|
return {
|
|
32654
32673
|
testData: formattedValue,
|
|
32674
|
+
testDataKey: variable.name,
|
|
32655
32675
|
testDataType: 'raw',
|
|
32656
32676
|
};
|
|
32657
32677
|
}
|