62355: replaced all method calls in templates (except for metadata values...)

This commit is contained in:
lotte
2019-06-14 16:15:45 +02:00
parent e179596ac2
commit 37fd04593b
35 changed files with 166 additions and 130 deletions

View File

@@ -1,10 +1,8 @@
import { ObjectCollectionComponent } from './object-collection.component';
import { SetViewMode } from '../view-mode';
import { element } from 'protractor';
import { By } from '@angular/platform-browser';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Config } from '../../../config/config.interface';
import { DebugElement, NO_ERRORS_SCHEMA } from '@angular/core';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { of as observableOf } from 'rxjs';
import { RouterStub } from '../testing/router-stub';
@@ -38,14 +36,14 @@ describe('ObjectCollectionComponent', () => {
}));
it('should only show the grid component when the viewmode is set to grid', () => {
objectCollectionComponent.currentMode = SetViewMode.Grid;
objectCollectionComponent.currentMode$ = observableOf(SetViewMode.Grid);
expect(fixture.debugElement.query(By.css('ds-object-grid'))).toBeDefined();
expect(fixture.debugElement.query(By.css('ds-object-list'))).toBeNull();
});
it('should only show the list component when the viewmode is set to list', () => {
objectCollectionComponent.currentMode = SetViewMode.List;
objectCollectionComponent.currentMode$ = observableOf(SetViewMode.List);
expect(fixture.debugElement.query(By.css('ds-object-list'))).toBeDefined();
expect(fixture.debugElement.query(By.css('ds-object-grid'))).toBeNull();