forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[User Experience App] Fix ux app env filter (elastic#105918) (elastic…
…#106001) Co-authored-by: Shahzad <[email protected]>
- Loading branch information
1 parent
e333c67
commit b26051d
Showing
4 changed files
with
40 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 3 additions & 21 deletions
24
x-pack/plugins/apm/server/lib/rum_client/__snapshots__/queries.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
x-pack/plugins/apm/server/lib/rum_client/ui_filters/get_es_filter.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { getEsFilter } from './get_es_filter'; | ||
|
||
describe('getEfFilters', function () { | ||
it('should return environment in include filters', function () { | ||
const result = getEsFilter({ | ||
browser: ['Chrome'], | ||
environment: 'production', | ||
}); | ||
|
||
expect(result).toEqual([ | ||
{ terms: { 'user_agent.name': ['Chrome'] } }, | ||
{ term: { 'service.environment': 'production' } }, | ||
]); | ||
}); | ||
|
||
it('should not return environment in exclude filters', function () { | ||
const result = getEsFilter( | ||
{ browserExcluded: ['Chrome'], environment: 'production' }, | ||
true | ||
); | ||
|
||
expect(result).toEqual([{ terms: { 'user_agent.name': ['Chrome'] } }]); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters