test: update cli-hello-world-ivy to cli@7.2.0-rc.0 (#27797)
Updates the app itself to reflect the result of using the `experimentalIvy` flag on the CLI. The result is similar to: npx @angular/cli@next new cli-hello-world-ivy --experimental-ivy --defaults But replaces the current (cli `7.2.0-rc.0`) `renderComponent` bootstrap with the usual `platformBrowserDynamic` one. It also keeps what the app did (display a pipe, tests it). PR Close #27797
This commit is contained in:
19
integration/cli-hello-world-ivy/e2e/src/app.e2e-spec.ts
Normal file
19
integration/cli-hello-world-ivy/e2e/src/app.e2e-spec.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { AppPage } from './app.po';
|
||||
|
||||
describe('cli-hello-world App', () => {
|
||||
let page: AppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new AppPage();
|
||||
});
|
||||
|
||||
it('should display welcome message', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getParagraphText()).toEqual('Welcome to cli-hello-world-ivy!');
|
||||
});
|
||||
|
||||
it('the percent pipe should work', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getPipeContent()).toEqual('100 % awesome');
|
||||
})
|
||||
});
|
15
integration/cli-hello-world-ivy/e2e/src/app.po.ts
Normal file
15
integration/cli-hello-world-ivy/e2e/src/app.po.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo() {
|
||||
return browser.get('/');
|
||||
}
|
||||
|
||||
getParagraphText() {
|
||||
return element(by.css('app-root h1')).getText();
|
||||
}
|
||||
|
||||
getPipeContent() {
|
||||
return element(by.css('app-root p')).getText();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user