Skip to content

Commit 9a52a34

Browse files
committed
fix time column unit test
Signed-off-by: abbyhu2000 <[email protected]>
1 parent 2991588 commit 9a52a34

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/plugins/explore/public/helpers/data_table_helper.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ describe('data_table_helper', () => {
9999
it('should return column properties without time field when hideTimeField is true', () => {
100100
const columns = ['field1', 'field2'];
101101

102-
const result = getLegacyDisplayedColumns(columns, mockIndexPattern, true, false);
102+
const result = getLegacyDisplayedColumns(columns, mockIndexPattern, false, true);
103103

104104
expect(result).toHaveLength(2);
105105
expect(result[0]).toEqual({
@@ -172,7 +172,7 @@ describe('data_table_helper', () => {
172172
sortable: false,
173173
});
174174

175-
const result = getLegacyDisplayedColumns(columns, mockIndexPattern, true, false);
175+
const result = getLegacyDisplayedColumns(columns, mockIndexPattern, false, true);
176176

177177
expect(result[0].isSortable).toBe(false); // Should use field.sortable when osdFieldOverrides.sortable is undefined
178178
});
@@ -188,7 +188,7 @@ describe('data_table_helper', () => {
188188
it('should make _source column removeable when there are multiple columns', () => {
189189
const columns = ['_source', 'field1'];
190190

191-
const result = getLegacyDisplayedColumns(columns, mockIndexPattern, true, false);
191+
const result = getLegacyDisplayedColumns(columns, mockIndexPattern, false, true);
192192

193193
expect(result[0].isRemoveable).toBe(true); // _source is removeable when there are other columns
194194
expect(result[1].isRemoveable).toBe(true);
@@ -205,7 +205,7 @@ describe('data_table_helper', () => {
205205
'spanId',
206206
];
207207

208-
const result = getLegacyDisplayedColumns(columns, mockIndexPattern, true, false);
208+
const result = getLegacyDisplayedColumns(columns, mockIndexPattern, false, true);
209209

210210
expect(result[0].displayName).toBe('Service Identifier');
211211
expect(result[1].displayName).toBe('Duration');

0 commit comments

Comments
 (0)