Skip to content

Commit

Permalink
fix(generate): use prefix when initializing app (#2046) (#2367)
Browse files Browse the repository at this point in the history
E2E test would fail when using a prefix to generate the app
  • Loading branch information
Gelio authored and hansl committed Sep 28, 2016
1 parent f6a39b2 commit 06976f4
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(() => {

This comment has been minimized.

Copy link
@intellix

intellix Sep 30, 2016

Contributor

shouldn't this be changed as well to: should have as title '<%= prefix %> works!'?

This comment has been minimized.

Copy link
@filipesilva

filipesilva Oct 8, 2016

Contributor

Addresses in #2595, good catch!

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 06976f4

Please sign in to comment.