chore: fix CI issues (#7432)

This commit is contained in:
Andrew Seguin
2017-09-29 16:59:19 -07:00
committed by GitHub
parent b121e32cc7
commit 3c6f7a276e
8 changed files with 15 additions and 18 deletions
@@ -976,8 +976,6 @@ describe('MatAutocomplete', () => {
}));
it('should close the panel when tabbing away from a trigger without results', async(() => {
const trigger = fixture.componentInstance.trigger;
fixture.componentInstance.states = [];
fixture.componentInstance.filteredStates = [];
fixture.detectChanges();
+5 -5
View File
@@ -229,21 +229,21 @@ describe('MatSelectionList', () => {
});
describe('with list option selected', () => {
let fixture: ComponentFixture<SelectionListWithSelecedOption>;
let fixture: ComponentFixture<SelectionListWithSelectedOption>;
let listItemEl: DebugElement;
let selectionList: DebugElement;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [MatListModule],
declarations: [SelectionListWithSelecedOption],
declarations: [SelectionListWithSelectedOption],
});
TestBed.compileComponents();
}));
beforeEach(async(() => {
fixture = TestBed.createComponent(SelectionListWithSelecedOption);
fixture = TestBed.createComponent(SelectionListWithSelectedOption);
listItemEl = fixture.debugElement.query(By.directive(MatListOption));
selectionList = fixture.debugElement.query(By.directive(MatSelectionList));
fixture.detectChanges();
@@ -496,9 +496,9 @@ class SelectionListWithDisabledOption {
@Component({template: `
<mat-selection-list>
<md-list-option [selected]="true">Item</md-list-option>
<mat-list-option [selected]="true">Item</mat-list-option>
</mat-selection-list>`})
class SelectionListWithSelecedOption {
class SelectionListWithSelectedOption {
}
@Component({template: `
-1
View File
@@ -32,7 +32,6 @@ import {
import {Observable} from 'rxjs/Observable';
import {merge} from 'rxjs/observable/merge';
import {Subscription} from 'rxjs/Subscription';
import {Subject} from 'rxjs/Subject';
import {fadeInItems, transformMenu} from './menu-animations';
import {throwMatMenuInvalidPositionX, throwMatMenuInvalidPositionY} from './menu-errors';
import {MatMenuItem} from './menu-item';
+3 -3
View File
@@ -879,10 +879,10 @@ describe('MatSelect', () => {
fixture.debugElement.query(By.css('.mat-select-trigger')).nativeElement.click();
fixture.detectChanges();
(overlayContainerElement.querySelector('md-option') as HTMLElement).click();
(overlayContainerElement.querySelector('mat-option') as HTMLElement).click();
fixture.detectChanges();
const select = fixture.debugElement.nativeElement.querySelector('md-select');
const select = fixture.debugElement.nativeElement.querySelector('mat-select');
expect(document.activeElement).toBe(select, 'Expected trigger to be focused.');
});
@@ -2347,7 +2347,7 @@ describe('MatSelect', () => {
});
it('should only emit one event when pressing the arrow keys on a closed select', () => {
const select = fixture.debugElement.query(By.css('md-select')).nativeElement;
const select = fixture.debugElement.query(By.css('mat-select')).nativeElement;
dispatchKeyboardEvent(select, 'keydown', DOWN_ARROW);
expect(fixture.componentInstance.changeListener).toHaveBeenCalledTimes(1);
-1
View File
@@ -37,7 +37,6 @@ import {first} from 'rxjs/operator/first';
import {startWith} from 'rxjs/operator/startWith';
import {takeUntil} from 'rxjs/operator/takeUntil';
import {Subject} from 'rxjs/Subject';
import {Subscription} from 'rxjs/Subscription';
/** Throws an exception when two MatDrawer are matching the same position. */
+1 -1
View File
@@ -894,7 +894,7 @@ class SlideToggleWithoutLabel {
}
@Component({
template: `<md-slide-toggle [(ngModel)]="checked" (change)="onChange()"></md-slide-toggle>`
template: `<mat-slide-toggle [(ngModel)]="checked" (change)="onChange()"></mat-slide-toggle>`
})
class SlideToggleWithModelAndChangeEvent {
checked: boolean;
-1
View File
@@ -9,7 +9,6 @@
import {FocusMonitor} from '@angular/cdk/a11y';
import {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion';
import {Component, Input, ViewEncapsulation, ElementRef, OnDestroy, Renderer2} from '@angular/core';
import {MATERIAL_COMPATIBILITY_MODE} from '@angular/material/core';
import {MatStepLabel} from './step-label';
+6 -4
View File
@@ -171,19 +171,21 @@ describe('MatTooltip', () => {
expect(tooltipDirective._isTooltipVisible()).toBe(false);
}));
it('should not show if hide is called before delay finishes', fakeAsync(() => {
it('should not show if hide is called before delay finishes', async(() => {
expect(tooltipDirective._tooltipInstance).toBeUndefined();
const tooltipDelay = 1000;
tooltipDirective.show(tooltipDelay);
expect(tooltipDirective._isTooltipVisible()).toBe(false);
fixture.detectChanges();
expect(overlayContainerElement.textContent).toContain('');
tooltipDirective.hide();
tick(tooltipDelay);
expect(tooltipDirective._isTooltipVisible()).toBe(false);
fixture.whenStable().then(() => {
expect(tooltipDirective._isTooltipVisible()).toBe(false);
});
}));
it('should not show tooltip if message is not present or empty', () => {