diff --git a/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.html b/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.html index b814ee91b5..775d4c13b1 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.html +++ b/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.html @@ -51,13 +51,12 @@
- - +
clear
- +
- + -
Activities
+
{{title}}
diff --git a/ng2-components/ng2-alfresco-core/src/components/info-drawer/info-drawer.component.spec.ts b/ng2-components/ng2-alfresco-core/src/components/info-drawer/info-drawer.component.spec.ts index 9d7f676180..60230f1d1b 100644 --- a/ng2-components/ng2-alfresco-core/src/components/info-drawer/info-drawer.component.spec.ts +++ b/ng2-components/ng2-alfresco-core/src/components/info-drawer/info-drawer.component.spec.ts @@ -15,8 +15,9 @@ * limitations under the License. */ -import { DebugElement } from '@angular/core'; +import { Component, DebugElement } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { By } from '@angular/platform-browser'; import { MaterialModule } from '../../material.module'; import { InfoDrawerLayoutComponent } from './info-drawer-layout.component'; import { InfoDrawerComponent } from './info-drawer.component'; @@ -70,4 +71,53 @@ describe('InfoDrawerComponent', () => { expect(tabEmitSpy).toHaveBeenCalled(); expect(tabEmitSpy).toHaveBeenCalledWith('DETAILS'); }); + + it('should render the title', () => { + component.title = 'FakeTitle'; + fixture.detectChanges(); + let title: any = fixture.debugElement.queryAll(By.css('[info-drawer-title]')); + expect(title.length).toBe(1); + expect(title[0].nativeElement.innerText).toBe('FakeTitle'); + }); +}); + +@Component({ + template: ` + +
Fake Title Custom
+
+ ` +}) +class CustomInfoDrawerComponent { +} + +describe('Custom InfoDrawer', () => { + let fixture: ComponentFixture; + let component: CustomInfoDrawerComponent; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ + InfoDrawerComponent, + InfoDrawerLayoutComponent, + CustomInfoDrawerComponent + ], + imports: [ + MaterialModule + ] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CustomInfoDrawerComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should render the title', () => { + fixture.detectChanges(); + let title: any = fixture.debugElement.queryAll(By.css('[info-drawer-title]')); + expect(title.length).toBe(1); + expect(title[0].nativeElement.innerText).toBe('Fake Title Custom'); + }); });