Skip to content

Commit

Permalink
fix(query): support elementref
Browse files Browse the repository at this point in the history
  • Loading branch information
NetanelBasal committed Apr 13, 2018
1 parent 506f635 commit 3ab3647
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/src/internals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { patchElementFocus } from './element-focus';
import { Observable } from 'rxjs/Observable';
import { SpectatorError } from './errors';

export type SpectatorElement = string | Element | DebugElement;
export type SpectatorElement = string | Element | DebugElement | ElementRef;

const KEY_UP = 'keyup';

Expand Down Expand Up @@ -141,7 +141,7 @@ export class Spectator<C> {
throw new Error(`${selector} does not exists`);
}
} else {
if (selector instanceof DebugElement) {
if (selector instanceof DebugElement || selector instanceof ElementRef) {
element = selector.nativeElement;
} else {
element = selector;
Expand Down

0 comments on commit 3ab3647

Please sign in to comment.