File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
static/app/views/dashboards/widgetBuilder/buildSteps/filterResultsStep Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -152,9 +152,7 @@ describe('SpansSearchBar', () => {
152152 } ) ;
153153 } ) ;
154154
155- // TODO(nikki): Flaky test
156- // eslint-disable-next-line jest/no-disabled-tests
157- it . skip ( 'triggers onClose when the query changes' , async ( ) => {
155+ it ( 'triggers onClose when the query changes' , async ( ) => {
158156 const onClose = jest . fn ( ) ;
159157
160158 renderWithProvider ( {
@@ -166,11 +164,15 @@ describe('SpansSearchBar', () => {
166164 const searchInput = await screen . findByRole ( 'combobox' , {
167165 name : 'Add a search term' ,
168166 } ) ;
167+ await userEvent . click ( searchInput ) ;
169168 await userEvent . type ( searchInput , 'span.op:' ) ;
170169 await userEvent . keyboard ( '{enter}' ) ;
171170 await userEvent . keyboard ( 'function' ) ;
172171 await userEvent . keyboard ( '{enter}' ) ;
173172
173+ // Wait for the filter token to be created before typing the value
174+ await screen . findByRole ( 'row' , { name : / s p a n \. o p / } ) ;
175+
174176 await waitFor ( ( ) => {
175177 expect ( onClose ) . toHaveBeenCalled ( ) ;
176178 } ) ;
You can’t perform that action at this time.
0 commit comments