app list component stories

This commit is contained in:
Denys Vuika
2024-10-02 09:57:26 -04:00
parent fbdac3fff6
commit fa61d28dc9
4 changed files with 9 additions and 41 deletions
@@ -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();
});
});
@@ -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)]
@@ -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)]
@@ -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();
}