[FTR] Mv test subjs svc to shared location (#174048)

## Summary

Refactoring general ui service to a kbn package.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Tre 2024-01-09 11:43:39 +00:00 committed by GitHub
parent 8186fc7300
commit 46707e46de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 22 additions and 22 deletions

View file

@ -1631,6 +1631,7 @@
"sass-embedded": "^1.69.5",
"sass-loader": "^10.5.1",
"selenium-webdriver": "^4.16.0",
"sharp": "0.32.6",
"simple-git": "^3.16.0",
"sinon": "^7.4.2",
"sort-package-json": "^1.53.1",

View file

@ -14,9 +14,11 @@ export type {
CustomCheerioStatic,
} from './services/web_element_wrapper/custom_cheerio_api';
export { Browsers } from './services/remote/browsers';
export { type Browser } from './services/browser';
export {
NETWORK_PROFILES,
type NetworkOptions,
type NetworkProfile,
} from './services/remote/network_profiles';
export type { TimeoutOpt } from './types';
export { TestSubjects } from './services/test_subjects';

View file

@ -9,9 +9,13 @@
import { RetryOnStaleProvider } from './retry_on_stale';
import { RemoteProvider } from './remote';
import { FindProvider } from './find';
import { TestSubjects } from './test_subjects';
import { BrowserProvider } from './browser';
export const services = {
retryOnStale: RetryOnStaleProvider,
__webdriver__: RemoteProvider,
find: FindProvider,
testSubjects: TestSubjects,
browser: BrowserProvider,
};

View file

@ -21,8 +21,8 @@ import {
NETWORK_PROFILES,
type NetworkOptions,
type NetworkProfile,
} from '@kbn/ftr-common-functional-ui-services';
import { FtrService, type FtrProviderContext } from '../../ftr_provider_context';
} from '..';
import { FtrService, type FtrProviderContext } from './ftr_provider_context';
export type Browser = BrowserService;

View file

@ -15,7 +15,5 @@ const services = {
retry: RetryService,
};
type Services = typeof services;
export type FtrProviderContext = GenericFtrProviderContext<Services, {}>;
export type FtrProviderContext = GenericFtrProviderContext<typeof services, {}>;
export class FtrService extends GenericFtrService<FtrProviderContext> {}

View file

@ -7,8 +7,9 @@
*/
import { subj as testSubjSelector } from '@kbn/test-subj-selector';
import { WebElementWrapper, type TimeoutOpt } from '@kbn/ftr-common-functional-ui-services';
import { FtrService } from '../../ftr_provider_context';
import { WebElementWrapper } from './web_element_wrapper';
import type { TimeoutOpt } from '../types';
import { FtrService } from './ftr_provider_context';
interface ExistsOptions {
timeout?: number;

View file

@ -11,6 +11,7 @@
"@kbn/tooling-log",
"@kbn/repo-info",
"@kbn/test-subj-selector",
"@kbn/ftr-common-functional-services"
"@kbn/ftr-common-functional-services",
"@kbn/std"
]
}

View file

@ -9,11 +9,10 @@
import { format as formatUrl } from 'url';
import supertest from 'supertest';
import { type Browser, TestSubjects } from '@kbn/ftr-common-functional-ui-services';
import { Role } from './role';
import { User } from './user';
import { FtrService, FtrProviderContext } from '../../ftr_provider_context';
import { Browser } from '../../../functional/services/common';
import { TestSubjects } from '../../../functional/services/common';
const TEST_USER_NAME = 'test_user';
const TEST_USER_PASSWORD = 'changeme';

View file

@ -6,10 +6,7 @@
* Side Public License, v 1.
*/
export type { Browser } from './browser';
export { BrowserProvider } from './browser';
export { FailureDebuggingProvider } from './failure_debugging';
export { PngService } from './png';
export { ScreenshotsService } from './screenshots';
export { SnapshotsService } from './snapshots';
export { TestSubjects } from './test_subjects';

View file

@ -11,12 +11,10 @@ import { services as commonServiceProviders } from '../../common/services';
import { AppsMenuService } from './apps_menu';
import {
BrowserProvider,
FailureDebuggingProvider,
PngService,
ScreenshotsService,
SnapshotsService,
TestSubjects,
} from './common';
import { ComboBoxService } from './combo_box';
import {
@ -61,7 +59,6 @@ export const services = {
...commonFunctionalUIServices,
filterBar: FilterBarService,
queryBar: QueryBarService,
testSubjects: TestSubjects,
docTable: DocTableService,
png: PngService,
screenshots: ScreenshotsService,
@ -83,7 +80,6 @@ export const services = {
dataGrid: DataGridService,
embedding: EmbeddingService,
renderable: RenderableService,
browser: BrowserProvider,
pieChart: PieChartService,
inspector: InspectorService,
fieldEditor: FieldEditorService,

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { Browser } from '../../../../../../../test/functional/services/common/browser';
import type { Browser } from '@kbn/ftr-common-functional-ui-services';
import { CommonPageObject } from '../../../../../../../test/functional/page_objects/common_page';
type PerformanceResourceTimingWithHttpStatus = PerformanceResourceTiming & {

View file

@ -6,8 +6,8 @@
*/
import expect from '@kbn/expect';
import type { Browser } from '@kbn/ftr-common-functional-ui-services';
import { AppSearchService, IEngine } from '../../../../services/app_search_service';
import { Browser } from '../../../../../../../test/functional/services/common';
import { FtrProviderContext } from '../../../../ftr_provider_context';
export default function enterpriseSearchSetupEnginesTests({

View file

@ -6,8 +6,8 @@
*/
import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
import { TestSubjects } from '@kbn/ftr-common-functional-ui-services';
import { FtrProviderContext } from '../ftr_provider_context';
import { TestSubjects } from '../../../../test/functional/services/common';
export function AppSearchPageProvider({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['common']);

View file

@ -4993,7 +4993,8 @@
uid ""
"@kbn/lens-inline-editing-example-plugin@link:x-pack/examples/lens_embeddable_inline_editing_example":
version "0.0.0"
uid ""
"@kbn/lens-plugin@link:x-pack/plugins/lens":
version "0.0.0"
@ -27629,7 +27630,7 @@ sharp@0.32.1:
tar-fs "^2.1.1"
tunnel-agent "^0.6.0"
sharp@^0.32.6:
sharp@0.32.6, sharp@^0.32.6:
version "0.32.6"
resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.32.6.tgz#6ad30c0b7cd910df65d5f355f774aa4fce45732a"
integrity sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==