message: add tests the tooltip behavior
diff: @@ -2,7 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
  import {MdlFabMenuComponent, MdlFabMenuModule} from './fab-menu';
  import { CommonModule } from '@angular/common';
  import {MdlPopoverModule, MdlPopoverComponent} from '../popover/popover';
  -import {MdlIconModule, MdlModule} from '@angular-mdl/core';
  +import {MdlIconModule, MdlModule, MdlChipComponent} from '@angular-mdl/core';
  import {Component, DebugElement, ComponentRef} from '@angular/core'
  import {MdlFabMenuItemComponent} from './fab-menu-item'
  import {By} from '@angular/platform-browser'
  @@ -34,6 +34,9 @@ describe('MdlFabMenuComponent', () => {
  afterEach(()=>{fixture=null})
  + describe('FAB', () => {
  +
  +
  it('should instantiate the component', async(() => {
  expect(fixture).toBeDefined();
  }));
  @@ -142,10 +145,84 @@ describe('MdlFabMenuComponent', () => {
  });
  + xdescribe('item tooltips', () => {
  +
  +
  +
  + it('should not display tooltips after click on the FAB', async(() => {
  +
  + let buttonComponent = fixture.debugElement.query(By.css('.mdl-button'))
  +
  + let tooltipNotAlwaysElement: HTMLElement = fixture.debugElement.query(By.css('#itemNotAlwaysTooltip > mdl-chip')).nativeElement
  + //let el: HTMLElement = fixture.debugElement.query(By.directive(MdlChipComponent)).nativeElement;
  +
  + buttonComponent.nativeElement.click();
  +
  + fixture.detectChanges();
  + fixture.whenStable().then(() => {
  +
  + expect(tooltipNotAlwaysElement.hidden).toBe(true);
  +
  + });
  +
  +
  +
  + }));
  +
  + it('should display tooltips on rollover', async(() => {
  +
  + let buttonComponent = fixture.debugElement.query(By.css('.mdl-button'))
  +
  + let tooltipNotAlwaysDebugElement: DebugElement = fixture.debugElement.query(By.css('#itemNotAlwaysTooltip > mdl-chip'))
  +
  + let tooltipNotAlwaysElement: HTMLElement = tooltipNotAlwaysDebugElement.nativeElement
  +
  + buttonComponent.nativeElement.click();
  +
  +
  + fixture.detectChanges();
  + fixture.whenStable().then(() => {
  +
  + const event = new Event('mouseenter')
  + tooltipNotAlwaysElement.dispatchEvent(event)
  + expect(tooltipNotAlwaysElement.hidden).toBe(true);
  +
  + });
  +
  +
  +
  + }));
  +
  + it('should display tooltips after click on the FAB', async(() => {
  +
  + let buttonComponent = fixture.debugElement.query(By.css('.mdl-button'))
  +
  + let tooltipAlwaysElement: HTMLElement = fixture.debugElement.query(By.css('#itemAlwaysTooltip > mdl-chip')).nativeElement
  +
  + buttonComponent.nativeElement.click();
  +
  + fixture.detectChanges();
  + fixture.whenStable().then(() => {
  +
  + expect(tooltipAlwaysElement.hidden).toBe(false);
  +
  + });
  +
  +
  +
  + }));
  +
  + });
  +
  +
  +
  + });
  +
  +
  @Component({
  template: `
  <mdl-fab-menu #mainFabMenu>
  - <mdl-fab-menu-item
  + <mdl-fab-menu-item id="itemNotAlwaysTooltip"
  [fabMenu]="mainFabMenu"
  icon="note_add"
  label="make a note"
  @@ -159,7 +236,7 @@ describe('MdlFabMenuComponent', () => {
  </mdl-fab-menu-item>
  </mdl-fab-menu>
  <mdl-fab-menu #mainFabMenu2 [alwaysShowTooltips]="true">
  - <mdl-fab-menu-item
  + <mdl-fab-menu-item id="itemAlwaysTooltip"
  [fabMenu]="mainFabMenu2"
  icon="note_add"
  label="make a note"
  