elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.6k stars 8.21k forks source link

[ES|QL] add implicit autocomplete test coverage for Invoke Trigger Kind #192214

Open drewdaemon opened 1 month ago

drewdaemon commented 1 month ago

Describe the feature: Monaco has two key trigger kinds. One is used when the user enters a particular trigger character. The other (Invoke) is used in default scenarios (for example, the user enters the first character of a word).

It's important that we cover both cases in our autocomplete tests.

To make this easier, we could consider automatically testing the "Invoke" case when a trigger character is tested. So, if I test a trigger character:

      await assertSuggestions(
        'from a | eval case( integerField != /)',
        [
         ...
        ],
        {
          triggerCharacter: ' ',
        }
      );

Under the hood, the test framework will test the Invoke trigger as well.

This assumes that the suggestions are expected to be the same for either trigger. I haven't yet seen a case where this is not true.

elasticmachine commented 1 month ago

Pinging @elastic/kibana-esql (Team:ESQL)