import { registerTestBed , AsyncTestBedConfig } from '@kbn/test/jest' ; import { RepositoryEdit } from '../../../public/application/sections/repository_edit' ; import { WithAppDependencies } from './setup_environment' ; import { REPOSITORY_NAME } from './constant' ; const testBedConfig = { memoryRouter : { initialEntries : [ `/${ REPOSITORY_NAME }` ] , componentRoutePath : '/:name' , } , doMountAsync : true , } ; export const setup = registerTestBed < RepositoryEditTestSubjects > ( WithAppDependencies ( RepositoryEdit ) , testBedConfig ) ; export type RepositoryEditTestSubjects = TestSubjects | ThreeLevelDepth | NonVisibleTestSubjects ; type NonVisibleTestSubjects = 'uriInput' | 'schemeSelect' | 'clientInput' | 'containerInput' | 'basePathInput' | 'maxSnapshotBytesInput' | 'locationModeSelect' | 'bucketInput' | 'urlInput' | 'pathInput' | 'loadDefaultsToggle' | 'securityPrincipalInput' | 'serverSideEncryptionToggle' | 'bufferSizeInput' | 'cannedAclSelect' | 'storageClassSelect' ; type ThreeLevelDepth = 'repositoryForm.stepTwo.title' ; type TestSubjects = 'chunkSizeInput' | 'compressToggle' | 'locationInput' | 'maxRestoreBytesInput' | 'maxSnapshotBytesInput' | 'readOnlyToggle' | 'repositoryForm' | 'repositoryForm.chunkSizeInput' | 'repositoryForm.compressToggle' | 'repositoryForm.locationInput' | 'repositoryForm.maxRestoreBytesInput' | 'repositoryForm.maxSnapshotBytesInput' | 'repositoryForm.readOnlyToggle' | 'repositoryForm.stepTwo' | 'repositoryForm.submitButton' | 'repositoryForm.title' | 'snapshotRestoreApp' | 'snapshotRestoreApp.chunkSizeInput' | 'snapshotRestoreApp.compressToggle' | 'snapshotRestoreApp.locationInput' | 'snapshotRestoreApp.maxRestoreBytesInput' | 'snapshotRestoreApp.maxSnapshotBytesInput' | 'snapshotRestoreApp.readOnlyToggle' | 'snapshotRestoreApp.repositoryForm' | 'snapshotRestoreApp.stepTwo' | 'snapshotRestoreApp.submitButton' | 'snapshotRestoreApp.title' | 'stepTwo' | 'stepTwo.chunkSizeInput' | 'stepTwo.compressToggle' | 'stepTwo.locationInput' | 'stepTwo.maxRestoreBytesInput' | 'stepTwo.maxSnapshotBytesInput' | 'stepTwo.readOnlyToggle' | 'stepTwo.submitButton' | 'stepTwo.title' | 'submitButton' | 'title' ;