angular-docs-cn/integration/cli-hello-world-ivy-i18n/e2e/de/app.e2e-spec.ts

30 lines
881 B
TypeScript

import {AppPage} from '../app.po';
import {browser, logging} from 'protractor';
describe('cli-hello-world-ivy App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
page.navigateTo();
});
it('should display title', () => {
expect(page.getHeading()).toEqual('Hallo cli-hello-world-ivy-i18n!');
});
it('should display the locale', () => { expect(page.getParagraph('locale')).toEqual('de'); });
it('the date pipe should show the localized month', () => {
page.navigateTo();
expect(page.getParagraph('date')).toEqual('Januar');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});