Skip to content
Merged
77 changes: 77 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2316,6 +2316,83 @@ module.exports = {
],
},
},
{
files: [
'src/platform/plugins/**/ui_tests/**/*.ts',
'x-pack/platform/**/plugins/**/ui_tests/**/*.ts',
],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@playwright/test',
message: "Platform tests should import only from '@kbn/scout'.",
},
{
name: 'playwright',
message: "Platform tests should import only from '@kbn/scout'.",
},
],
},
],
},
},
{
files: ['x-pack/solutions/observability/plugins/**/ui_tests/**/*.ts'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@kbn/scout',
message:
"Observability solution tests should import from '@kbn/scout-oblt' instead.",
},
{
name: '@playwright/test',
message:
"Observability solution tests should import from '@kbn/scout-oblt' instead.",
},
{
name: 'playwright',
message:
"Observability solution tests should import from '@kbn/scout-oblt' instead.",
},
],
},
],
},
},
{
files: ['x-pack/solutions/security/plugins/**/ui_tests/**/*.ts'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@kbn/scout',
message:
"Security solution tests should import from '@kbn/scout-security' instead.",
},
{
name: '@playwright/test',
message:
"Security solution tests should import from '@kbn/scout-security' instead.",
},
{
name: 'playwright',
message:
"Security solution tests should import from '@kbn/scout-security' instead.",
},
],
},
],
},
},
],
};

Expand Down
2 changes: 1 addition & 1 deletion x-pack/platform/plugins/shared/streams_app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@
"@kbn/kibana-utils-plugin",
"@kbn/field-types",
"@kbn/field-formats-plugin",
"@kbn/test"
"@kbn/test",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ export type {
ScoutPlaywrightOptions,
ScoutTestOptions,
Locator,
SynthtraceFixture,
} from '@kbn/scout';
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
"@kbn/logs-data-access-plugin",
"@kbn/core-pricing-browser-mocks",
"@kbn/esql",
"@kbn/scout",
"@kbn/apm-synthtrace-client",
"@kbn/scout-oblt",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { SynthtraceFixture } from '@kbn/scout';
import { SynthtraceFixture } from '@kbn/scout-oblt';
import { apm, log, timerange } from '@kbn/apm-synthtrace-client';

const TEST_START_TIME = '2024-01-01T00:00:00.000Z';
Expand Down