Skip to content

Commit

Permalink
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
Browse files Browse the repository at this point in the history
…-ref HEAD~1..HEAD --fix'
  • Loading branch information
kibanamachine committed Jun 12, 2023
1 parent a4f5385 commit da2925d
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions src/plugins/vis_types/tagcloud/public/convert_to_lens/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@ jest.mock('@kbn/visualizations-plugin/public', () => ({
{
metrics: ['0cdf0372-a78f-438f-9fc0-df9ad83796df'],
buckets: {
all: [
'8a2556cf-dfb2-49f1-83cb-8892e1eace1c'
]
all: ['8a2556cf-dfb2-49f1-83cb-8892e1eace1c'],
},
columns: [
{
columnId: '8a2556cf-dfb2-49f1-83cb-8892e1eace1c',
meta: {
aggId: '2'
}
}
]
}
aggId: '2',
},
},
],
},
];
}),
}),
Expand All @@ -43,9 +41,9 @@ jest.mock('../services', () => ({
import type { Vis } from '@kbn/visualizations-plugin/public';
import type { TagCloudVisParams } from '../types';
import type { TimefilterContract } from '@kbn/data-plugin/public';
import { convertToLens } from './index';
import { convertToLens } from '.';

test('should convert legacy tag cloud vis into navigate to lens context', async() => {
test('should convert legacy tag cloud vis into navigate to lens context', async () => {
const mockVis = {
data: {
indexPattern: {
Expand All @@ -58,11 +56,11 @@ test('should convert legacy tag cloud vis into navigate to lens context', async(
orientation: 'right angled',
palette: {
name: 'status',
type: 'palette'
type: 'palette',
},
scale: 'linear',
showLabel: true
}
showLabel: true,
},
} as unknown as Vis<TagCloudVisParams>;
expect(await convertToLens(mockVis, {} as unknown as TimefilterContract)).toEqual({
type: 'lnsTagcloud',
Expand All @@ -73,7 +71,7 @@ test('should convert legacy tag cloud vis into navigate to lens context', async(
columns: [
{
columnId: '8a2556cf-dfb2-49f1-83cb-8892e1eace1c',
}
},
],
columnOrder: [],
},
Expand All @@ -88,11 +86,10 @@ test('should convert legacy tag cloud vis into navigate to lens context', async(
orientation: 'right angled',
palette: {
name: 'status',
type: 'palette'
type: 'palette',
},
showLabel: true,
},
indexPatternIds: ['myDataViewId'],
});
});

0 comments on commit da2925d

Please sign in to comment.