@@ -49,18 +49,21 @@ describe('ResultsSearchQueryBuilder', () => {
4949 user : { key : 'user' , name : 'user' , kind : FieldKind . FIELD } ,
5050 } }
5151 recentSearches = { SavedSearchType . EVENT }
52+ // This fields definition is what caused p50 to appear as a function tag
5253 fields = { [ { field : 'p50(transaction.duration)' } ] }
5354 /> ,
5455 {
5556 organization,
5657 }
5758 ) ;
5859
60+ // Focus the input and type "has:p" to simulate a search for p50
5961 const input = await screen . findByRole ( 'combobox' ) ;
6062 await userEvent . click ( input ) ;
6163 await screen . findByRole ( 'listbox' ) ;
6264 await userEvent . keyboard ( 'has:p' ) ;
6365
66+ // Check that "p50" (a function tag) is NOT in the dropdown
6467 const listbox = await screen . findByRole ( 'listbox' ) ;
6568 expect ( within ( listbox ) . queryByText ( 'p50' ) ) . not . toBeInTheDocument ( ) ;
6669
@@ -83,13 +86,15 @@ describe('ResultsSearchQueryBuilder', () => {
8386 user : { key : 'user' , name : 'user' , kind : FieldKind . FIELD } ,
8487 } }
8588 recentSearches = { SavedSearchType . EVENT }
89+ // This fields definition is what caused p50 to appear as a function tag
8690 fields = { [ { field : 'p50(transaction.duration)' } ] }
8791 /> ,
8892 {
8993 organization,
9094 }
9195 ) ;
9296
97+ // Check that a normal tag (e.g. "transaction") IS in the dropdown
9398 const input = await screen . findByRole ( 'combobox' ) ;
9499 await userEvent . click ( input ) ;
95100 await screen . findByRole ( 'listbox' ) ;
0 commit comments