fix(schematics): update nx app schematics to generate a passing e2e test

This commit is contained in:
vsavkin 2017-09-06 09:51:15 -04:00
parent f2d9e6cff4
commit 03d16ef6ff
3 changed files with 4 additions and 4 deletions

View File

@ -9,6 +9,6 @@ describe('<%= utils.dasherize(name) %> App', () => {
it('should display welcome message', () => { it('should display welcome message', () => {
page.navigateTo(); page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to <%= prefix %>!'); expect(page.text()).toContain('app works!');
}); });
}); });

View File

@ -6,6 +6,6 @@ export class AppPage {
} }
getParagraphText() { getParagraphText() {
return element(by.css('<%= prefix %>-root h1')).getText(); return browser.findElement(by.css('body')).getText();
} }
} }

View File

@ -1,7 +1,7 @@
import { <%= className %> } from './<%=fileName%>'; import { <%= className %> } from './<%=fileName%>';
describe("<%= className %>", () => { describe('<%= className %>', () => {
it("should work", () => { it('should work', () => {
expect(new <%= className %>()).toBeDefined(); expect(new <%= className %>()).toBeDefined();
}); });
}); });