@gravitee/ui-policy-studio-angular 16.2.0 → 16.2.1-apim-11674-edit-ps-flows-for-llm-proxy-1371f4c
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.
|
@@ -7,7 +7,7 @@ import { DivHarness, SpanHarness } from '@gravitee/ui-particles-angular/testing'
|
|
|
7
7
|
import { MatMenuHarness } from '@angular/material/menu/testing';
|
|
8
8
|
import { MatInputHarness } from '@angular/material/input/testing';
|
|
9
9
|
import { MatSelectHarness } from '@angular/material/select/testing';
|
|
10
|
-
import { GioFormTagsInputHarness } from '@gravitee/ui-particles-angular';
|
|
10
|
+
import { GioFormTagsInputHarness, GioFormAutocompleteInputHarness } from '@gravitee/ui-particles-angular';
|
|
11
11
|
import { MatSlideToggleHarness } from '@angular/material/slide-toggle/testing';
|
|
12
12
|
import { MatTooltipHarness } from '@angular/material/tooltip/testing';
|
|
13
13
|
import { MatChipListboxHarness } from '@angular/material/chips/testing';
|
|
@@ -1786,7 +1786,7 @@ class GioPolicyStudioFlowLlmFormDialogHarness extends ComponentHarness {
|
|
|
1786
1786
|
this.getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));
|
|
1787
1787
|
this.nameInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="name"]' }));
|
|
1788
1788
|
this.pathOperatorInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="pathOperator"]' }));
|
|
1789
|
-
this.pathInput = this.locatorFor(
|
|
1789
|
+
this.pathInput = this.locatorFor(GioFormAutocompleteInputHarness.with({ selector: '[formControlName="path"]' }));
|
|
1790
1790
|
this.methodsInput = this.locatorFor(GioFormTagsInputHarness.with({ selector: '[formControlName="methods"]' }));
|
|
1791
1791
|
this.conditionInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="condition"]' }));
|
|
1792
1792
|
}
|
|
@@ -1808,12 +1808,29 @@ class GioPolicyStudioFlowLlmFormDialogHarness extends ComponentHarness {
|
|
|
1808
1808
|
await pathOperatorInput.clickOptions({ text: new RegExp(flow.pathOperator, 'i') });
|
|
1809
1809
|
}
|
|
1810
1810
|
if (flow.path) {
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1811
|
+
const pathValue = flow.path.startsWith('/') ? flow.path.substring(1) : flow.path;
|
|
1812
|
+
// Create a locator for MatInputHarness that finds the input inside the autocomplete
|
|
1813
|
+
const pathMatInput = this.locatorFor(MatInputHarness.with({
|
|
1814
|
+
ancestor: '[formcontrolname="path"]'
|
|
1815
|
+
}));
|
|
1816
|
+
try {
|
|
1817
|
+
const matInput = await pathMatInput();
|
|
1818
|
+
await matInput.focus();
|
|
1819
|
+
await matInput.setValue('');
|
|
1820
|
+
// Set value and trigger events
|
|
1821
|
+
await matInput.setValue(pathValue);
|
|
1822
|
+
// Wait for processing
|
|
1823
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
1824
|
+
}
|
|
1825
|
+
catch {
|
|
1826
|
+
// Fallback: try the original method
|
|
1827
|
+
const input = await this.pathInput();
|
|
1828
|
+
await input.setValue(pathValue);
|
|
1829
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
1830
|
+
}
|
|
1813
1831
|
}
|
|
1814
1832
|
if (flow.methods) {
|
|
1815
1833
|
const methodsInput = await this.methodsInput();
|
|
1816
|
-
await methodsInput.removeTag('ALL');
|
|
1817
1834
|
for (const method of flow.methods) {
|
|
1818
1835
|
await methodsInput.addTag(method);
|
|
1819
1836
|
}
|