feat(aio): copy example code from angular.io
This commit is contained in:

committed by
Igor Minar

parent
3e34ba01bd
commit
1f3198cb50
14
aio/content/examples/cli-quickstart/ts/e2e/app.e2e-spec.ts
Normal file
14
aio/content/examples/cli-quickstart/ts/e2e/app.e2e-spec.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { MyAppPage } from './app.po';
|
||||
|
||||
describe('my-app App', function() {
|
||||
let page: MyAppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new MyAppPage();
|
||||
});
|
||||
|
||||
it('should display message saying app works', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getParagraphText()).toEqual('app works!');
|
||||
});
|
||||
});
|
11
aio/content/examples/cli-quickstart/ts/e2e/app.po.ts
Normal file
11
aio/content/examples/cli-quickstart/ts/e2e/app.po.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { browser, element, by } from 'protractor';
|
||||
|
||||
export class MyAppPage {
|
||||
navigateTo() {
|
||||
return browser.get('/');
|
||||
}
|
||||
|
||||
getParagraphText() {
|
||||
return element(by.css('app-root h1')).getText();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user