Skip to content

Commit 8b0f4d4

Browse files
GelioJonathan Jayet
authored and
Jonathan Jayet
committed
fix(generate): use prefix when initializing app (angular#2046) (angular#2367)
E2E test would fail when using a prefix to generate the app
1 parent 5aa9cf0 commit 8b0f4d4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/angular-cli/blueprints/ng2/files/__path__/app/app.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ describe('App: <%= jsComponentName %>', () => {
2121
it(`should have as title 'app works!'`, async(() => {
2222
let fixture = TestBed.createComponent(AppComponent);
2323
let app = fixture.debugElement.componentInstance;
24-
expect(app.title).toEqual('app works!');
24+
expect(app.title).toEqual('<%= prefix %> works!');
2525
}));
2626

2727
it('should render title in a h1 tag', async(() => {
2828
let fixture = TestBed.createComponent(AppComponent);
2929
fixture.detectChanges();
3030
let compiled = fixture.debugElement.nativeElement;
31-
expect(compiled.querySelector('h1').textContent).toContain('app works!');
31+
expect(compiled.querySelector('h1').textContent).toContain('<%= prefix %> works!');
3232
}));
3333
});

packages/angular-cli/blueprints/ng2/files/__path__/app/app.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ import { APP_SHELL_DIRECTIVES } from '@angular/app-shell';<% } %>
1313
styleUrls: ['./app.component.<%= styleExt %>']<% } %>
1414
})
1515
export class AppComponent {
16-
title = 'app works!';
16+
title = '<%= prefix %> works!';
1717
}

0 commit comments

Comments
 (0)