-
Notifications
You must be signed in to change notification settings - Fork 24.8k
/
e2e-spec.ts
36 lines (26 loc) 路 1.13 KB
/
e2e-spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'use strict'; // necessary for es6 output in node
import { browser, element, by } from 'protractor';
describe('i18n E2E Tests', () => {
beforeEach(function () {
browser.get('');
});
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');
});
it('should display the translated title attribute', function () {
const title = element(by.css('img')).getAttribute('title');
expect(title).toBe('Logo de Angular');
});
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');
});
it('should display the nested expression', function() {
expect(element.all(by.css('span')).get(2).getText()).toBe('Aqu铆 tenemos: 3 mujeres');
});
});