diff options
author | 2022-11-24 10:29:04 +0000 | |
---|---|---|
committer | 2023-01-26 23:32:10 +0000 | |
commit | 701e441228724c5b701d94cc3f1e520ce656398a (patch) | |
tree | 5900482086d86f8b8e465e6d4b57db4bd7a94184 /catalog-ui/src/app/ng2/pages/type-workspace/workspace-menu/workspace-menu.component.spec.ts | |
parent | 1bbecd7edbdd907a53812d303d378236d23d071e (diff) |
Import data type in UI
Develop all necessary changes in the UI to allow importing a data type from a yaml file
Issue-ID: SDC-4279
Signed-off-by: franciscovila <javier.paradela.vila@est.tech>
Change-Id: Id413386fad8b362e8c4a1d25c859a22178189074
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/type-workspace/workspace-menu/workspace-menu.component.spec.ts')
-rw-r--r-- | catalog-ui/src/app/ng2/pages/type-workspace/workspace-menu/workspace-menu.component.spec.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/pages/type-workspace/workspace-menu/workspace-menu.component.spec.ts b/catalog-ui/src/app/ng2/pages/type-workspace/workspace-menu/workspace-menu.component.spec.ts index a91258c00e..d9bb8833cd 100644 --- a/catalog-ui/src/app/ng2/pages/type-workspace/workspace-menu/workspace-menu.component.spec.ts +++ b/catalog-ui/src/app/ng2/pages/type-workspace/workspace-menu/workspace-menu.component.spec.ts @@ -26,6 +26,8 @@ import {CacheService} from "../../../services/cache.service"; import {States} from "../../../../utils/constants"; import {IAppMenu} from "../../../../models/app-config"; import {SdcMenuToken} from "../../../config/sdc-menu.config"; +import {IScope} from "../../../../../typings/angularjs/angular"; +import {IWorkspaceViewModelScope} from "../../../../view-models/workspace/workspace-view-model"; describe('WorkspaceMenuComponent', () => { let component: WorkspaceMenuComponent; @@ -59,6 +61,20 @@ describe('WorkspaceMenuComponent', () => { } }) }; + let importedFileMock: File = null; + let stateParamsMock: Partial<ng.ui.IStateParamsService> = { + 'importedFile': importedFileMock + }; + let resolveMock = {"$stateParams": stateParamsMock}; + let parentScopeMock: Partial<IScope> = { + '$resolve': resolveMock + }; + let scopeMock_: Partial<IWorkspaceViewModelScope> = { + '$parent': parentScopeMock, + 'current': { + 'name': States.TYPE_WORKSPACE + } + } beforeEach(async(() => { TestBed.configureTestingModule({ @@ -66,6 +82,7 @@ describe('WorkspaceMenuComponent', () => { providers: [ {provide: CacheService, useValue: cacheService}, {provide: '$injector', useValue: injectorMock}, + {provide: "$scope", useValue: scopeMock_ }, {provide: SdcMenuToken, useValue: sdcMenuMock} ] }) |