From fa61d28dc97a27655b29b4ab815e0c7c188eb0d7 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 18 Sep 2024 14:45:33 -0400 Subject: [PATCH] app list component stories --- .../src/lib/app/app-list-cloud.module.spec.ts | 35 ------------------- .../app-details-cloud.component.stories.ts | 4 +-- .../app-list-cloud.component.stories.ts | 4 +-- .../services/apps-process-cloud.service.ts | 7 ++-- 4 files changed, 9 insertions(+), 41 deletions(-) diff --git a/lib/process-services-cloud/src/lib/app/app-list-cloud.module.spec.ts b/lib/process-services-cloud/src/lib/app/app-list-cloud.module.spec.ts index ea61d41d32..e69de29bb2 100644 --- a/lib/process-services-cloud/src/lib/app/app-list-cloud.module.spec.ts +++ b/lib/process-services-cloud/src/lib/app/app-list-cloud.module.spec.ts @@ -1,35 +0,0 @@ -/*! - * @license - * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { NoopTranslateModule } from '@alfresco/adf-core'; -import { AppListCloudModule } from './app-list-cloud.module'; -import { TestBed } from '@angular/core/testing'; - -describe('AppListCloudModule', () => { - let appListCloudModule: AppListCloudModule; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [AppListCloudModule, NoopTranslateModule] - }); - appListCloudModule = TestBed.inject(AppListCloudModule); - }); - - it('should create an instance', () => { - expect(appListCloudModule).toBeTruthy(); - }); -}); diff --git a/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.stories.ts b/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.stories.ts index 346b6bfaeb..268ffb65b2 100644 --- a/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.stories.ts +++ b/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.stories.ts @@ -18,7 +18,7 @@ import { applicationConfig, Meta, moduleMetadata, StoryFn } from '@storybook/angular'; import { AppDetailsCloudComponent } from './app-details-cloud.component'; import { ProcessServicesCloudStoryModule } from '../../testing/process-services-cloud-story.module'; -import { AppListCloudModule } from '../app-list-cloud.module'; +import { APP_LIST_CLOUD_DIRECTIVES } from '../app-list-cloud.module'; import { fakeApplicationInstance } from '../mock/app-model.mock'; import { importProvidersFrom } from '@angular/core'; @@ -27,7 +27,7 @@ export default { title: 'Process Services Cloud/App List Cloud/App Details Cloud', decorators: [ moduleMetadata({ - imports: [AppListCloudModule] + imports: [...APP_LIST_CLOUD_DIRECTIVES] }), applicationConfig({ providers: [importProvidersFrom(ProcessServicesCloudStoryModule)] diff --git a/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.stories.ts b/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.stories.ts index a23f356393..9fd8efc4b3 100644 --- a/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.stories.ts +++ b/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.stories.ts @@ -17,7 +17,7 @@ import { applicationConfig, Meta, moduleMetadata, StoryFn } from '@storybook/angular'; import { ProcessServicesCloudStoryModule } from '../../testing/process-services-cloud-story.module'; -import { AppListCloudModule } from '../app-list-cloud.module'; +import { APP_LIST_CLOUD_DIRECTIVES } from '../app-list-cloud.module'; import { AppListCloudComponent } from './app-list-cloud.component'; import { importProvidersFrom } from '@angular/core'; @@ -26,7 +26,7 @@ export default { title: 'Process Services Cloud/App List Cloud/App List Cloud', decorators: [ moduleMetadata({ - imports: [AppListCloudModule] + imports: [...APP_LIST_CLOUD_DIRECTIVES] }), applicationConfig({ providers: [importProvidersFrom(ProcessServicesCloudStoryModule)] diff --git a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts index 5d907846b4..a34bd4cbc1 100644 --- a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { Injectable } from '@angular/core'; +import { inject, Injectable } from '@angular/core'; import { Observable, from, of } from 'rxjs'; import { map } from 'rxjs/operators'; import { AppConfigService } from '@alfresco/adf-core'; @@ -26,9 +26,12 @@ import { RequestOptions } from '@alfresco/js-api'; @Injectable({ providedIn: 'root' }) export class AppsProcessCloudService { + private adfHttpClient = inject(AdfHttpClient); + private appConfigService = inject(AppConfigService); + deployedApps: ApplicationInstanceModel[]; - constructor(private adfHttpClient: AdfHttpClient, private appConfigService: AppConfigService) { + constructor() { this.loadApps(); }