mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-1883] document list preset unit tests (#5519)
* document list preset unit tests * remove useless tests * remove useless tests * remove even more garbage * remove junk
This commit is contained in:
@@ -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();
|
||||
|
@@ -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();
|
||||
});
|
||||
});
|
@@ -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';
|
||||
|
@@ -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 = <MatDatepickerInputEvent<any>> {value: '14-03-2016' };
|
||||
|
@@ -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');
|
||||
|
@@ -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();
|
||||
|
@@ -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();
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user