Skip to content

Commit

Permalink
[Send To Background UI] Isolate functional test for wip feature
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Dec 3, 2020
1 parent 65cbe4c commit f712032
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 9 deletions.
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,7 +3,7 @@
* 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');
Expand Down

0 comments on commit f712032

Please sign in to comment.