2016-12-02 20:25:31 -05:00
|
|
|
'use strict'; // necessary for es6 output in node
|
2016-10-06 18:25:52 -04:00
|
|
|
|
|
|
|
import { browser, element, by } from 'protractor';
|
|
|
|
|
2016-09-29 14:15:55 -04:00
|
|
|
describe('i18n E2E Tests', () => {
|
|
|
|
|
|
|
|
beforeEach(function () {
|
|
|
|
browser.get('');
|
|
|
|
});
|
|
|
|
|
2016-12-02 20:25:31 -05:00
|
|
|
it('should display i18n translated welcome: ¡Hola i18n!', function () {
|
|
|
|
expect(element(by.css('h1')).getText()).toEqual('¡Hola i18n!');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should display the node texts without elements', function () {
|
|
|
|
expect(element(by.css('my-app')).getText()).toContain('No genero ningún elemento');
|
|
|
|
expect(element(by.css('my-app')).getText()).toContain('Yo tampoco genero ningún elemento');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should display the translated title attribute', function () {
|
|
|
|
const title = element(by.css('img')).getAttribute('title');
|
2017-01-26 06:26:11 -05:00
|
|
|
expect(title).toBe('Logo de Angular');
|
2016-12-02 20:25:31 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should display the plural of: a horde of wolves', function () {
|
|
|
|
expect(element.all(by.css('span')).get(0).getText()).toBe('ningún lobo');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should display the select of gender', function () {
|
|
|
|
expect(element.all(by.css('span')).get(1).getText()).toBe('El heroe es mujer');
|
2016-09-29 14:15:55 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|