Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix CI issues #7432

Merged
merged 1 commit into from
Sep 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/lib/autocomplete/autocomplete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
10 changes: 5 additions & 5 deletions src/lib/list/selection-list.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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: `
Expand Down
1 change: 0 additions & 1 deletion src/lib/menu/menu-directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
6 changes: 3 additions & 3 deletions src/lib/select/select.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
});
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/lib/sidenav/drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/slide-toggle/slide-toggle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/lib/stepper/step-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';


Expand Down
10 changes: 6 additions & 4 deletions src/lib/tooltip/tooltip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down