Skip to content
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
8 changes: 4 additions & 4 deletions .buildkite/ftr_chat_serverless_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ disabled:

defaultQueue: 'n2-4-spot'
enabled:
- x-pack/test_serverless/api_integration/test_suites/chat/config.ts
- x-pack/test_serverless/api_integration/test_suites/chat/config.feature_flags.ts
- x-pack/solutions/chat/test/serverless/api_integration/configs/config.ts
- x-pack/solutions/chat/test/serverless/api_integration/configs/config.feature_flags.ts
- x-pack/platform/test/serverless/api_integration/configs/chat/config.group1.ts
- x-pack/test_serverless/functional/test_suites/chat/config.ts
- x-pack/test_serverless/functional/test_suites/chat/config.feature_flags.ts
- x-pack/solutions/chat/test/serverless/functional/configs/config.ts
- x-pack/solutions/chat/test/serverless/functional/configs/config.feature_flags.ts
- x-pack/platform/test/serverless/functional/configs/chat/config.config_compat_mode.ts
- x-pack/platform/test/serverless/functional/configs/chat/config.group1.ts
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ module.exports = {
'x-pack/solutions/*/test/**/tests/**/*',
'x-pack/solutions/*/test/api_integration_deployment_agnostic/*configs/**/*',
'x-pack/solutions/*/test/alerting_api_integration/**/*',
'x-pack/solutions/*/test/serverless/*/configs/**/*',
'x-pack/test/*/{tests,test_suites,apis,apps}/**/*',
'x-pack/test/*/*config.*ts',
'x-pack/platform/test/saved_object_api_integration/*/apis/**/*',
Expand Down
5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,7 @@ x-pack/solutions/chat/plugins/wci-index-source @elastic/search-kibana @elastic/w
x-pack/solutions/chat/plugins/wci-salesforce @elastic/search-kibana @elastic/workchat-eng
x-pack/solutions/chat/plugins/workchat-app @elastic/search-kibana @elastic/workchat-eng
x-pack/solutions/chat/plugins/workchat-framework @elastic/search-kibana @elastic/workchat-eng
x-pack/solutions/chat/test @elastic/workchat-eng
x-pack/solutions/observability/packages/alert-details @elastic/obs-ux-management-team
x-pack/solutions/observability/packages/alerting-test-data @elastic/obs-ux-management-team
x-pack/solutions/observability/packages/get-padded-alert-time-range-util @elastic/obs-ux-management-team
Expand Down Expand Up @@ -2302,9 +2303,9 @@ x-pack/platform/test/functional/page_objects/search_profiler_page.ts @elastic/se

# workchat
/x-pack/test_serverless/api_integration/test_suites/chat @elastic/search-kibana @elastic/workchat-eng
/x-pack/test_serverless/api_integration/test_suites/chat/config.ts @elastic/search-kibana @elastic/appex-qa
/x-pack/solutions/chat/test/serverless/api_integration/configs/config.ts @elastic/search-kibana @elastic/appex-qa
/x-pack/test_serverless/functional/test_suites/chat/ @elastic/search-kibana
/x-pack/test_serverless/functional/test_suites/chat/config.ts @elastic/search-kibana @elastic/appex-qa
/x-pack/solutions/chat/test/serverless/functional/configs/config.ts @elastic/search-kibana @elastic/appex-qa
/x-pack/platform/test/onechat_api_integration @elastic/search-kibana @elastic/workchat-eng


Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,7 @@
"@kbn/test-suites-serverless": "link:x-pack/test_serverless",
"@kbn/test-suites-src": "link:src/platform/test",
"@kbn/test-suites-xpack": "link:x-pack/test",
"@kbn/test-suites-xpack-chat": "link:x-pack/solutions/chat/test",
"@kbn/test-suites-xpack-observability": "link:x-pack/solutions/observability/test",
"@kbn/test-suites-xpack-performance": "link:x-pack/performance",
"@kbn/test-suites-xpack-platform": "link:x-pack/platform/test",
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2088,6 +2088,8 @@
"@kbn/test-suites-src/*": ["src/platform/test/*"],
"@kbn/test-suites-xpack": ["x-pack/test"],
"@kbn/test-suites-xpack/*": ["x-pack/test/*"],
"@kbn/test-suites-xpack-chat": ["x-pack/solutions/chat/test"],
"@kbn/test-suites-xpack-chat/*": ["x-pack/solutions/chat/test/*"],
"@kbn/test-suites-xpack-observability": ["x-pack/solutions/observability/test"],
"@kbn/test-suites-xpack-observability/*": ["x-pack/solutions/observability/test/*"],
"@kbn/test-suites-xpack-performance": ["x-pack/performance"],
Expand Down
2 changes: 2 additions & 0 deletions x-pack/solutions/chat/test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/functional/failure_debug
/functional/screenshots
8 changes: 8 additions & 0 deletions x-pack/solutions/chat/test/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "test-helper",
"id": "@kbn/test-suites-xpack-chat",
"owner": ["@elastic/workchat-eng"],
"group": "chat",
"visibility": "private",
"devOnly": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
* 2.0.
*/

import { createTestConfig } from '../../config.base';
import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/api_integration/config.base';
import { services } from '../services';

/**
* Make sure to create a MKI deployment with custom Kibana image, that includes feature flags arguments
* These tests most likely will fail on default MKI project
*/
export default createTestConfig({
serverlessProject: 'chat',
services,
junit: {
reportName: 'Serverless Chat Feature Flags API Integration Tests',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
* 2.0.
*/

import { createTestConfig } from '../../config.base';
import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/api_integration/config.base';
import { services } from '../services';

export default createTestConfig({
serverlessProject: 'chat',
services,
testFiles: [require.resolve('.')],
junit: {
reportName: 'Serverless Chat API Integration Tests',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FtrProviderContext } from '../../ftr_provider_context';
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('Serverless chat API - feature flags', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* 2.0.
*/

import { FtrProviderContext } from '../../ftr_provider_context';
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('Serverless chat API', function () {
this.tags(['esGate']);

loadTestFile(require.resolve('./platform_security'));
loadTestFile(require.resolve('../test_suites/platform_security'));
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { GenericFtrProviderContext } from '@kbn/test';

import { services } from './services';

export type FtrProviderContext = GenericFtrProviderContext<typeof services, {}>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { GenericFtrProviderContext } from '@kbn/test';
import { services as svlPlatformServices } from '@kbn/test-suites-xpack-platform/serverless/api_integration/services';

export const services = {
...svlPlatformServices,

// Chat Solution serverless FTR services
};

export type InheritedFtrProviderContext = GenericFtrProviderContext<typeof services, {}>;

export type InheritedServices = InheritedFtrProviderContext extends GenericFtrProviderContext<
infer TServices,
{}
>
? TServices
: {};

export type { SupertestWithRoleScopeType } from '@kbn/test-suites-xpack-platform/serverless/shared/services';
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../ftr_provider_context';
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ getService }: FtrProviderContext) {
const svlCommonApi = getService('svlCommonApi');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../ftr_provider_context';
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('Platform security APIs', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
* 2.0.
*/

import { createTestConfig } from '../../config.base';
import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/functional/config.base';
import { services } from '../services';

/**
* Make sure to create a MKI deployment with custom Kibana image, that includes feature flags arguments
* These tests most likely will fail on default MKI project
*/
export default createTestConfig({
serverlessProject: 'chat',
services,
junit: {
reportName: 'Serverless Chat Feature Flags Functional Tests',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
* 2.0.
*/

import { createTestConfig } from '../../config.base';
import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/functional/config.base';
import { services } from '../services';

export default createTestConfig({
serverlessProject: 'chat',
services,
testFiles: [require.resolve('.')],
junit: {
reportName: 'Serverless Chat Functional Tests',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FtrProviderContext } from '../../ftr_provider_context';
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('serverless chat UI - feature flags', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* 2.0.
*/

import { FtrProviderContext } from '../../ftr_provider_context';
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('serverless chat UI', function () {
this.tags(['esGate']);

loadTestFile(require.resolve('./navigation/navigation.ts'));
loadTestFile(require.resolve('../test_suites/navigation/navigation.ts'));
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { GenericFtrProviderContext } from '@kbn/test';

import { services } from './services';
import { pageObjects } from './page_objects';

export type FtrProviderContext = GenericFtrProviderContext<typeof services, typeof pageObjects>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { pageObjects as svlPlatformPageObjects } from '@kbn/test-suites-xpack-platform/serverless/functional/page_objects';

export const services = {
...svlPlatformPageObjects,
// Chat Solution serverless FTR page objects
};
27 changes: 27 additions & 0 deletions x-pack/solutions/chat/test/serverless/functional/services/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { GenericFtrProviderContext } from '@kbn/test';
import { services as svlPlatformServices } from '@kbn/test-suites-xpack-platform/serverless/functional/services';
import { SvlChatNavigationServiceProvider } from './svl_chat_navigation';

export const services = {
...svlPlatformServices,
// Chat Solution serverless FTR services
svlChatNavigation: SvlChatNavigationServiceProvider,
};

export type InheritedFtrProviderContext = GenericFtrProviderContext<typeof services, {}>;

export type InheritedServices = InheritedFtrProviderContext extends GenericFtrProviderContext<
infer TServices,
{}
>
? TServices
: {};

export type { SupertestWithRoleScopeType } from '@kbn/test-suites-xpack-platform/serverless/shared/services';
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrProviderContext } from '../ftr_provider_context';

export function SvlChatNavigationServiceProvider({
getService,
getPageObjects,
}: FtrProviderContext) {
const retry = getService('retry');
const PageObjects = getPageObjects(['common']);
const testSubjects = getService('testSubjects');

return {
async navigateToLandingPage() {
await retry.tryForTime(60 * 1000, async () => {
await PageObjects.common.navigateToApp('landingPage');
await testSubjects.existOrFail('workChatHomePage', { timeout: 2000 });
await testSubjects.existOrFail('projectLayoutSideNav', { timeout: 2000 });
});
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../ftr_provider_context';
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ getPageObject, getService }: FtrProviderContext) {
const svlChatNavigation = getService('svlChatNavigation');
Expand Down
24 changes: 24 additions & 0 deletions x-pack/solutions/chat/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
"node",
"cheerio",
"@emotion/react/types/css-prop",
"@kbn/ambient-ui-types",
"@kbn/ambient-ftr-types"
],
"resolveJsonModule": true,
},
"include": [
"**/*",
"../../../../typings/**/*",
"../../../../src/platform/packages/shared/kbn-test/types/ftr_globals/**/*",
],
"exclude": ["target/**/*", "*/plugins/**/*", "plugins/**/*"],
"kbn_references": [
"@kbn/test",
"@kbn/test-suites-xpack-platform",
]
}
Loading