Skip to content

Commit c2abd55

Browse files
authored
[Send To Background UI] Isolate functional test for wip feature (#84833) (#85045)
* [Send To Background UI] Isolate functional test for wip feature * add tests to cigroup 3
1 parent 77a48d1 commit c2abd55

File tree

10 files changed

+62
-9
lines changed

10 files changed

+62
-9
lines changed

x-pack/scripts/functional_tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ require('@kbn/test').runTestsCli([
6767
require.resolve('../test/fleet_api_integration/config.ts'),
6868
require.resolve('../test/functional_enterprise_search/without_host_configured.config.ts'),
6969
require.resolve('../test/functional_vis_wizard/config.ts'),
70+
require.resolve('../test/send_search_to_background_integration/config.ts'),
7071
require.resolve('../test/saved_object_tagging/functional/config.ts'),
7172
require.resolve('../test/saved_object_tagging/api_integration/security_and_spaces/config.ts'),
7273
require.resolve('../test/saved_object_tagging/api_integration/tagging_api/config.ts'),

x-pack/test/functional/apps/dashboard/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export default function ({ loadTestFile }: FtrProviderContext) {
1313
loadTestFile(require.resolve('./preserve_url'));
1414
loadTestFile(require.resolve('./reporting'));
1515
loadTestFile(require.resolve('./drilldowns'));
16-
loadTestFile(require.resolve('./async_search'));
1716
loadTestFile(require.resolve('./_async_dashboard'));
1817
});
1918
}

x-pack/test/functional/config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ export default async function ({ readConfigFile }) {
8989
'--xpack.encryptedSavedObjects.encryptionKey="DkdXazszSCYexXqz4YktBGHCRkV6hyNK"',
9090
'--timelion.ui.enabled=true',
9191
'--savedObjects.maxImportPayloadBytes=10485760', // for OSS test management/_import_objects
92-
'--xpack.data_enhanced.search.sendToBackground.enabled=true', // enable WIP send to background UI
9392
],
9493
},
9594
uiSettings: {

x-pack/test/functional/services/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ import {
5656
DashboardDrilldownsManageProvider,
5757
DashboardPanelTimeRangeProvider,
5858
} from './dashboard';
59-
import { SendToBackgroundProvider } from './data';
6059

6160
// define the name and providers for services that should be
6261
// available to your tests. If you don't specify anything here
@@ -104,5 +103,4 @@ export const services = {
104103
dashboardDrilldownPanelActions: DashboardDrilldownPanelActionsProvider,
105104
dashboardDrilldownsManage: DashboardDrilldownsManageProvider,
106105
dashboardPanelTimeRange: DashboardPanelTimeRangeProvider,
107-
sendToBackground: SendToBackgroundProvider,
108106
};
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
import { resolve } from 'path';
8+
import { FtrConfigProviderContext } from '@kbn/test/types/ftr';
9+
import { services as functionalServices } from '../functional/services';
10+
import { services } from './services';
11+
12+
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
13+
const xpackFunctionalConfig = await readConfigFile(require.resolve('../functional/config'));
14+
15+
return {
16+
// default to the xpack functional config
17+
...xpackFunctionalConfig.getAll(),
18+
19+
junit: {
20+
reportName: 'X-Pack Background Search UI (Enabled WIP Feature)',
21+
},
22+
23+
testFiles: [resolve(__dirname, './tests/apps/dashboard/async_search')],
24+
25+
kbnTestServer: {
26+
...xpackFunctionalConfig.get('kbnTestServer'),
27+
serverArgs: [
28+
...xpackFunctionalConfig.get('kbnTestServer.serverArgs'),
29+
'--xpack.data_enhanced.search.sendToBackground.enabled=true', // enable WIP send to background UI
30+
],
31+
},
32+
services: {
33+
...functionalServices,
34+
...services,
35+
},
36+
};
37+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
import { GenericFtrProviderContext } from '@kbn/test/types/ftr';
8+
import { pageObjects } from '../functional/page_objects';
9+
import { services } from './services';
10+
11+
export type FtrProviderContext = GenericFtrProviderContext<typeof services, typeof pageObjects>;

x-pack/test/functional/services/data/index.ts renamed to x-pack/test/send_search_to_background_integration/services/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
export { SendToBackgroundProvider } from './send_to_background';
7+
import { services as functionalServices } from '../../functional/services';
8+
import { SendToBackgroundProvider } from './send_to_background';
9+
10+
export const services = {
11+
...functionalServices,
12+
sendToBackground: SendToBackgroundProvider,
13+
};

x-pack/test/functional/services/data/send_to_background.ts renamed to x-pack/test/send_search_to_background_integration/services/send_to_background.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import { FtrProviderContext } from '../../ftr_provider_context';
8-
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
7+
import { FtrProviderContext } from '../ftr_provider_context';
8+
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper';
99

1010
const SEND_TO_BACKGROUND_TEST_SUBJ = 'backgroundSessionIndicator';
1111
const SEND_TO_BACKGROUND_POPOVER_CONTENT_TEST_SUBJ = 'backgroundSessionIndicatorPopoverContainer';

x-pack/test/functional/apps/dashboard/async_search/async_search.ts renamed to x-pack/test/send_search_to_background_integration/tests/apps/dashboard/async_search/async_search.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import expect from '@kbn/expect';
8-
import { FtrProviderContext } from '../../../ftr_provider_context';
8+
import { FtrProviderContext } from '../../../../ftr_provider_context';
99

1010
export default function ({ getService, getPageObjects }: FtrProviderContext) {
1111
const es = getService('es');

x-pack/test/functional/apps/dashboard/async_search/index.ts renamed to x-pack/test/send_search_to_background_integration/tests/apps/dashboard/async_search/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
* or more contributor license agreements. Licensed under the Elastic License;
44
* you may not use this file except in compliance with the Elastic License.
55
*/
6-
import { FtrProviderContext } from '../../../ftr_provider_context';
6+
import { FtrProviderContext } from '../../../../ftr_provider_context';
77

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

1212
describe('async search', function () {
13+
this.tags('ciGroup3');
14+
1315
before(async () => {
1416
await esArchiver.loadIfNeeded('logstash_functional');
1517
await esArchiver.load('dashboard/async_search');

0 commit comments

Comments
 (0)