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

[Send To Background UI] Isolate functional test for wip feature #84833

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
1 change: 1 addition & 0 deletions x-pack/scripts/functional_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const onlyNotInCoverageTests = [
require.resolve('../test/security_solution_endpoint_api_int/config.ts'),
require.resolve('../test/fleet_api_integration/config.ts'),
require.resolve('../test/functional_vis_wizard/config.ts'),
require.resolve('../test/send_search_to_background_integration/config.ts'),
require.resolve('../test/saved_object_tagging/functional/config.ts'),
require.resolve('../test/saved_object_tagging/api_integration/security_and_spaces/config.ts'),
require.resolve('../test/saved_object_tagging/api_integration/tagging_api/config.ts'),
Expand Down
1 change: 0 additions & 1 deletion x-pack/test/functional/apps/dashboard/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default function ({ loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./preserve_url'));
loadTestFile(require.resolve('./reporting'));
loadTestFile(require.resolve('./drilldowns'));
loadTestFile(require.resolve('./async_search'));
loadTestFile(require.resolve('./_async_dashboard'));
});
}
1 change: 0 additions & 1 deletion x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export default async function ({ readConfigFile }) {
'--xpack.encryptedSavedObjects.encryptionKey="DkdXazszSCYexXqz4YktBGHCRkV6hyNK"',
'--timelion.ui.enabled=true',
'--savedObjects.maxImportPayloadBytes=10485760', // for OSS test management/_import_objects
'--xpack.data_enhanced.search.sendToBackground.enabled=true', // enable WIP send to background UI
],
},
uiSettings: {
Expand Down
2 changes: 0 additions & 2 deletions x-pack/test/functional/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ import {
DashboardDrilldownsManageProvider,
DashboardPanelTimeRangeProvider,
} from './dashboard';
import { SendToBackgroundProvider } from './data';

// define the name and providers for services that should be
// available to your tests. If you don't specify anything here
Expand Down Expand Up @@ -104,5 +103,4 @@ export const services = {
dashboardDrilldownPanelActions: DashboardDrilldownPanelActionsProvider,
dashboardDrilldownsManage: DashboardDrilldownsManageProvider,
dashboardPanelTimeRange: DashboardPanelTimeRangeProvider,
sendToBackground: SendToBackgroundProvider,
};
37 changes: 37 additions & 0 deletions x-pack/test/send_search_to_background_integration/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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 { resolve } from 'path';
import { FtrConfigProviderContext } from '@kbn/test/types/ftr';
import { services as functionalServices } from '../functional/services';
import { services } from './services';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const xpackFunctionalConfig = await readConfigFile(require.resolve('../functional/config'));

return {
// default to the xpack functional config
...xpackFunctionalConfig.getAll(),

junit: {
reportName: 'X-Pack Background Search UI (Enabled WIP Feature)',
},

testFiles: [resolve(__dirname, './tests/apps/dashboard/async_search')],

kbnTestServer: {
...xpackFunctionalConfig.get('kbnTestServer'),
serverArgs: [
...xpackFunctionalConfig.get('kbnTestServer.serverArgs'),
'--xpack.data_enhanced.search.sendToBackground.enabled=true', // enable WIP send to background UI
],
},
services: {
...functionalServices,
...services,
},
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* 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 { GenericFtrProviderContext } from '@kbn/test/types/ftr';
import { pageObjects } from '../functional/page_objects';
import { services } from './services';

export type FtrProviderContext = GenericFtrProviderContext<typeof services, typeof pageObjects>;
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/

export { SendToBackgroundProvider } from './send_to_background';
import { services as functionalServices } from '../../functional/services';
import { SendToBackgroundProvider } from './send_to_background';

export const services = {
...functionalServices,
sendToBackground: SendToBackgroundProvider,
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { FtrProviderContext } from '../../ftr_provider_context';
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
import { FtrProviderContext } from '../ftr_provider_context';
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';

const SEND_TO_BACKGROUND_TEST_SUBJ = 'backgroundSessionIndicator';
const SEND_TO_BACKGROUND_POPOVER_CONTENT_TEST_SUBJ = 'backgroundSessionIndicatorPopoverContainer';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const es = getService('es');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
* 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';
import { FtrProviderContext } from '../../../../ftr_provider_context';

export default function ({ loadTestFile, getService }: FtrProviderContext) {
const kibanaServer = getService('kibanaServer');
const esArchiver = getService('esArchiver');

describe('async search', function () {
this.tags('ciGroup3');

before(async () => {
await esArchiver.loadIfNeeded('logstash_functional');
await esArchiver.load('dashboard/async_search');
Expand Down