From d64dc9c3a527f17fc9e849048c4e0892fc90739a Mon Sep 17 00:00:00 2001 From: Robert Oskamp Date: Tue, 18 Aug 2020 17:21:22 +0200 Subject: [PATCH] Apply changes to transform tests --- .../test/functional/apps/transform/cloning.ts | 90 +++++++-------- .../apps/transform/creation_index_pattern.ts | 106 +++++++---------- .../apps/transform/creation_saved_search.ts | 107 +++++++----------- .../test/functional/apps/transform/editing.ts | 49 ++++---- .../functional/services/transform/index.ts | 3 + .../services/transform/test_execution.ts | 17 +++ 6 files changed, 172 insertions(+), 200 deletions(-) create mode 100644 x-pack/test/functional/services/transform/test_execution.ts diff --git a/x-pack/test/functional/apps/transform/cloning.ts b/x-pack/test/functional/apps/transform/cloning.ts index d94923d9a7cce..d5c972cb8bd1f 100644 --- a/x-pack/test/functional/apps/transform/cloning.ts +++ b/x-pack/test/functional/apps/transform/cloning.ts @@ -87,138 +87,130 @@ export default function ({ getService }: FtrProviderContext) { await transform.testResources.deleteIndexPatternByTitle(testData.destinationIndex); }); - it('should load the home page', async () => { + it('opens the existing transform in the wizard', async () => { + await transform.testExecution.logTestStep('should load the home page'); await transform.navigation.navigateTo(); await transform.management.assertTransformListPageExists(); - }); - it('should display the transforms table', async () => { + await transform.testExecution.logTestStep('should display the transforms table'); await transform.management.assertTransformsTableExists(); - }); - it('should display the original transform in the transform list', async () => { + await transform.testExecution.logTestStep( + 'should display the original transform in the transform list' + ); await transform.table.refreshTransformList(); await transform.table.filterWithSearchString(transformConfig.id); const rows = await transform.table.parseTransformTable(); expect(rows.filter((row) => row.id === transformConfig.id)).to.have.length(1); - }); - it('should show the actions popover', async () => { + await transform.testExecution.logTestStep('should show the actions popover'); await transform.table.assertTransformRowActions(false); - }); - it('should display the define pivot step', async () => { + await transform.testExecution.logTestStep('should display the define pivot step'); await transform.table.clickTransformRowAction('Clone'); await transform.wizard.assertDefineStepActive(); }); - it('should load the index preview', async () => { + it('navigates through the wizard, checks and sets all needed fields', async () => { + await transform.testExecution.logTestStep('should load the index preview'); await transform.wizard.assertIndexPreviewLoaded(); - }); - it('should show the index preview', async () => { + await transform.testExecution.logTestStep('should show the index preview'); await transform.wizard.assertIndexPreview( testData.expected.indexPreview.columns, testData.expected.indexPreview.rows ); - }); - it('should display the query input', async () => { + await transform.testExecution.logTestStep('should display the query input'); await transform.wizard.assertQueryInputExists(); await transform.wizard.assertQueryValue(''); - }); - it('should show the pre-filled group-by configuration', async () => { + await transform.testExecution.logTestStep( + 'should show the pre-filled group-by configuration' + ); await transform.wizard.assertGroupByEntryExists( testData.expected.groupBy.index, testData.expected.groupBy.label ); - }); - it('should show the pre-filled aggs configuration', async () => { + await transform.testExecution.logTestStep( + 'should show the pre-filled aggs configuration' + ); await transform.wizard.assertAggregationEntryExists( testData.expected.aggs.index, testData.expected.aggs.label ); - }); - it('should show the pivot preview', async () => { + await transform.testExecution.logTestStep('should show the pivot preview'); await transform.wizard.assertPivotPreviewChartHistogramButtonMissing(); await transform.wizard.assertPivotPreviewColumnValues( testData.expected.pivotPreview.column, testData.expected.pivotPreview.values ); - }); - it('should load the details step', async () => { + await transform.testExecution.logTestStep('should load the details step'); await transform.wizard.advanceToDetailsStep(); - }); - it('should input the transform id', async () => { + await transform.testExecution.logTestStep('should input the transform id'); await transform.wizard.assertTransformIdInputExists(); await transform.wizard.assertTransformIdValue(''); await transform.wizard.setTransformId(testData.transformId); - }); - it('should input the transform description', async () => { + await transform.testExecution.logTestStep('should input the transform description'); await transform.wizard.assertTransformDescriptionInputExists(); await transform.wizard.assertTransformDescriptionValue(''); await transform.wizard.setTransformDescription(testData.transformDescription); - }); - it('should input the destination index', async () => { + await transform.testExecution.logTestStep('should input the destination index'); await transform.wizard.assertDestinationIndexInputExists(); await transform.wizard.assertDestinationIndexValue(''); await transform.wizard.setDestinationIndex(testData.destinationIndex); - }); - it('should display the create index pattern switch', async () => { + await transform.testExecution.logTestStep( + 'should display the create index pattern switch' + ); await transform.wizard.assertCreateIndexPatternSwitchExists(); await transform.wizard.assertCreateIndexPatternSwitchCheckState(true); - }); - it('should display the continuous mode switch', async () => { + await transform.testExecution.logTestStep('should display the continuous mode switch'); await transform.wizard.assertContinuousModeSwitchExists(); await transform.wizard.assertContinuousModeSwitchCheckState(false); - }); - it('should load the create step', async () => { + await transform.testExecution.logTestStep('should load the create step'); await transform.wizard.advanceToCreateStep(); - }); - it('should display the create and start button', async () => { + await transform.testExecution.logTestStep('should display the create and start button'); await transform.wizard.assertCreateAndStartButtonExists(); await transform.wizard.assertCreateAndStartButtonEnabled(true); - }); - it('should display the create button', async () => { + await transform.testExecution.logTestStep('should display the create button'); await transform.wizard.assertCreateButtonExists(); await transform.wizard.assertCreateButtonEnabled(true); - }); - it('should display the copy to clipboard button', async () => { + await transform.testExecution.logTestStep('should display the copy to clipboard button'); await transform.wizard.assertCopyToClipboardButtonExists(); await transform.wizard.assertCopyToClipboardButtonEnabled(true); }); - it('should create the transform', async () => { + it('runs the clone transform and displays it correctly in the job list', async () => { + await transform.testExecution.logTestStep('should create the transform'); await transform.wizard.createTransform(); - }); - it('should start the transform and finish processing', async () => { + await transform.testExecution.logTestStep( + 'should start the transform and finish processing' + ); await transform.wizard.startTransform(); await transform.wizard.waitForProgressBarComplete(); - }); - it('should return to the management page', async () => { + await transform.testExecution.logTestStep('should return to the management page'); await transform.wizard.returnToManagement(); - }); - it('should display the transforms table', async () => { + await transform.testExecution.logTestStep('should display the transforms table'); await transform.management.assertTransformsTableExists(); - }); - it('should display the created transform in the transform list', async () => { + await transform.testExecution.logTestStep( + 'should display the created transform in the transform list' + ); await transform.table.refreshTransformList(); await transform.table.filterWithSearchString(testData.transformId); const rows = await transform.table.parseTransformTable(); 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 7c9983101f607..daecc26186ac1 100644 --- a/x-pack/test/functional/apps/transform/creation_index_pattern.ts +++ b/x-pack/test/functional/apps/transform/creation_index_pattern.ts @@ -260,63 +260,54 @@ export default function ({ getService }: FtrProviderContext) { await transform.testResources.deleteIndexPatternByTitle(testData.destinationIndex); }); - it('loads the home page', async () => { + it('loads the wizard for the source data', async () => { + await transform.testExecution.logTestStep('loads the home page'); await transform.navigation.navigateTo(); await transform.management.assertTransformListPageExists(); - }); - it('displays the stats bar', async () => { + await transform.testExecution.logTestStep('displays the stats bar'); await transform.management.assertTransformStatsBarExists(); - }); - it('loads the source selection modal', async () => { + await transform.testExecution.logTestStep('loads the source selection modal'); await transform.management.startTransformCreation(); - }); - it('selects the source data', async () => { + await transform.testExecution.logTestStep('selects the source data'); await transform.sourceSelection.selectSource(testData.source); }); - it('displays the define pivot step', async () => { + it('navigates through the wizard and sets all needed fields', async () => { + await transform.testExecution.logTestStep('displays the define pivot step'); await transform.wizard.assertDefineStepActive(); - }); - it('loads the index preview', async () => { + await transform.testExecution.logTestStep('loads the index preview'); await transform.wizard.assertIndexPreviewLoaded(); - }); - it('shows the index preview', async () => { + await transform.testExecution.logTestStep('shows the index preview'); await transform.wizard.assertIndexPreview( testData.expected.indexPreview.columns, testData.expected.indexPreview.rows ); - }); - it('displays an empty pivot preview', async () => { + await transform.testExecution.logTestStep('displays an empty pivot preview'); await transform.wizard.assertPivotPreviewEmpty(); - }); - it('displays the query input', async () => { + await transform.testExecution.logTestStep('displays the query input'); await transform.wizard.assertQueryInputExists(); await transform.wizard.assertQueryValue(''); - }); - it('displays the advanced query editor switch', async () => { + await transform.testExecution.logTestStep('displays the advanced query editor switch'); await transform.wizard.assertAdvancedQueryEditorSwitchExists(); await transform.wizard.assertAdvancedQueryEditorSwitchCheckState(false); - }); - it('enables the index preview histogram charts', async () => { + await transform.testExecution.logTestStep('enables the index preview histogram charts'); await transform.wizard.enableIndexPreviewHistogramCharts(); - }); - it('displays the index preview histogram charts', async () => { + await transform.testExecution.logTestStep('displays the index preview histogram charts'); await transform.wizard.assertIndexPreviewHistogramCharts( testData.expected.histogramCharts ); - }); - it('adds the group by entries', async () => { + await transform.testExecution.logTestStep('adds the group by entries'); for (const [index, entry] of testData.groupByEntries.entries()) { await transform.wizard.assertGroupByInputExists(); await transform.wizard.assertGroupByInputValue([]); @@ -327,112 +318,97 @@ export default function ({ getService }: FtrProviderContext) { entry.intervalLabel ); } - }); - it('adds the aggregation entries', async () => { + await transform.testExecution.logTestStep('adds the aggregation entries'); await transform.wizard.addAggregationEntries(testData.aggregationEntries); - }); - it('displays the advanced pivot editor switch', async () => { + await transform.testExecution.logTestStep('displays the advanced pivot editor switch'); await transform.wizard.assertAdvancedPivotEditorSwitchExists(); await transform.wizard.assertAdvancedPivotEditorSwitchCheckState(false); - }); - it('displays the advanced configuration', async () => { + await transform.testExecution.logTestStep('displays the advanced configuration'); await transform.wizard.enabledAdvancedPivotEditor(); await transform.wizard.assertAdvancedPivotEditorContent( testData.expected.pivotAdvancedEditorValueArr ); - }); - it('loads the pivot preview', async () => { + await transform.testExecution.logTestStep('loads the pivot preview'); await transform.wizard.assertPivotPreviewLoaded(); - }); - it('shows the pivot preview', async () => { + await transform.testExecution.logTestStep('shows the pivot preview'); await transform.wizard.assertPivotPreviewChartHistogramButtonMissing(); await transform.wizard.assertPivotPreviewColumnValues( testData.expected.pivotPreview.column, testData.expected.pivotPreview.values ); - }); - it('loads the details step', async () => { + await transform.testExecution.logTestStep('loads the details step'); await transform.wizard.advanceToDetailsStep(); - }); - it('inputs the transform id', async () => { + await transform.testExecution.logTestStep('inputs the transform id'); await transform.wizard.assertTransformIdInputExists(); await transform.wizard.assertTransformIdValue(''); await transform.wizard.setTransformId(testData.transformId); - }); - it('inputs the transform description', async () => { + await transform.testExecution.logTestStep('inputs the transform description'); await transform.wizard.assertTransformDescriptionInputExists(); await transform.wizard.assertTransformDescriptionValue(''); await transform.wizard.setTransformDescription(testData.transformDescription); - }); - it('inputs the destination index', async () => { + await transform.testExecution.logTestStep('inputs the destination index'); await transform.wizard.assertDestinationIndexInputExists(); await transform.wizard.assertDestinationIndexValue(''); await transform.wizard.setDestinationIndex(testData.destinationIndex); - }); - it('displays the create index pattern switch', async () => { + await transform.testExecution.logTestStep('displays the create index pattern switch'); await transform.wizard.assertCreateIndexPatternSwitchExists(); await transform.wizard.assertCreateIndexPatternSwitchCheckState(true); - }); - it('displays the continuous mode switch', async () => { + await transform.testExecution.logTestStep('displays the continuous mode switch'); await transform.wizard.assertContinuousModeSwitchExists(); await transform.wizard.assertContinuousModeSwitchCheckState(false); - }); - it('loads the create step', async () => { + await transform.testExecution.logTestStep('loads the create step'); await transform.wizard.advanceToCreateStep(); - }); - it('displays the create and start button', async () => { + await transform.testExecution.logTestStep('displays the create and start button'); await transform.wizard.assertCreateAndStartButtonExists(); await transform.wizard.assertCreateAndStartButtonEnabled(true); - }); - it('displays the create button', async () => { + await transform.testExecution.logTestStep('displays the create button'); await transform.wizard.assertCreateButtonExists(); await transform.wizard.assertCreateButtonEnabled(true); - }); - it('displays the copy to clipboard button', async () => { + await transform.testExecution.logTestStep('displays the copy to clipboard button'); await transform.wizard.assertCopyToClipboardButtonExists(); await transform.wizard.assertCopyToClipboardButtonEnabled(true); }); - it('creates the transform', async () => { + it('runs the transform and displays it correctly in the job list', async () => { + await transform.testExecution.logTestStep('creates the transform'); await transform.wizard.createTransform(); - }); - it('starts the transform and finishes processing', async () => { + await transform.testExecution.logTestStep('starts the transform and finishes processing'); await transform.wizard.startTransform(); await transform.wizard.waitForProgressBarComplete(); - }); - it('returns to the management page', async () => { + await transform.testExecution.logTestStep('returns to the management page'); await transform.wizard.returnToManagement(); - }); - it('displays the transforms table', async () => { + await transform.testExecution.logTestStep('displays the transforms table'); await transform.management.assertTransformsTableExists(); - }); - it('displays the created transform in the transform list', async () => { + await transform.testExecution.logTestStep( + 'displays the created transform in the transform list' + ); await transform.table.refreshTransformList(); await transform.table.filterWithSearchString(testData.transformId); const rows = await transform.table.parseTransformTable(); expect(rows.filter((row) => row.id === testData.transformId)).to.have.length(1); - }); - it('transform creation displays details for the created transform in the transform list', async () => { + await transform.testExecution.logTestStep( + 'transform creation displays details for the created transform in the transform list' + ); await transform.table.assertTransformRowFields(testData.transformId, { id: testData.transformId, description: testData.transformDescription, diff --git a/x-pack/test/functional/apps/transform/creation_saved_search.ts b/x-pack/test/functional/apps/transform/creation_saved_search.ts index 54cc5b3f62933..d3cbc1159a9c7 100644 --- a/x-pack/test/functional/apps/transform/creation_saved_search.ts +++ b/x-pack/test/functional/apps/transform/creation_saved_search.ts @@ -79,51 +79,44 @@ export default function ({ getService }: FtrProviderContext) { await transform.testResources.deleteIndexPatternByTitle(testData.destinationIndex); }); - it('loads the home page', async () => { + it('loads the wizard for the source data', async () => { + await transform.testExecution.logTestStep('loads the home page'); await transform.navigation.navigateTo(); await transform.management.assertTransformListPageExists(); - }); - it('displays the stats bar', async () => { + await transform.testExecution.logTestStep('displays the stats bar'); await transform.management.assertTransformStatsBarExists(); - }); - it('loads the source selection modal', async () => { + await transform.testExecution.logTestStep('loads the source selection modal'); await transform.management.startTransformCreation(); - }); - it('selects the source data', async () => { + await transform.testExecution.logTestStep('selects the source data'); await transform.sourceSelection.selectSource(testData.source); }); - it('displays the define pivot step', async () => { + it('navigates through the wizard and sets all needed fields', async () => { + await transform.testExecution.logTestStep('displays the define pivot step'); await transform.wizard.assertDefineStepActive(); - }); - it('loads the index preview', async () => { + await transform.testExecution.logTestStep('loads the index preview'); await transform.wizard.assertIndexPreviewLoaded(); - }); - it('shows the filtered index preview', async () => { + await transform.testExecution.logTestStep('shows the filtered index preview'); await transform.wizard.assertIndexPreviewColumnValues( testData.expected.indexPreview.column, testData.expected.indexPreview.values ); - }); - it('displays an empty pivot preview', async () => { + await transform.testExecution.logTestStep('displays an empty pivot preview'); await transform.wizard.assertPivotPreviewEmpty(); - }); - it('hides the query input', async () => { + await transform.testExecution.logTestStep('hides the query input'); await transform.wizard.assertQueryInputMissing(); - }); - it('hides the advanced query editor switch', async () => { + await transform.testExecution.logTestStep('hides the advanced query editor switch'); await transform.wizard.assertAdvancedQueryEditorSwitchMissing(); - }); - it('adds the group by entries', async () => { + await transform.testExecution.logTestStep('adds the group by entries'); for (const [index, entry] of testData.groupByEntries.entries()) { await transform.wizard.assertGroupByInputExists(); await transform.wizard.assertGroupByInputValue([]); @@ -134,108 +127,94 @@ export default function ({ getService }: FtrProviderContext) { entry.intervalLabel ); } - }); - it('adds the aggregation entries', async () => { + await transform.testExecution.logTestStep('adds the aggregation entries'); for (const [index, agg] of testData.aggregationEntries.entries()) { await transform.wizard.assertAggregationInputExists(); await transform.wizard.assertAggregationInputValue([]); await transform.wizard.addAggregationEntry(index, agg.identifier, agg.label); } - }); - it('displays the advanced pivot editor switch', async () => { + await transform.testExecution.logTestStep('displays the advanced pivot editor switch'); await transform.wizard.assertAdvancedPivotEditorSwitchExists(); await transform.wizard.assertAdvancedPivotEditorSwitchCheckState(false); - }); - it('loads the pivot preview', async () => { + await transform.testExecution.logTestStep('loads the pivot preview'); await transform.wizard.assertPivotPreviewLoaded(); - }); - it('shows the pivot preview', async () => { + await transform.testExecution.logTestStep('shows the pivot preview'); await transform.wizard.assertPivotPreviewColumnValues( testData.expected.pivotPreview.column, testData.expected.pivotPreview.values ); - }); - it('loads the details step', async () => { + await transform.testExecution.logTestStep('loads the details step'); await transform.wizard.advanceToDetailsStep(); - }); - it('inputs the transform id', async () => { + await transform.testExecution.logTestStep('inputs the transform id'); await transform.wizard.assertTransformIdInputExists(); await transform.wizard.assertTransformIdValue(''); await transform.wizard.setTransformId(testData.transformId); - }); - it('inputs the transform description', async () => { + await transform.testExecution.logTestStep('inputs the transform description'); await transform.wizard.assertTransformDescriptionInputExists(); await transform.wizard.assertTransformDescriptionValue(''); await transform.wizard.setTransformDescription(testData.transformDescription); - }); - it('inputs the destination index', async () => { + await transform.testExecution.logTestStep('inputs the destination index'); await transform.wizard.assertDestinationIndexInputExists(); await transform.wizard.assertDestinationIndexValue(''); await transform.wizard.setDestinationIndex(testData.destinationIndex); - }); - it('displays the create index pattern switch', async () => { + await transform.testExecution.logTestStep('displays the create index pattern switch'); await transform.wizard.assertCreateIndexPatternSwitchExists(); await transform.wizard.assertCreateIndexPatternSwitchCheckState(true); - }); - it('displays the continuous mode switch', async () => { + await transform.testExecution.logTestStep('displays the continuous mode switch'); await transform.wizard.assertContinuousModeSwitchExists(); await transform.wizard.assertContinuousModeSwitchCheckState(false); - }); - it('loads the create step', async () => { + await transform.testExecution.logTestStep('loads the create step'); await transform.wizard.advanceToCreateStep(); - }); - it('displays the create and start button', async () => { + await transform.testExecution.logTestStep('displays the create and start button'); await transform.wizard.assertCreateAndStartButtonExists(); await transform.wizard.assertCreateAndStartButtonEnabled(true); - }); - it('displays the create button', async () => { + await transform.testExecution.logTestStep('displays the create button'); await transform.wizard.assertCreateButtonExists(); await transform.wizard.assertCreateButtonEnabled(true); - }); - it('displays the copy to clipboard button', async () => { + await transform.testExecution.logTestStep('displays the copy to clipboard button'); await transform.wizard.assertCopyToClipboardButtonExists(); await transform.wizard.assertCopyToClipboardButtonEnabled(true); }); - it('creates the transform', async () => { + it('runs the transform and displays it correctly in the job list', async () => { + await transform.testExecution.logTestStep('creates the transform'); await transform.wizard.createTransform(); - }); - it('starts the transform and finishes processing', async () => { + await transform.testExecution.logTestStep('starts the transform and finishes processing'); await transform.wizard.startTransform(); await transform.wizard.waitForProgressBarComplete(); - }); - it('returns to the management page', async () => { + await transform.testExecution.logTestStep('returns to the management page'); await transform.wizard.returnToManagement(); - }); - it('displays the transforms table', async () => { + await transform.testExecution.logTestStep('displays the transforms table'); await transform.management.assertTransformsTableExists(); - }); - it('displays the created transform in the transform list', async () => { + await transform.testExecution.logTestStep( + 'displays the created transform in the transform list' + ); await transform.table.refreshTransformList(); await transform.table.filterWithSearchString(testData.transformId); const rows = await transform.table.parseTransformTable(); expect(rows.filter((row) => row.id === testData.transformId)).to.have.length(1); - }); - it('transform creation displays details for the created transform in the transform list', async () => { + await transform.testExecution.logTestStep( + 'transform creation displays details for the created transform in the transform list' + ); await transform.table.assertTransformRowFields(testData.transformId, { id: testData.transformId, description: testData.transformDescription, @@ -243,13 +222,15 @@ export default function ({ getService }: FtrProviderContext) { mode: testData.expected.row.mode, progress: testData.expected.row.progress, }); - }); - it('expands the transform management table row and walks through available tabs', async () => { + await transform.testExecution.logTestStep( + 'expands the transform management table row and walks through available tabs' + ); await transform.table.assertTransformExpandedRow(); - }); - it('displays the transform preview in the expanded row', async () => { + await transform.testExecution.logTestStep( + 'displays the transform preview in the expanded row' + ); await transform.table.assertTransformsExpandedRowPreviewColumnValues( testData.expected.pivotPreview.column, testData.expected.pivotPreview.values diff --git a/x-pack/test/functional/apps/transform/editing.ts b/x-pack/test/functional/apps/transform/editing.ts index 44ecca17328a7..5582d279833e7 100644 --- a/x-pack/test/functional/apps/transform/editing.ts +++ b/x-pack/test/functional/apps/transform/editing.ts @@ -61,32 +61,32 @@ export default function ({ getService }: FtrProviderContext) { }; describe(`${testData.suiteTitle}`, function () { - it('should load the home page', async () => { + it('opens the edit flyout for an existing transform', async () => { + await transform.testExecution.logTestStep('should load the home page'); await transform.navigation.navigateTo(); await transform.management.assertTransformListPageExists(); - }); - it('should display the transforms table', async () => { + await transform.testExecution.logTestStep('should display the transforms table'); await transform.management.assertTransformsTableExists(); - }); - it('should display the original transform in the transform list', async () => { + await transform.testExecution.logTestStep( + 'should display the original transform in the transform list' + ); await transform.table.refreshTransformList(); await transform.table.filterWithSearchString(transformConfig.id); const rows = await transform.table.parseTransformTable(); expect(rows.filter((row) => row.id === transformConfig.id)).to.have.length(1); - }); - it('should show the actions popover', async () => { + await transform.testExecution.logTestStep('should show the actions popover'); await transform.table.assertTransformRowActions(false); - }); - it('should show the edit flyout', async () => { + await transform.testExecution.logTestStep('should show the edit flyout'); await transform.table.clickTransformRowAction('Edit'); await transform.editFlyout.assertTransformEditFlyoutExists(); }); - it('should update the transform description', async () => { + it('navigates through the edit flyout and sets all needed fields', async () => { + await transform.testExecution.logTestStep('should update the transform description'); await transform.editFlyout.assertTransformEditFlyoutInputExists('Description'); await transform.editFlyout.assertTransformEditFlyoutInputValue( 'Description', @@ -96,18 +96,18 @@ export default function ({ getService }: FtrProviderContext) { 'Description', testData.transformDescription ); - }); - it('should update the transform documents per second', async () => { + await transform.testExecution.logTestStep( + 'should update the transform documents per second' + ); await transform.editFlyout.assertTransformEditFlyoutInputExists('DocsPerSecond'); await transform.editFlyout.assertTransformEditFlyoutInputValue('DocsPerSecond', ''); await transform.editFlyout.setTransformEditFlyoutInputValue( 'DocsPerSecond', testData.transformDocsPerSecond ); - }); - it('should update the transform frequency', async () => { + await transform.testExecution.logTestStep('should update the transform frequency'); await transform.editFlyout.assertTransformEditFlyoutInputExists('Frequency'); await transform.editFlyout.assertTransformEditFlyoutInputValue('Frequency', ''); await transform.editFlyout.setTransformEditFlyoutInputValue( @@ -116,22 +116,24 @@ export default function ({ getService }: FtrProviderContext) { ); }); - it('should update the transform', async () => { + it('updates the transform and displays it correctly in the job list', async () => { + await transform.testExecution.logTestStep('should update the transform'); await transform.editFlyout.updateTransform(); - }); - it('should display the transforms table', async () => { + await transform.testExecution.logTestStep('should display the transforms table'); await transform.management.assertTransformsTableExists(); - }); - it('should display the updated transform in the transform list', async () => { + await transform.testExecution.logTestStep( + 'should display the updated transform in the transform list' + ); await transform.table.refreshTransformList(); await transform.table.filterWithSearchString(transformConfig.id); const rows = await transform.table.parseTransformTable(); expect(rows.filter((row) => row.id === transformConfig.id)).to.have.length(1); - }); - it('should display the updated transform in the transform list row cells', async () => { + await transform.testExecution.logTestStep( + 'should display the updated transform in the transform list row cells' + ); await transform.table.assertTransformRowFields(transformConfig.id, { id: transformConfig.id, description: testData.transformDescription, @@ -139,9 +141,10 @@ export default function ({ getService }: FtrProviderContext) { mode: testData.expected.row.mode, progress: testData.expected.row.progress, }); - }); - it('should display the messages tab and include an update message', async () => { + await transform.testExecution.logTestStep( + 'should display the messages tab and include an update message' + ); await transform.table.assertTransformExpandedRowMessages(testData.expected.messageText); }); }); diff --git a/x-pack/test/functional/services/transform/index.ts b/x-pack/test/functional/services/transform/index.ts index 24091ba773218..83a227ce56604 100644 --- a/x-pack/test/functional/services/transform/index.ts +++ b/x-pack/test/functional/services/transform/index.ts @@ -14,6 +14,7 @@ import { TransformSecurityCommonProvider } from './security_common'; import { TransformSecurityUIProvider } from './security_ui'; import { TransformSourceSelectionProvider } from './source_selection'; import { TransformTableProvider } from './transform_table'; +import { TransformTestExecutionProvider } from './test_execution'; import { TransformWizardProvider } from './wizard'; import { MachineLearningTestResourcesProvider } from '../ml/test_resources'; @@ -27,6 +28,7 @@ export function TransformProvider(context: FtrProviderContext) { const securityUI = TransformSecurityUIProvider(context, securityCommon); const sourceSelection = TransformSourceSelectionProvider(context); const table = TransformTableProvider(context); + const testExecution = TransformTestExecutionProvider(context); const testResources = MachineLearningTestResourcesProvider(context); const wizard = TransformWizardProvider(context); @@ -39,6 +41,7 @@ export function TransformProvider(context: FtrProviderContext) { securityUI, sourceSelection, table, + testExecution, testResources, wizard, }; diff --git a/x-pack/test/functional/services/transform/test_execution.ts b/x-pack/test/functional/services/transform/test_execution.ts new file mode 100644 index 0000000000000..ee27f9ee5194b --- /dev/null +++ b/x-pack/test/functional/services/transform/test_execution.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function TransformTestExecutionProvider({ getService }: FtrProviderContext) { + const log = getService('log'); + + return { + async logTestStep(stepTitle: string) { + await log.debug(`=== TEST STEP === ${stepTitle}`); + }, + }; +}