@@ -6,6 +6,7 @@ import { Component, DebugElement, Type, ViewChild, ViewEncapsulation } from '@an
66import { PlexOptionsComponent , IPlexOptionsItems } from './options.component' ;
77import { PlexModule } from '../module' ;
88import { FormsModule } from '@angular/forms' ;
9+ import { Plex } from '../core/service' ;
910
1011describe ( 'PlexOptionsComponent' , ( ) => {
1112 let fixture : ComponentFixture < PlexOptionsTestComponent > ;
@@ -22,7 +23,7 @@ describe('PlexOptionsComponent', () => {
2223
2324
2425 it ( 'have 3 buttons' , fakeAsync ( ( ) => {
25- const elements = getElementAll ( fixture , 'plex-options button' ) ;
26+ const elements = getElementAll ( fixture , 'plex-options plex- button' ) ;
2627 expect ( elements . length ) . toBe ( fixture . componentInstance . items . length ) ;
2728 } ) ) ;
2829
@@ -31,7 +32,7 @@ describe('PlexOptionsComponent', () => {
3132 } ) ) ;
3233
3334 it ( 'display label' , fakeAsync ( ( ) => {
34- const elements = getElementAll ( fixture , 'plex-options button' ) ;
35+ const elements = getElementAll ( fixture , 'plex-options plex- button' ) ;
3536
3637 elements . forEach ( ( elem , index ) => {
3738 const elementRef = elem . nativeElement ;
@@ -44,7 +45,7 @@ describe('PlexOptionsComponent', () => {
4445
4546 spyOn ( fixture . componentInstance , 'onChange' ) ;
4647
47- const elements = getElementAll ( fixture , 'plex-options button' ) ;
48+ const elements = getElementAll ( fixture , 'plex-options plex- button' ) ;
4849 const secondButton = elements [ 1 ] . nativeElement ;
4950 secondButton . dispatchEvent ( new Event ( 'click' ) ) ;
5051
@@ -66,7 +67,7 @@ describe('PlexOptionsComponent', () => {
6667
6768 tickAndDetectChanges ( fixture ) ;
6869
69- const elements = getElementAll ( fixture , 'plex-options button' ) ;
70+ const elements = getElementAll ( fixture , 'plex-options plex- button' ) ;
7071
7172 expect ( options . active ) . toBe ( 'd' ) ;
7273
@@ -134,7 +135,8 @@ function createTestingModule<T>(cmp: Type<T>, template: string): ComponentFixtur
134135
135136 TestBed . configureTestingModule ( {
136137 imports : [ BrowserModule , PlexModule , FormsModule ] ,
137- declarations : [ cmp ]
138+ declarations : [ cmp ] ,
139+ providers : [ Plex ]
138140 } )
139141 . overrideComponent ( cmp , {
140142 set : {
0 commit comments