diff --git a/demo-shell/src/app/components/home/home.component.spec.ts b/demo-shell/src/app/components/home/home.component.spec.ts deleted file mode 100644 index e0de377797..0000000000 --- a/demo-shell/src/app/components/home/home.component.spec.ts +++ /dev/null @@ -1,36 +0,0 @@ -/*! - * @license - * Copyright 2019 Alfresco Software, Ltd. - * - * 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 { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { TestBed } from '@angular/core/testing'; -import { HomeComponent } from './home.component'; -import { CoreModule } from '@alfresco/adf-core'; - -describe('HomeComponent', () => { - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [CoreModule.forRoot()], - declarations: [HomeComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); - }); - - it ('should work', () => { - const fixture = TestBed.createComponent(HomeComponent); - expect(fixture.componentInstance instanceof HomeComponent).toBe(true, 'should create HomeComponent'); - }); -}); diff --git a/lib/content-services/src/lib/document-list/components/content-column/content-column-list.component.spec.ts b/lib/content-services/src/lib/document-list/components/content-column/content-column-list.component.spec.ts deleted file mode 100644 index 792a8c8fe4..0000000000 --- a/lib/content-services/src/lib/document-list/components/content-column/content-column-list.component.spec.ts +++ /dev/null @@ -1,69 +0,0 @@ -/*! - * @license - * Copyright 2019 Alfresco Software, Ltd. - * - * 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 { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { TestBed } from '@angular/core/testing'; -import { DataColumn, setupTestBed, LogService } from '@alfresco/adf-core'; -import { DocumentListComponent } from './../document-list.component'; -import { ContentColumnListComponent } from './content-column-list.component'; -import { ContentTestingModule } from '../../../testing/content.testing.module'; - -describe('ContentColumnList', () => { - - let documentList: DocumentListComponent; - let columnList: ContentColumnListComponent; - let logService: LogService; - - setupTestBed({ - imports: [ContentTestingModule], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); - - beforeEach(() => { - documentList = (TestBed.createComponent(DocumentListComponent).componentInstance as DocumentListComponent); - logService = TestBed.get(LogService); - columnList = new ContentColumnListComponent(documentList, logService); - - documentList.ngOnInit(); - }); - - it('should register column within parent document list', () => { - const columns = documentList.data.getColumns(); - expect(columns.length).toBe(0); - - const column = {}; - const result = columnList.registerColumn(column); - - expect(result).toBeTruthy(); - expect(columns.length).toBe(1); - expect(columns[0]).toBe(column); - }); - - it('should require document list instance to register action', () => { - columnList = new ContentColumnListComponent(null, logService); - const col = {}; - expect(columnList.registerColumn(col)).toBeFalsy(); - }); - - it('should require action instance to register', () => { - spyOn(documentList.actions, 'push').and.callThrough(); - const result = columnList.registerColumn(null); - - expect(result).toBeFalsy(); - expect(documentList.actions.push).not.toHaveBeenCalled(); - }); -}); diff --git a/lib/content-services/src/lib/document-list/components/content-column/content-column-list.component.ts b/lib/content-services/src/lib/document-list/components/content-column/content-column-list.component.ts deleted file mode 100644 index b57dccc7a7..0000000000 --- a/lib/content-services/src/lib/document-list/components/content-column/content-column-list.component.ts +++ /dev/null @@ -1,47 +0,0 @@ -/*! - * @license - * Copyright 2019 Alfresco Software, Ltd. - * - * 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. - */ - - /* tslint:disable:component-selector */ - -import { DataColumn, LogService } from '@alfresco/adf-core'; -import { Component } from '@angular/core'; - -import { DocumentListComponent } from './../document-list.component'; - -@Component({ - selector: 'content-columns', - template: '' -}) -export class ContentColumnListComponent { - - constructor(private documentList: DocumentListComponent, private logService: LogService ) { - this.logService.log('ContentColumnListComponent is deprecated starting with 1.7.0 and may be removed in future versions. Use DataColumnListComponent instead.'); - } - - /** - * Registers column model within the parent document list component. - * @param column Column definition model to register. - */ - registerColumn(column: DataColumn): boolean { - if (this.documentList && column) { - const columns = this.documentList.data.getColumns(); - columns.push(column); - return true; - } - return false; - } -} diff --git a/lib/content-services/src/lib/document-list/components/content-column/content-column.component.spec.ts b/lib/content-services/src/lib/document-list/components/content-column/content-column.component.spec.ts deleted file mode 100644 index b05234972f..0000000000 --- a/lib/content-services/src/lib/document-list/components/content-column/content-column.component.spec.ts +++ /dev/null @@ -1,81 +0,0 @@ -/*! - * @license - * Copyright 2019 Alfresco Software, Ltd. - * - * 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 { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { TestBed } from '@angular/core/testing'; -import { LogService, setupTestBed } from '@alfresco/adf-core'; -import { DocumentListComponent } from './../document-list.component'; -import { ContentColumnListComponent } from './content-column-list.component'; -import { ContentColumnComponent } from './content-column.component'; -import { ContentTestingModule } from '../../../testing/content.testing.module'; - -describe('ContentColumn', () => { - - let documentList: DocumentListComponent; - let columnList: ContentColumnListComponent; - let logService: LogService; - - setupTestBed({ - imports: [ContentTestingModule], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); - - beforeEach(() => { - documentList = (TestBed.createComponent(DocumentListComponent).componentInstance as DocumentListComponent); - logService = TestBed.get(LogService); - columnList = new ContentColumnListComponent(documentList, logService); - - documentList.ngOnInit(); - }); - - it('should register model within parent column list', () => { - spyOn(columnList, 'registerColumn').and.callThrough(); - - const column = new ContentColumnComponent(columnList, logService); - column.ngAfterContentInit(); - - expect(columnList.registerColumn).toHaveBeenCalled(); - - const columns = documentList.data.getColumns(); - expect(columns.length).toBe(1); - expect(columns[0]).toBe(column); - }); - - it('should setup screen reader title for thumbnail column', () => { - const column = new ContentColumnComponent(columnList, logService); - column.key = '$thumbnail'; - column.ngOnInit(); - - expect(column.srTitle).toBe('Thumbnail'); - }); - - it('should register on init', () => { - const column = new ContentColumnComponent(columnList, logService); - spyOn(column, 'register').and.callThrough(); - - column.ngAfterContentInit(); - expect(column.register).toHaveBeenCalled(); - }); - - it('should require action list to register action with', () => { - let column = new ContentColumnComponent(columnList, logService); - expect(column.register()).toBeTruthy(); - - column = new ContentColumnComponent(null, logService); - expect(column.register()).toBeFalsy(); - }); -}); diff --git a/lib/content-services/src/lib/document-list/components/content-column/content-column.component.ts b/lib/content-services/src/lib/document-list/components/content-column/content-column.component.ts deleted file mode 100644 index 748feb518e..0000000000 --- a/lib/content-services/src/lib/document-list/components/content-column/content-column.component.ts +++ /dev/null @@ -1,77 +0,0 @@ -/*! - * @license - * Copyright 2019 Alfresco Software, Ltd. - * - * 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. - */ - - /* tslint:disable:component-selector no-input-rename */ - -import { DataColumn, DataColumnType, LogService } from '@alfresco/adf-core'; -import { AfterContentInit, Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core'; -import { ContentColumnListComponent } from './content-column-list.component'; - -@Component({ - selector: 'content-column', - template: '' -}) -export class ContentColumnComponent implements OnInit, AfterContentInit, DataColumn { - - @Input() - key: string; - - @Input() - type: DataColumnType = 'text'; - - @Input() - format: string; - - @Input() - sortable: boolean = false; - - @Input() - title: string = ''; - - @ContentChild(TemplateRef) - template: any; - - /** - * Title to be used for screen readers. - */ - @Input('sr-title') - srTitle: string; - - @Input('class') - cssClass: string; - - constructor(private list: ContentColumnListComponent, private logService: LogService) { - this.logService.log('ContentColumnComponent is deprecated starting with 1.7.0 and may be removed in future versions. Use DataColumnComponent instead.'); - } - - ngOnInit() { - if (!this.srTitle && this.key === '$thumbnail') { - this.srTitle = 'Thumbnail'; - } - } - - ngAfterContentInit() { - this.register(); - } - - register(): boolean { - if (this.list) { - return this.list.registerColumn(this); - } - return false; - } -} diff --git a/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts b/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts index acd6027169..e70e225b9a 100644 --- a/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts +++ b/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts @@ -104,6 +104,123 @@ describe('DocumentList', () => { fixture.destroy(); }); + describe('presets', () => { + + const validatePreset = (keys: string[]) => { + const columns = documentList.data.getColumns(); + expect(columns.length).toBe(keys.length); + + keys.forEach((key, index) => { + expect(columns[index].key).toBe(key); + }); + }; + + it('should load -trashcan- preset', async () => { + documentList.currentFolderId = '-trashcan-'; + + fixture.detectChanges(); + await fixture.whenStable(); + + validatePreset([ + '$thumbnail', + 'name', + 'path', + 'content.sizeInBytes', + 'archivedAt', + 'archivedByUser.displayName' + ]); + }); + + it('should load -sites- preset', async () => { + documentList.currentFolderId = '-sites-'; + + fixture.detectChanges(); + await fixture.whenStable(); + + validatePreset([ + '$thumbnail', + 'title', + 'visibility' + ]); + }); + + it('shuld load -mysites- preset', async () => { + documentList.currentFolderId = '-mysites-'; + + fixture.detectChanges(); + await fixture.whenStable(); + + validatePreset([ + '$thumbnail', + 'title', + 'visibility' + ]); + }); + + it('should load -favorites- preset', async () => { + documentList.currentFolderId = '-favorites-'; + + fixture.detectChanges(); + await fixture.whenStable(); + + validatePreset([ + '$thumbnail', + 'name', + 'path', + 'content.sizeInBytes', + 'modifiedAt', + 'modifiedByUser.displayName' + ]); + }); + + it('should load -recent- preset', async () => { + documentList.currentFolderId = '-recent-'; + + fixture.detectChanges(); + await fixture.whenStable(); + + validatePreset([ + '$thumbnail', + 'name', + 'path', + 'content.sizeInBytes', + 'modifiedAt' + ]); + }); + + it('should load -sharedlinks- preset', async () => { + documentList.currentFolderId = '-sharedlinks-'; + + fixture.detectChanges(); + await fixture.whenStable(); + + validatePreset([ + '$thumbnail', + 'name', + 'path', + 'content.sizeInBytes', + 'modifiedAt', + 'modifiedByUser.displayName', + 'sharedByUser.displayName' + ]); + }); + + it('should load default preset', async () => { + documentList.currentFolderId = 'f5dacdb9-6d07-4fe9-9f2a-dedc21bae603'; + + fixture.detectChanges(); + await fixture.whenStable(); + + validatePreset([ + '$thumbnail', + 'name', + 'content.sizeInBytes', + 'modifiedAt', + 'modifiedByUser.displayName' + ]); + }); + }); + it('should update schema if columns change', fakeAsync(() => { documentList.columnList = new DataColumnListComponent(); documentList.columnList.columns = new QueryList(); diff --git a/lib/content-services/src/lib/document-list/document-list.module.ts b/lib/content-services/src/lib/document-list/document-list.module.ts index 47dfea4e73..c68b545bd5 100644 --- a/lib/content-services/src/lib/document-list/document-list.module.ts +++ b/lib/content-services/src/lib/document-list/document-list.module.ts @@ -25,8 +25,6 @@ import { UploadModule } from '../upload/upload.module'; import { ContentActionListComponent } from './components/content-action/content-action-list.component'; import { ContentActionComponent } from './components/content-action/content-action.component'; -import { ContentColumnListComponent } from './components/content-column/content-column-list.component'; -import { ContentColumnComponent } from './components/content-column/content-column.component'; import { DocumentListComponent } from './components/document-list.component'; import { TrashcanNameColumnComponent } from './components/trashcan-name-column/trashcan-name-column.component'; @@ -46,25 +44,21 @@ import { NameColumnComponent } from './components/name-column/name-column.compon ], declarations: [ DocumentListComponent, - ContentColumnComponent, TrashcanNameColumnComponent, LibraryStatusColumnComponent, LibraryRoleColumnComponent, LibraryNameColumnComponent, NameColumnComponent, - ContentColumnListComponent, ContentActionComponent, ContentActionListComponent ], exports: [ DocumentListComponent, - ContentColumnComponent, TrashcanNameColumnComponent, LibraryStatusColumnComponent, LibraryRoleColumnComponent, LibraryNameColumnComponent, NameColumnComponent, - ContentColumnListComponent, ContentActionComponent, ContentActionListComponent ], diff --git a/lib/content-services/src/lib/document-list/public-api.ts b/lib/content-services/src/lib/document-list/public-api.ts index 98c6ca60bf..32c84aa338 100644 --- a/lib/content-services/src/lib/document-list/public-api.ts +++ b/lib/content-services/src/lib/document-list/public-api.ts @@ -17,8 +17,6 @@ export * from './components/document-list.component'; export * from './components/node.event'; -export * from './components/content-column/content-column.component'; -export * from './components/content-column/content-column-list.component'; export * from './components/content-action/content-action.component'; export * from './components/content-action/content-action-list.component'; export * from './components/library-name-column/library-name-column.component'; diff --git a/lib/content-services/src/lib/document-list/services/node-actions.service.spec.ts b/lib/content-services/src/lib/document-list/services/node-actions.service.spec.ts index 642be455e2..5501a43c5f 100644 --- a/lib/content-services/src/lib/document-list/services/node-actions.service.spec.ts +++ b/lib/content-services/src/lib/document-list/services/node-actions.service.spec.ts @@ -60,10 +60,6 @@ describe('NodeActionsService', () => { contentDialogService = TestBed.get(ContentNodeDialogService); }); - it('should be able to create the service', () => { - expect(service).not.toBeNull(); - }); - it('should be able to copy content', async(() => { spyOn(documentListService, 'copyNode').and.returnValue(of('FAKE-OK')); spyOn(contentDialogService, 'openCopyMoveDialog').and.returnValue(of([fakeNode])); diff --git a/lib/content-services/src/lib/permission-manager/services/node-permission-dialog.service.spec.ts b/lib/content-services/src/lib/permission-manager/services/node-permission-dialog.service.spec.ts index 361eda90b7..d1fac9fd58 100644 --- a/lib/content-services/src/lib/permission-manager/services/node-permission-dialog.service.spec.ts +++ b/lib/content-services/src/lib/permission-manager/services/node-permission-dialog.service.spec.ts @@ -54,10 +54,6 @@ describe('NodePermissionDialogService', () => { }); }); - it('should be able to create the service', () => { - expect(service).not.toBeNull(); - }); - describe('when node has permission to update permissions', () => { let fakePermissionNode = new Node({}); diff --git a/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.spec.ts b/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.spec.ts index 6cc2e78079..db4f0d8941 100644 --- a/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.spec.ts +++ b/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.spec.ts @@ -54,10 +54,6 @@ describe('CardViewArrayItemComponent', () => { component.property = new CardViewArrayItemModel(mockDefaultProps); }); - it('should create CardViewArrayItemComponent', () => { - expect(component instanceof CardViewArrayItemComponent).toBeTruthy(); - }); - describe('Rendering', () => { it('should render the label', () => { fixture.detectChanges(); diff --git a/lib/core/data-column/data-column-list.component.spec.ts b/lib/core/data-column/data-column-list.component.spec.ts deleted file mode 100644 index 53e3ad48eb..0000000000 --- a/lib/core/data-column/data-column-list.component.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -/*! - * @license - * Copyright 2019 Alfresco Software, Ltd. - * - * 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 { TestBed } from '@angular/core/testing'; -import { DataColumnListComponent } from './data-column-list.component'; -import { setupTestBed } from '../testing/setup-test-bed'; -import { CoreTestingModule } from '../testing/core.testing.module'; - -describe('DataColumnListComponent', () => { - - setupTestBed({ - imports: [CoreTestingModule] - }); - - it('should create the component', () => { - const fixture = TestBed.createComponent(DataColumnListComponent); - const component = fixture.debugElement.componentInstance; - expect(component).toBeTruthy(); - }); -}); diff --git a/lib/core/data-column/data-column.component.spec.ts b/lib/core/data-column/data-column.component.spec.ts index f4ad5fc1a1..9c6fc50ea4 100644 --- a/lib/core/data-column/data-column.component.spec.ts +++ b/lib/core/data-column/data-column.component.spec.ts @@ -15,7 +15,6 @@ * limitations under the License. */ -import { TestBed } from '@angular/core/testing'; import { DataColumnComponent } from './data-column.component'; import { setupTestBed } from '../testing/setup-test-bed'; import { CoreTestingModule } from '../testing/core.testing.module'; @@ -26,12 +25,6 @@ describe('DataColumnListComponent', () => { imports: [CoreTestingModule] }); - it('should create the component', () => { - const fixture = TestBed.createComponent(DataColumnComponent); - const component = fixture.debugElement.componentInstance; - expect(component).toBeTruthy(); - }); - it('should setup screen reader title for thumbnails', () => { const component = new DataColumnComponent(); component.key = '$thumbnail'; diff --git a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.spec.ts b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.spec.ts index 4c92279e57..2c2d22df21 100644 --- a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.spec.ts +++ b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.spec.ts @@ -56,10 +56,6 @@ describe('DateEditorComponent', () => { component.column = column; }); - it('should create instance of DateEditorComponent', () => { - expect(fixture.componentInstance instanceof DateEditorComponent).toBe(true, 'should create DateEditorComponent'); - }); - describe('using Date Piker', () => { it('should update row value on change', () => { const input = > {value: '14-03-2016' }; diff --git a/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.spec.ts b/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.spec.ts index 3b7cf6e295..7c294c99c0 100644 --- a/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.spec.ts +++ b/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.spec.ts @@ -55,10 +55,6 @@ describe('DateTimeEditorComponent', () => { component.column = column; }); - it('should create instance of DateTimeEditorComponent', () => { - expect(fixture.componentInstance instanceof DateTimeEditorComponent).toBe(true, 'should create DateTimeEditorComponent'); - }); - it('should update fow value on change', () => { component.ngOnInit(); const newDate = moment('22-6-2018 04:20 AM', 'D-M-YYYY hh:mm A'); diff --git a/lib/core/info-drawer/info-drawer.component.spec.ts b/lib/core/info-drawer/info-drawer.component.spec.ts index 424561e159..1584cd18b8 100644 --- a/lib/core/info-drawer/info-drawer.component.spec.ts +++ b/lib/core/info-drawer/info-drawer.component.spec.ts @@ -48,10 +48,6 @@ describe('InfoDrawerComponent', () => { component = fixture.componentInstance; }); - it('should create instance of InfoDrawerComponent', () => { - expect(fixture.componentInstance instanceof InfoDrawerComponent).toBe(true, 'should create InfoDrawerComponent'); - }); - it('should define InfoDrawerTabLayout', () => { const infoDrawerTabLayout = element.querySelector('adf-info-drawer-layout'); expect(infoDrawerTabLayout).toBeDefined(); diff --git a/lib/core/layout/components/header/header.component.spec.ts b/lib/core/layout/components/header/header.component.spec.ts index dec3b8c3a9..30365b02c1 100644 --- a/lib/core/layout/components/header/header.component.spec.ts +++ b/lib/core/layout/components/header/header.component.spec.ts @@ -43,10 +43,6 @@ describe('HeaderLayoutComponent', () => { fixture.destroy(); }); - it('should create instance of HeaderLayoutComponent', () => { - expect(fixture.componentInstance instanceof HeaderLayoutComponent).toBe(true, 'should create HeaderLayoutComponent'); - }); - it('title element should been displayed', () => { const titleElement = fixture.debugElement.query(By.css('.adf-app-title')); expect(titleElement === null).toBeFalsy(); diff --git a/lib/core/services/login-dialog.service.spec.ts b/lib/core/services/login-dialog.service.spec.ts index 9ef014bb51..611814f704 100644 --- a/lib/core/services/login-dialog.service.spec.ts +++ b/lib/core/services/login-dialog.service.spec.ts @@ -44,11 +44,6 @@ describe('LoginDialogService', () => { }); }); - it('should be able to create the service', () => { - expect(service).not.toBeNull(); - expect(service).toBeDefined(); - }); - it('should be able to open the dialog when node has permission', () => { service.openLogin('fake-title', 'fake-action'); expect(spyOnDialogOpen).toHaveBeenCalled(); diff --git a/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.spec.ts index 1ad1fb6ac3..cd7de85b66 100644 --- a/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; import { setupTestBed } from '@alfresco/adf-core'; import { fakeApplicationInstance } from '../mock/app-model.mock'; @@ -39,10 +39,6 @@ describe('AppDetailsCloudComponent', () => { component.applicationInstance = fakeApplicationInstance[0]; }); - it('should create AppDetailsCloudComponent ', async(() => { - expect(component instanceof AppDetailsCloudComponent).toBe(true); - })); - it('should display application name', () => { fixture.detectChanges(); const appName = fixture.nativeElement.querySelector('.adf-app-listgrid-item-card-title'); diff --git a/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts index 80c067b90e..e93ea5ff57 100644 --- a/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts @@ -58,10 +58,6 @@ describe('AppListCloudComponent', () => { getAppsSpy = spyOn(appsProcessCloudService, 'getDeployedApplicationsByStatus').and.returnValue(of(fakeApplicationInstance)); }); - it('should create AppListCloudComponent ', async(() => { - expect(component instanceof AppListCloudComponent).toBe(true); - })); - it('should define layoutType with the default value', () => { component.layoutType = ''; fixture.detectChanges(); diff --git a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts index c9f36d0551..d1abcb6085 100644 --- a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts @@ -872,10 +872,6 @@ describe('FormCloudWithCustomOutComesComponent', () => { fixture.destroy(); }); - it('should create instance of FormCloudWithCustomOutComesComponent', () => { - expect(component instanceof FormCloudWithCustomOutComesComponent).toBe(true, 'should create FormCloudWithCustomOutComesComponent'); - }); - it('should be able to inject custom outcomes and click on custom outcomes', () => { fixture.detectChanges(); const cancelSpy = spyOn(component, 'onButtonClick').and.callThrough(); diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.spec.ts index fc58345945..581c425f77 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.spec.ts @@ -87,10 +87,6 @@ describe('EditProcessFilterCloudComponent', () => { fixture.destroy(); }); - it('should create EditProcessFilterCloudComponent', () => { - expect(component instanceof EditProcessFilterCloudComponent).toBeTruthy(); - }); - it('should fetch process instance filter by id', async(() => { const processFilterIdChange = new SimpleChange(null, 'mock-process-filter-id', true); component.ngOnChanges({ 'id': processFilterIdChange }); diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filter-dialog-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filter-dialog-cloud.component.spec.ts index e3a52898fb..d0e5488998 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filter-dialog-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filter-dialog-cloud.component.spec.ts @@ -49,10 +49,6 @@ describe('ProcessFilterDialogCloudComponent', () => { fixture.detectChanges(); }); - it('should create ProcessFilterDialogCloudComponent', () => { - expect(component instanceof ProcessFilterDialogCloudComponent).toBeTruthy(); - }); - it('should get data from MAT_DIALOG_DATA as an input to the dialog', () => { fixture.detectChanges(); const mockData = component.data; diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.spec.ts index eb4c37c23a..0cf57fbcfa 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.spec.ts @@ -28,7 +28,6 @@ import { ProcessFiltersCloudModule } from '../process-filters-cloud.module'; import { FilterParamsModel } from '../../../task/task-filters/models/filter-cloud.model'; import { PROCESS_FILTERS_SERVICE_TOKEN } from '../../../services/cloud-token.service'; import { LocalPreferenceCloudService } from '../../../services/local-preference-cloud.service'; -import { UserPreferenceCloudService } from '../../../services/user-preference-cloud.service'; describe('ProcessFiltersCloudComponent', () => { @@ -91,14 +90,6 @@ describe('ProcessFiltersCloudComponent', () => { processFilterService = TestBed.get(ProcessFilterCloudService); }); - it('should create ProcessFiltersCloudComponent instance', () => { - expect(component instanceof ProcessFiltersCloudComponent).toBeDefined(); - }); - - it('should be able to use LocalPreferenceCloudService', () => { - expect(processFilterService.preferenceService instanceof LocalPreferenceCloudService).toBeTruthy(); - }); - it('should attach specific icon for each filter if hasIcon is true', async(() => { spyOn(processFilterService, 'getProcessFilters').and.returnValue(fakeGlobalFilterObservable); const change = new SimpleChange(undefined, 'my-app-1', true); @@ -362,32 +353,3 @@ describe('ProcessFiltersCloudComponent', () => { expect(component.getCurrentFilter()).toBe(filter); }); }); - -describe('Set UserPreferenceService', () => { - - let processFilterService: ProcessFilterCloudService; - let component: ProcessFiltersCloudComponent; - let fixture: ComponentFixture; - - setupTestBed({ - imports: [ProcessServiceCloudTestingModule, ProcessFiltersCloudModule], - providers: [ - ProcessFilterCloudService, - { provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService } - ] - }); - - beforeEach(() => { - fixture = TestBed.createComponent(ProcessFiltersCloudComponent); - component = fixture.componentInstance; - processFilterService = TestBed.get(ProcessFilterCloudService); - }); - - it('should create ProcessFiltersCloudComponent instance', () => { - expect(component instanceof ProcessFiltersCloudComponent).toBeDefined(); - }); - - it('should able to inject UserPreferenceCloudService when you override with user preferece service', () => { - expect(processFilterService.preferenceService instanceof UserPreferenceCloudService).toBeTruthy(); - }); -}); diff --git a/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts index 408f366424..8112d10123 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts @@ -26,15 +26,11 @@ import { fakeProcessCloudFilterWithDifferentEntries, fakeProcessFilter } from '../mock/process-filters.cloud.mock'; -import { PreferenceCloudServiceInterface } from '../../../services/preference-cloud.interface'; import { PROCESS_FILTERS_SERVICE_TOKEN } from '../../../services/cloud-token.service'; import { LocalPreferenceCloudService } from '../../../services/local-preference-cloud.service'; -import { UserPreferenceCloudService } from '../../../services/user-preference-cloud.service'; describe('ProcessFilterCloudService', () => { let service: ProcessFilterCloudService; - let preferenceCloudService: PreferenceCloudServiceInterface; - let identityUserService: IdentityUserService; let getPreferencesSpy: jasmine.Spy; let getPreferenceByKeySpy: jasmine.Spy; let updatePreferenceSpy: jasmine.Spy; @@ -57,8 +53,10 @@ describe('ProcessFilterCloudService', () => { beforeEach(async(() => { service = TestBed.get(ProcessFilterCloudService); - preferenceCloudService = service.preferenceService; - identityUserService = TestBed.get(IdentityUserService); + + const preferenceCloudService = service.preferenceService; + const identityUserService = TestBed.get(IdentityUserService); + createPreferenceSpy = spyOn(preferenceCloudService, 'createPreference').and.returnValue(of(fakeProcessCloudFilters)); updatePreferenceSpy = spyOn(preferenceCloudService, 'updatePreference').and.returnValue(of(fakeProcessCloudFilters)); getPreferenceByKeySpy = spyOn(preferenceCloudService, 'getPreferenceByKey').and.returnValue(of(fakeProcessCloudFilters)); @@ -66,14 +64,6 @@ describe('ProcessFilterCloudService', () => { getCurrentUserInfoSpy = spyOn(identityUserService, 'getCurrentUserInfo').and.returnValue(identityUserMock); })); - it('should create ProcessFilterCloudService instance', () => { - expect(service).toBeDefined(); - }); - - it('should be able to use LocalPreferenceCloudService', () => { - expect(preferenceCloudService instanceof LocalPreferenceCloudService).toBeTruthy(); - }); - it('should create processfilter key by using appName and the username', (done) => { service.getProcessFilters('mock-appName').subscribe((res: any) => { expect(res).toBeDefined(); @@ -220,38 +210,3 @@ describe('ProcessFilterCloudService', () => { expect(updatePreferenceSpy).toHaveBeenCalled(); }); }); - -describe('Inject [UserPreferenceCloudService] into the ProcessFilterCloudService', () => { - let service: ProcessFilterCloudService; - let preferenceCloudService: PreferenceCloudServiceInterface; - let identityUserService: IdentityUserService; - - const identityUserMock = { username: 'mock-username', firstName: 'fake-identity-first-name', lastName: 'fake-identity-last-name', email: 'fakeIdentity@email.com' }; - - setupTestBed({ - imports: [ - CoreModule.forRoot() - ], - providers: [ - ProcessFilterCloudService, - IdentityUserService, - UserPreferenceCloudService, - { provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService } - ] - }); - - beforeEach(async(() => { - service = TestBed.get(ProcessFilterCloudService); - preferenceCloudService = service.preferenceService; - identityUserService = TestBed.get(IdentityUserService); - spyOn(identityUserService, 'getCurrentUserInfo').and.returnValue(identityUserMock); - })); - - it('should create ProcessFilterCloudService instance', () => { - expect(service).toBeDefined(); - }); - - it('should be able to inject UserPreferenceCloudService when you override with user preferece service', () => { - expect(preferenceCloudService instanceof UserPreferenceCloudService).toBeTruthy(); - }); -}); diff --git a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.spec.ts index 57a53578d1..7c4875681c 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.spec.ts @@ -224,10 +224,6 @@ describe('ProcessListCloudComponent', () => { fixtureCustom.destroy(); }); - it('should create instance of CustomTaskListComponent', () => { - expect(componentCustom instanceof CustomTaskListComponent).toBe(true, 'should create CustomTaskListComponent'); - }); - it('should fetch custom schemaColumn from html', () => { fixture.detectChanges(); expect(componentCustom.processListCloud.columnList).toBeDefined(); diff --git a/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.spec.ts index 3576ae4d5b..5eded7c8b8 100755 --- a/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.spec.ts @@ -74,10 +74,6 @@ describe('StartProcessCloudComponent', () => { TestBed.resetTestingModule(); }); - it('should create instance of StartProcessInstanceComponent', () => { - expect(fixture.componentInstance instanceof StartProcessCloudComponent).toBe(true, 'should create StartProcessInstanceComponent'); - }); - describe('start a process without start form', () => { it('should be able to start a process with a valid process name and process definition', async(() => { diff --git a/lib/process-services-cloud/src/lib/services/user-preference-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/services/user-preference-cloud.service.spec.ts index 47b3df421d..d5551bface 100644 --- a/lib/process-services-cloud/src/lib/services/user-preference-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/services/user-preference-cloud.service.spec.ts @@ -62,10 +62,6 @@ describe('PreferenceService', () => { getInstanceSpy = spyOn(alfrescoApiMock, 'getInstance').and.returnValue(apiMock(mockPreferences)); })); - it('should create UserPreferenceCloudService instance', () => { - expect(service).toBeTruthy(); - }); - it('should return the preferences', (done) => { service.getPreferences('mock-app-name').subscribe((res: any) => { expect(res).toBeDefined(); diff --git a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts index 4fd7af41fe..f297a8db16 100644 --- a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts @@ -84,10 +84,6 @@ describe('StartTaskCloudComponent', () => { fixture.detectChanges(); })); - it('should create instance of StartTaskCloudComponent', () => { - expect(component instanceof StartTaskCloudComponent).toBe(true, 'should create StartTaskCloudComponent'); - }); - describe('create task', () => { it('should create new task when start button is clicked', async(() => { diff --git a/lib/process-services-cloud/src/lib/task/task-cloud.module.spec.ts b/lib/process-services-cloud/src/lib/task/task-cloud.module.spec.ts deleted file mode 100644 index d7258cc201..0000000000 --- a/lib/process-services-cloud/src/lib/task/task-cloud.module.spec.ts +++ /dev/null @@ -1,30 +0,0 @@ -/*! - * @license - * Copyright 2019 Alfresco Software, Ltd. - * - * 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 { TaskCloudModule } from './task-cloud.module'; - -describe('TaskCloudModule', () => { - let taskCloudModule: TaskCloudModule; - - beforeEach(() => { - taskCloudModule = new TaskCloudModule(); - }); - - it('should create an instance', () => { - expect(taskCloudModule).toBeTruthy(); - }); -}); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filter-dialog-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filter-dialog-cloud.component.spec.ts index 490a26de3b..97d701155e 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filter-dialog-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filter-dialog-cloud.component.spec.ts @@ -48,10 +48,6 @@ describe('TaskFilterDialogCloudComponent', () => { component = fixture.componentInstance; }); - it('should create TaskFilterDialogCloudComponent', () => { - expect(component instanceof TaskFilterDialogCloudComponent).toBeTruthy(); - }); - it('should get data from MAT_DIALOG_DATA as an input to the dialog', () => { fixture.detectChanges(); const mockData = component.data; diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts index 71c6c90e65..e045940df3 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts @@ -28,7 +28,6 @@ import { By } from '@angular/platform-browser'; import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module'; import { TaskFiltersCloudModule } from '../task-filters-cloud.module'; import { fakeGlobalFilter } from '../mock/task-filters-cloud.mock'; -import { UserPreferenceCloudService } from '../../../services/user-preference-cloud.service'; describe('TaskFiltersCloudComponent', () => { @@ -68,14 +67,6 @@ describe('TaskFiltersCloudComponent', () => { taskFilterService = TestBed.get(TaskFilterCloudService); }); - it('should create TaskFiltersCloudComponent instance', () => { - expect(component instanceof TaskFiltersCloudComponent).toBeDefined(); - }); - - it('should be able to use LocalPreferenceCloudService', () => { - expect(taskFilterService.preferenceService instanceof LocalPreferenceCloudService).toBeTruthy(); - }); - it('should attach specific icon for each filter if hasIcon is true', async(() => { spyOn(taskFilterService, 'getTaskListFilters').and.returnValue(fakeGlobalFilterObservable); const change = new SimpleChange(undefined, 'my-app-1', true); @@ -342,33 +333,3 @@ describe('TaskFiltersCloudComponent', () => { expect(component.getCurrentFilter()).toBe(fakeGlobalFilter[0]); }); }); - -describe('Set UserPreferenceService', () => { - - let component: TaskFiltersCloudComponent; - let taskFilterService: TaskFilterCloudService; - let fixture: ComponentFixture; - - setupTestBed({ - imports: [ProcessServiceCloudTestingModule, TaskFiltersCloudModule], - providers: [ - TaskFilterCloudService, - { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService } - ] - }); - - beforeEach(() => { - fixture = TestBed.createComponent(TaskFiltersCloudComponent); - component = fixture.componentInstance; - - taskFilterService = TestBed.get(TaskFilterCloudService); - }); - - it('should create TaskFiltersCloudComponent instance', () => { - expect(component instanceof TaskFiltersCloudComponent).toBeDefined(); - }); - - it('should be able to inject UserPreferenceCloudService when you override with user preferece service', () => { - expect(taskFilterService.preferenceService instanceof UserPreferenceCloudService).toBeTruthy(); - }); -}); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts index 7cba99e5c3..aa40294414 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts @@ -44,8 +44,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; describe('TaskFilterCloudService', () => { let service: TaskFilterCloudService; - let preferenceCloudService: PreferenceCloudServiceInterface; - let identityUserService: IdentityUserService; + let getPreferencesSpy: jasmine.Spy; let getPreferenceByKeySpy: jasmine.Spy; let createPreferenceSpy: jasmine.Spy; @@ -72,17 +71,15 @@ describe('TaskFilterCloudService', () => { beforeEach(() => { service = TestBed.get(TaskFilterCloudService); - preferenceCloudService = service.preferenceService; - identityUserService = TestBed.get(IdentityUserService); + + const preferenceCloudService = service.preferenceService; createPreferenceSpy = spyOn(preferenceCloudService, 'createPreference').and.returnValue(of(fakeTaskCloudFilters)); updatePreferenceSpy = spyOn(preferenceCloudService, 'updatePreference').and.returnValue(of(fakeTaskCloudFilters)); getPreferencesSpy = spyOn(preferenceCloudService, 'getPreferences').and.returnValue(of(fakeTaskCloudPreferenceList)); getPreferenceByKeySpy = spyOn(preferenceCloudService, 'getPreferenceByKey').and.returnValue(of(fakeTaskCloudFilters)); - getCurrentUserInfoSpy = spyOn(identityUserService, 'getCurrentUserInfo').and.returnValue(identityUserMock); - }); - it('should be able to use UserPreferenceCloudService', () => { - expect(preferenceCloudService instanceof UserPreferenceCloudService).toBeTruthy(); + const identityUserService = TestBed.get(IdentityUserService); + getCurrentUserInfoSpy = spyOn(identityUserService, 'getCurrentUserInfo').and.returnValue(identityUserMock); }); it('should create task filter key by using appName and the username', (done) => { @@ -261,10 +258,6 @@ describe('Inject [LocalPreferenceCloudService] into the TaskFilterCloudService', spyOn(identityUserService, 'getCurrentUserInfo').and.returnValue(identityUserMock); }); - it('should be able to inject LocalPreferenceCloudService when you override with user preference service', () => { - expect(preferenceCloudService instanceof LocalPreferenceCloudService).toBeTruthy(); - }); - it('should create default task filters if there are no task filter preferences', (done) => { const appName = 'fakeAppName'; service.getTaskListFilters(appName).subscribe((res) => { diff --git a/lib/process-services-cloud/src/lib/task/task-filters/task-filters-cloud.module.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/task-filters-cloud.module.spec.ts deleted file mode 100644 index ae32d6e085..0000000000 --- a/lib/process-services-cloud/src/lib/task/task-filters/task-filters-cloud.module.spec.ts +++ /dev/null @@ -1,30 +0,0 @@ -/*! - * @license - * Copyright 2019 Alfresco Software, Ltd. - * - * 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 { TaskFiltersCloudModule } from './task-filters-cloud.module'; - -describe('TaskFiltersCloudModule', () => { - let taskFiltersCloudModule: TaskFiltersCloudModule; - - beforeEach(() => { - taskFiltersCloudModule = new TaskFiltersCloudModule(); - }); - - it('should create an instance', () => { - expect(taskFiltersCloudModule).toBeTruthy(); - }); -}); diff --git a/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.spec.ts index f9e91fab0d..1db0a5c2b7 100644 --- a/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-form/components/task-form-cloud.component.spec.ts @@ -72,10 +72,6 @@ describe('TaskFormCloudComponent', () => { component = fixture.componentInstance; }); - it('should create TaskFormCloudComponent ', () => { - expect(component instanceof TaskFormCloudComponent).toBe(true); - }); - describe('Complete button', () => { it('should show complete button when status is ASSIGNED', async(() => { @@ -467,10 +463,6 @@ describe('TaskFormWithCustomOutComesComponent', () => { fixture.destroy(); }); - it('should create instance of TaskFormWithCustomOutComesComponent', () => { - expect(component instanceof TaskFormWithCustomOutComesComponent).toBe(true, 'should create TaskFormWithCustomOutComesComponent'); - }); - it('should be able to display and click on cancel button', () => { fixture.detectChanges(); const cancelSpy = spyOn(component, 'onCancel').and.callThrough(); diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts index 002221d579..7b6c2496d6 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts @@ -272,10 +272,6 @@ describe('TaskListCloudComponent', () => { copyFixture.destroy(); }); - it('should create instance of CustomTaskListComponent', () => { - expect(componentCustom instanceof CustomTaskListComponent).toBe(true, 'should create CustomTaskListComponent'); - }); - it('should fetch custom schemaColumn from html', () => { fixture.detectChanges(); expect(componentCustom.taskList.columnList).toBeDefined(); diff --git a/lib/process-services/src/lib/content-widget/attach-file-widget-dialog.service.spec.ts b/lib/process-services/src/lib/content-widget/attach-file-widget-dialog.service.spec.ts index a882fcdeb2..eb5036f36b 100644 --- a/lib/process-services/src/lib/content-widget/attach-file-widget-dialog.service.spec.ts +++ b/lib/process-services/src/lib/content-widget/attach-file-widget-dialog.service.spec.ts @@ -47,11 +47,6 @@ describe('AttachFileWidgetDialogService', () => { }); }); - it('should be able to create the service', () => { - expect(service).not.toBeNull(); - expect(service).toBeDefined(); - }); - it('should be able to open the dialog when node has permission', () => { service.openLogin('fake-title', 'fake-action'); expect(spyOnDialogOpen).toHaveBeenCalled(); diff --git a/lib/process-services/src/lib/form/form.component.visibility.spec.ts b/lib/process-services/src/lib/form/form.component.visibility.spec.ts index 4cd4428de2..08be877fa6 100644 --- a/lib/process-services/src/lib/form/form.component.visibility.spec.ts +++ b/lib/process-services/src/lib/form/form.component.visibility.spec.ts @@ -68,10 +68,6 @@ describe('FormComponent UI and visibility', () => { TestBed.resetTestingModule(); }); - it('should create instance of FormComponent', () => { - expect(fixture.componentInstance instanceof FormComponent).toBe(true, 'should create FormComponent'); - }); - describe('Validation icon', () => { it('should display valid icon for valid form', () => { diff --git a/lib/process-services/src/lib/process-list/components/process-list.component.spec.ts b/lib/process-services/src/lib/process-list/components/process-list.component.spec.ts index 39de5b5049..16bac42410 100644 --- a/lib/process-services/src/lib/process-list/components/process-list.component.spec.ts +++ b/lib/process-services/src/lib/process-list/components/process-list.component.spec.ts @@ -476,10 +476,6 @@ describe('CustomProcessListComponent', () => { component = fixture.componentInstance; }); - it('should create instance of CustomProcessListComponent', () => { - expect(component instanceof CustomProcessListComponent).toBe(true, 'should create CustomProcessListComponent'); - }); - it('should fetch custom schemaColumn from html', () => { fixture.detectChanges(); expect(component.processList.columns).toBeDefined(); diff --git a/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts b/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts index e1ab523c22..eca5c360b5 100644 --- a/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts +++ b/lib/process-services/src/lib/process-list/components/start-process.component.spec.ts @@ -70,10 +70,6 @@ describe('StartFormComponent', () => { TestBed.resetTestingModule(); }); - it('should create instance of StartProcessInstanceComponent', () => { - expect(fixture.componentInstance instanceof StartProcessInstanceComponent).toBe(true, 'should create StartProcessInstanceComponent'); - }); - describe('first step', () => { describe('without start form', () => { diff --git a/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts b/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts index 8642f71361..a7c915514b 100644 --- a/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts +++ b/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts @@ -752,10 +752,6 @@ describe('CustomTaskListComponent', () => { fixture.destroy(); }); - it('should create instance of CustomTaskListComponent', () => { - expect(component instanceof CustomTaskListComponent).toBe(true, 'should create CustomTaskListComponent'); - }); - it('should fetch custom schemaColumn from html', () => { fixture.detectChanges(); expect(component.taskList.columnList).toBeDefined();