From 5711682ca482d85f9b25395c75eedad69051d6e8 Mon Sep 17 00:00:00 2001 From: Quynh Nguyen Date: Tue, 16 Jun 2020 14:21:53 -0500 Subject: [PATCH] [ML] Transform: Update tests --- .../components/transform_list/columns.test.tsx | 2 +- .../components/transform_list/expanded_row.test.tsx | 5 +++-- .../test/functional/apps/transform/creation_index_pattern.ts | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/columns.test.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/columns.test.tsx index 04527bb8e7244..3c75c33caf840 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/columns.test.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/columns.test.tsx @@ -12,7 +12,7 @@ describe('Transform: Job List Columns', () => { test('getColumns()', () => { const columns = getColumns([], () => {}, []); - expect(columns).toHaveLength(9); + expect(columns).toHaveLength(7); expect(columns[0].isExpander).toBeTruthy(); expect(columns[1].name).toBe('ID'); expect(columns[2].name).toBe('Description'); diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx index 7fcaf5e6048f6..d13730eb6dc61 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx @@ -13,8 +13,9 @@ import { ExpandedRow } from './expanded_row'; import transformListRow from '../../../../common/__mocks__/transform_list_row.json'; -jest.mock('../../../../../shared_imports'); - +jest.mock('../../../../../shared_imports', () => ({ + formatHumanReadableDateTimeSeconds: jest.fn(), +})); describe('Transform: Transform List ', () => { // Set timezone to US/Eastern for consistent test results. beforeEach(() => { diff --git a/x-pack/test/functional/apps/transform/creation_index_pattern.ts b/x-pack/test/functional/apps/transform/creation_index_pattern.ts index d6dbcde436dcc..cd7e4de6d30ab 100644 --- a/x-pack/test/functional/apps/transform/creation_index_pattern.ts +++ b/x-pack/test/functional/apps/transform/creation_index_pattern.ts @@ -408,8 +408,6 @@ export default function ({ getService }: FtrProviderContext) { await transform.table.assertTransformRowFields(testData.transformId, { id: testData.transformId, description: testData.transformDescription, - sourceIndex: testData.source, - destinationIndex: testData.destinationIndex, status: testData.expected.row.status, mode: testData.expected.row.mode, progress: testData.expected.row.progress,