Skip to content

Commit

Permalink
fix(generate): use prefix when initializing app (angular#2046) (angul…
Browse files Browse the repository at this point in the history
…ar#2367)

E2E test would fail when using a prefix to generate the app
  • Loading branch information
Gelio authored and Danny Blue committed Oct 3, 2016
1 parent c710033 commit 2d3ec07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ describe('App: <%= jsComponentName %>', () => {
it(`should have as title 'app works!'`, async(() => {
let fixture = TestBed.createComponent(AppComponent);
let app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('app works!');
expect(app.title).toEqual('<%= prefix %> works!');
}));

it('should render title in a h1 tag', async(() => {
let fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
let compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('app works!');
expect(compiled.querySelector('h1').textContent).toContain('<%= prefix %> works!');
}));
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ import { APP_SHELL_DIRECTIVES } from '@angular/app-shell';<% } %>
styleUrls: ['./app.component.<%= styleExt %>']<% } %>
})
export class AppComponent {
title = 'app works!';
title = '<%= prefix %> works!';
}

0 comments on commit 2d3ec07

Please sign in to comment.