mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
parent
0d494550b1
commit
9652db16ba
2 changed files with 4 additions and 2 deletions
|
@ -65,6 +65,8 @@ export async function listControlFactory(controlParams, kbnApi, useTimeFilter) {
|
|||
const resp = await searchSource.fetch();
|
||||
const termsSelectOptions = _.get(resp, 'aggregations.termsAgg.buckets', []).map((bucket) => {
|
||||
return { label: bucket.key.toString(), value: bucket.key.toString() };
|
||||
}).sort((a, b) => {
|
||||
return a.label.toLowerCase().localeCompare(b.label.toLowerCase());
|
||||
});
|
||||
|
||||
const listControl = new ListControl(
|
||||
|
|
|
@ -35,7 +35,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
|
||||
it('should contain dropdown with terms aggregation results as options', async () => {
|
||||
const menu = await PageObjects.visualize.getReactSelectOptions('inputControl0');
|
||||
expect(menu.trim().split('\n').join()).to.equal('win 8,win xp,win 7,ios,osx');
|
||||
expect(menu.trim().split('\n').join()).to.equal('ios,osx,win 7,win 8,win xp');
|
||||
});
|
||||
|
||||
it('should display staging control buttons', async () => {
|
||||
|
@ -160,7 +160,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
|
||||
// Expect control to have values for selected time filter
|
||||
const menu = await PageObjects.visualize.getReactSelectOptions('inputControl0');
|
||||
expect(menu.trim().split('\n').join()).to.equal('win 8,win xp,win 7,osx');
|
||||
expect(menu.trim().split('\n').join()).to.equal('osx,win 7,win 8,win xp');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue