@gravitee/ui-policy-studio-angular 16.2.1-apim-11674-edit-ps-flows-for-llm-proxy-1371f4c → 16.2.1-apim-11674-edit-ps-flows-for-llm-proxy-8fbf63c

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.
@@ -155,7 +155,7 @@ function fakeMcpFlow(modifier) {
155
155
  function fakeLlmFlow(modifier) {
156
156
  const httpSelector = {
157
157
  type: 'HTTP',
158
- path: '/path',
158
+ path: '/models',
159
159
  pathOperator: 'EQUALS',
160
160
  methods: ['GET'],
161
161
  };
@@ -1807,26 +1807,25 @@ class GioPolicyStudioFlowLlmFormDialogHarness extends ComponentHarness {
1807
1807
  }
1808
1808
  await pathOperatorInput.clickOptions({ text: new RegExp(flow.pathOperator, 'i') });
1809
1809
  }
1810
- if (flow.path) {
1810
+ if (flow.path !== undefined) {
1811
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
- }));
1812
+ const input = await this.pathInput();
1813
+ // Try to use autocomplete selection if the path matches an option
1816
1814
  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));
1815
+ await input.focus();
1816
+ await input.setValue(pathValue);
1817
+ const autocomplete = await input.getMatAutocompleteHarness();
1818
+ if (autocomplete && (await autocomplete.isOpen())) {
1819
+ const options = await input.getAutocompleteOptions();
1820
+ const matchingOption = options.find(opt => opt === `/${pathValue}` || opt === pathValue);
1821
+ if (matchingOption) {
1822
+ await input.selectOption(matchingOption);
1823
+ }
1824
+ }
1824
1825
  }
1825
1826
  catch {
1826
- // Fallback: try the original method
1827
- const input = await this.pathInput();
1827
+ // Fallback to just setting the value
1828
1828
  await input.setValue(pathValue);
1829
- await new Promise(resolve => setTimeout(resolve, 200));
1830
1829
  }
1831
1830
  }
1832
1831
  if (flow.methods) {