Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ingest Pipelines] Fix functional tests #159336

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* 2.0.
*/

import { IngestDeletePipelineRequest } from '@elastic/elasticsearch/lib/api/types';
import { IngestPutPipelineRequest } from '@elastic/elasticsearch/lib/api/types';
import expect from '@kbn/expect';
import path from 'path';
import { FtrProviderContext } from '../../ftr_provider_context';

const TEST_PIPELINE_NAME = 'test';

const PIPELINE = {
name: 'test_pipeline',
description: 'My pipeline description.',
Expand All @@ -26,21 +28,28 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const es = getService('es');
const security = getService('security');

// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/157511
describe.skip('Ingest Pipelines', function () {
describe('Ingest Pipelines', function () {
this.tags('smoke');
before(async () => {
await security.testUser.setRoles(['ingest_pipelines_user']);
// Delete all existing pipelines
await es.ingest.deletePipeline({ id: '*' } as IngestDeletePipelineRequest);
// Create a test pipeline
await es.ingest.putPipeline({
id: TEST_PIPELINE_NAME,
body: { processors: [] },
} as IngestPutPipelineRequest);
await pageObjects.common.navigateToApp('ingestPipelines');
});

it('Loads the app', async () => {
log.debug('Checking for section heading to say Ingest Pipelines.');

const headingText = await pageObjects.ingestPipelines.emptyStateHeaderText();
expect(headingText).to.be('Start by creating a pipeline');
const headingText = await pageObjects.ingestPipelines.sectionHeadingText();
expect(headingText).to.be('Ingest Pipelines');
});

it('Displays the test pipeline in the list of pipelines', async () => {
const pipelines = await pageObjects.ingestPipelines.getPipelinesList();
expect(pipelines).to.contain(TEST_PIPELINE_NAME);
});

describe('create pipeline', () => {
Expand Down Expand Up @@ -80,5 +89,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await security.testUser.restoreDefaults();
});
});

after(async () => {
// Delete the test pipeline
await es.ingest.deletePipeline({ id: TEST_PIPELINE_NAME });
});
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export function IngestPipelinesPageProvider({ getService, getPageObjects }: FtrP
processors?: string;
onFailureProcessors?: string;
}) {
await testSubjects.click('emptyStateCreatePipelineDropdown');
await testSubjects.click('emptyStateCreatePipelineButton');
await testSubjects.click('createPipelineDropdown');
await testSubjects.click('createNewPipeline');

await testSubjects.exists('pipelineForm');

Expand Down Expand Up @@ -73,8 +73,8 @@ export function IngestPipelinesPageProvider({ getService, getPageObjects }: FtrP
},

async navigateToCreateFromCsv() {
await testSubjects.click('emptyStateCreatePipelineDropdown');
await testSubjects.click('emptyStatecreatePipelineFromCsvButton');
await testSubjects.click('createPipelineDropdown');
await testSubjects.click('createPipelineFromCsv');

await testSubjects.exists('createFromCsvInstructions');
},
Expand Down