File tree Expand file tree Collapse file tree 3 files changed +6
-15
lines changed
Expand file tree Collapse file tree 3 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ describe('core-ui App', function() {
77 page = new CoreUIPage ( ) ;
88 } ) ;
99
10- it ( 'should display message saying app works ' , ( ) => {
10+ it ( 'should display footer containing creativeLabs ' , ( ) => {
1111 page . navigateTo ( ) ;
12- expect ( page . getParagraphText ( ) ) . toEqual ( 'app works! ') ;
12+ expect ( page . getParagraphText ( ) ) . toContain ( 'creativeLabs ') ;
1313 } ) ;
1414} ) ;
Original file line number Diff line number Diff line change 1- import { browser , element , by } from 'protractor/globals ' ;
1+ import { browser , element , by } from 'protractor' ;
22
33export class CoreUIPage {
44 navigateTo ( ) {
55 return browser . get ( '/' ) ;
66 }
77
88 getParagraphText ( ) {
9- return element ( by . css ( 'app-root h1 ') ) . getText ( ) ;
9+ return element ( by . tagName ( 'footer ') ) . getText ( ) ;
1010 }
1111}
Original file line number Diff line number Diff line change 1+ import { RouterTestingModule } from '@angular/router/testing'
12import { TestBed , async } from '@angular/core/testing' ;
23import { AppComponent } from './app.component' ;
34describe ( 'AppComponent' , ( ) => {
@@ -6,22 +7,12 @@ describe('AppComponent', () => {
67 declarations : [
78 AppComponent
89 ] ,
10+ imports : [ RouterTestingModule ]
911 } ) . compileComponents ( ) ;
1012 } ) ) ;
1113 it ( 'should create the app' , async ( ( ) => {
1214 const fixture = TestBed . createComponent ( AppComponent ) ;
1315 const app = fixture . debugElement . componentInstance ;
1416 expect ( app ) . toBeTruthy ( ) ;
1517 } ) ) ;
16- it ( `should have as title 'app'` , async ( ( ) => {
17- const fixture = TestBed . createComponent ( AppComponent ) ;
18- const app = fixture . debugElement . componentInstance ;
19- expect ( app . title ) . toEqual ( 'app' ) ;
20- } ) ) ;
21- it ( 'should render title in a h1 tag' , async ( ( ) => {
22- const fixture = TestBed . createComponent ( AppComponent ) ;
23- fixture . detectChanges ( ) ;
24- const compiled = fixture . debugElement . nativeElement ;
25- expect ( compiled . querySelector ( 'h1' ) . textContent ) . toContain ( 'Welcome to app!' ) ;
26- } ) ) ;
2718} ) ;
You can’t perform that action at this time.
0 commit comments