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

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

* add tests to cigroup 3
This commit is contained in:
Tim Sullivan 2020-12-04 10:22:26 -07:00 committed by GitHub
parent 0dbe1cd006
commit 880c8d35e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 62 additions and 9 deletions

View file

@ -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'),

View file

@ -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'));
});
}

View file

@ -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: {

View file

@ -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
@ -104,5 +103,4 @@ export const services = {
dashboardDrilldownPanelActions: DashboardDrilldownPanelActionsProvider,
dashboardDrilldownsManage: DashboardDrilldownsManageProvider,
dashboardPanelTimeRange: DashboardPanelTimeRangeProvider,
sendToBackground: SendToBackgroundProvider,
};

View file

@ -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,
},
};
}

View file

@ -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>;

View file

@ -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,
};

View file

@ -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';

View file

@ -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');

View file

@ -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');