diff --git a/src/app/theme/theme-detail/theme-detail.component.spec.ts b/src/app/theme/theme-detail/theme-detail.component.spec.ts index 5c8d683..572fbf2 100644 --- a/src/app/theme/theme-detail/theme-detail.component.spec.ts +++ b/src/app/theme/theme-detail/theme-detail.component.spec.ts @@ -107,6 +107,15 @@ describe('ThemeDetailComponent', () => { expect(component.loading).toBe(false) }) + it('should set showOperatorMessage to false', async () => { + const event = { index: 1 } + + await component.ngOnInit() + component.onTabChange(event) + + expect(component.showOperatorMessage).toBeFalsy() + }) + it('should create with default dateFormat', async () => { // recreate component to test constructor initializeComponent() @@ -267,13 +276,6 @@ describe('ThemeDetailComponent', () => { expect(component.onClose).toHaveBeenCalledTimes(1) }) - it('should return empty string if theme has no workspaces', () => { - component.theme = undefined - - const result = component.prepareWorkspaceList() - expect(result).toBe('') - }) - it('should navigate back on close', () => { component.ngOnInit() component.onClose() diff --git a/src/app/theme/theme-detail/theme-detail.component.ts b/src/app/theme/theme-detail/theme-detail.component.ts index 221ea6d..b74ddcb 100644 --- a/src/app/theme/theme-detail/theme-detail.component.ts +++ b/src/app/theme/theme-detail/theme-detail.component.ts @@ -7,14 +7,13 @@ import FileSaver from 'file-saver' import { Action, PortalMessageService, UserService } from '@onecx/portal-integration-angular' -import { sortByLocale, bffImageUrl, getCurrentDateTime } from 'src/app/shared/utils' +import { bffImageUrl, getCurrentDateTime } from 'src/app/shared/utils' import { ExportThemeRequest, ImagesInternalAPIService, RefType, Theme, - ThemesAPIService, - Workspace + ThemesAPIService } from 'src/app/shared/generated' @Component({ @@ -187,12 +186,6 @@ export class ThemeDetailComponent implements OnInit { } } - public prepareWorkspaceList(workspace?: Workspace[]): string { - const arr = workspace?.map((workspace: Workspace) => workspace.name) - arr?.sort(sortByLocale) - return arr ? arr.join(', ') : '' - } - public getImageUrl(theme: Theme | undefined, refType: RefType): string | undefined { if (!theme) { return undefined