Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit bb2fa6f

Browse files
committed
fix(i18n e2e tests):
1 parent ba59ef4 commit bb2fa6f

7 files changed

+84
-84
lines changed

i18n/e2e/i18n-e2e.js

+32-32
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe("localized filters", function() {
88
expect(binding('input | date:"medium"')).toBe('03/06/1977 18:07:23');
99
expect(binding('input | date:"longDate"')).toBe("3 de junio de 1977");
1010
expect(binding('input | number')).toBe('234.234.443.432');
11-
expect(binding('input | currency')).toBe('€ 234.234.443.432,00');
11+
expect(binding('input | currency')).toBe('€\u00a0234.234.443.432,00');
1212
});
1313
});
1414

@@ -20,8 +20,8 @@ describe("localized filters", function() {
2020
it('should check filters for cs locale', function() {
2121
expect(binding('input | date:"medium"')).toBe('3.6.1977 18:07:23');
2222
expect(binding('input | date:"longDate"')).toBe("3. června 1977");
23-
expect(binding('input | number')).toBe('234 234 443 432');
24-
expect(binding('input | currency')).toBe('234 234 443 432,00 K\u010d');
23+
expect(binding('input | number')).toBe('234\u00a0234\u00a0443\u00a0432');
24+
expect(binding('input | currency')).toBe('234\u00a0234\u00a0443\u00a0432,00\u00a0K\u010d');
2525
});
2626
});
2727

@@ -34,7 +34,7 @@ describe("localized filters", function() {
3434
expect(binding('input | date:"medium"')).toBe('03.06.1977 18:07:23');
3535
expect(binding('input | date:"longDate"')).toBe("3. Juni 1977");
3636
expect(binding('input | number')).toBe('234.234.443.432');
37-
expect(binding('input | currency')).toBe('234.234.443.432,00 €');
37+
expect(binding('input | currency')).toBe('234.234.443.432,00\u00a0€');
3838
});
3939
});
4040

@@ -53,42 +53,42 @@ describe("localized filters", function() {
5353

5454
describe('ng:pluralize for en locale', function() {
5555
it('should show pluralized strings', function() {
56-
expect(element('.ng-pluralize:first').html()).toBe('You have one email!');
56+
expect(element('ng-pluralize:first').html()).toBe('You have one email!');
5757

5858
input('plInput').enter('0');
59-
expect(element('.ng-pluralize:first').html()).toBe('You have no email!');
59+
expect(element('ng-pluralize:first').html()).toBe('You have no email!');
6060

6161
input('plInput').enter('3');
62-
expect(element('.ng-pluralize:first').html()).toBe('You have 3 emails!');
62+
expect(element('ng-pluralize:first').html()).toBe('You have 3 emails!');
6363
});
6464

6565
it('should show pluralized strings with offsets', function() {
66-
expect(element('.ng-pluralize:last').html()).toBe('Shanjian is viewing!');
66+
expect(element('ng-pluralize:last').html()).toBe('Shanjian is viewing!');
6767

6868
input('plInput2').enter('0');
69-
expect(element('.ng-pluralize:last').html()).toBe('Nobody is viewing!');
69+
expect(element('ng-pluralize:last').html()).toBe('Nobody is viewing!');
7070

7171
input('plInput2').enter('2');
72-
expect(element('.ng-pluralize:last').html()).toBe('Shanjian and Di are viewing!');
72+
expect(element('ng-pluralize:last').html()).toBe('Shanjian and Di are viewing!');
7373

7474
input('plInput2').enter('3');
75-
expect(element('.ng-pluralize:last').html()).
75+
expect(element('ng-pluralize:last').html()).
7676
toBe('Shanjian, Di and one other person are viewing!');
7777

7878
input('plInput2').enter('4');
79-
expect(element('.ng-pluralize:last').html()).
79+
expect(element('ng-pluralize:last').html()).
8080
toBe('Shanjian, Di and 2 other people are viewing!');
8181
});
8282

8383
it('should show pluralized strings with correct data-binding', function() {
8484
input('plInput2').enter('2');
85-
expect(element('.ng-pluralize:last').html()).toBe('Shanjian and Di are viewing!');
85+
expect(element('ng-pluralize:last').html()).toBe('Shanjian and Di are viewing!');
8686

8787
input('person1').enter('Igor');
88-
expect(element('.ng-pluralize:last').html()).toBe('Igor and Di are viewing!');
88+
expect(element('ng-pluralize:last').html()).toBe('Igor and Di are viewing!');
8989

9090
input('person2').enter('Vojta');
91-
expect(element('.ng-pluralize:last').html()).toBe('Igor and Vojta are viewing!');
91+
expect(element('ng-pluralize:last').html()).toBe('Igor and Vojta are viewing!');
9292
});
9393
})
9494
});
@@ -101,26 +101,26 @@ describe("localized filters", function() {
101101
it('should check filters for sk locale', function() {
102102
expect(binding('input | date:"medium"')).toBe('3.6.1977 18:07:23');
103103
expect(binding('input | date:"longDate"')).toBe("3. júna 1977");
104-
expect(binding('input | number')).toBe('234 234 443 432');
105-
expect(binding('input | currency')).toBe('234 234 443 432,00 Sk');
104+
expect(binding('input | number')).toBe('234\u00a0234\u00a0443\u00a0432');
105+
expect(binding('input | currency')).toBe('234\u00a0234\u00a0443\u00a0432,00\u00a0Sk');
106106
});
107107

108108

109109
describe('ng:pluralize for sk locale', function() {
110110
it('should show pluralized strings', function() {
111-
expect(element('.ng-pluralize').html()).toBe('Mas jeden email!');
111+
expect(element('ng-pluralize').html()).toBe('Mas jeden email!');
112112

113113
input('plInput').enter('0');
114-
expect(element('.ng-pluralize:first').html()).toBe('Mas 0 emailov!');
114+
expect(element('ng-pluralize:first').html()).toBe('Mas 0 emailov!');
115115

116116
input('plInput').enter('3');
117-
expect(element('.ng-pluralize:first').html()).toBe('Mas 3 emaily!');
117+
expect(element('ng-pluralize:first').html()).toBe('Mas 3 emaily!');
118118

119119
input('plInput').enter('4');
120-
expect(element('.ng-pluralize:first').html()).toBe('Mas 4 emaily!');
120+
expect(element('ng-pluralize:first').html()).toBe('Mas 4 emaily!');
121121

122122
input('plInput').enter('6');
123-
expect(element('.ng-pluralize:first').html()).toBe('Mas 6 emailov!');
123+
expect(element('ng-pluralize:first').html()).toBe('Mas 6 emailov!');
124124
});
125125

126126
it('should show pluralized strings with offsets', function() {
@@ -147,38 +147,38 @@ describe("localized filters", function() {
147147

148148
describe('ng:pluralize for zh locale', function() {
149149
it('should show pluralized strings', function() {
150-
expect(element('.ng-pluralize:first').html()).toBe('1人在浏览该文件!');
150+
expect(element('ng-pluralize:first').html()).toBe('1人在浏览该文件!');
151151

152152
input('plInput').enter('0');
153-
expect(element('.ng-pluralize:first').html()).toBe('0人在浏览该文件!');
153+
expect(element('ng-pluralize:first').html()).toBe('0人在浏览该文件!');
154154

155155
input('plInput').enter('3');
156-
expect(element('.ng-pluralize:first').html()).toBe('3人在浏览该文件!');
156+
expect(element('ng-pluralize:first').html()).toBe('3人在浏览该文件!');
157157
});
158158

159159
it('should show pluralized strings with offsets', function() {
160-
expect(element('.ng-pluralize:last').html()).toBe('Shanjian 在浏览该文件!');
160+
expect(element('ng-pluralize:last').html()).toBe('Shanjian 在浏览该文件!');
161161

162162
input('plInput2').enter('0');
163-
expect(element('.ng-pluralize:last').html()).toBe('没有人在浏览该文件!');
163+
expect(element('ng-pluralize:last').html()).toBe('没有人在浏览该文件!');
164164

165165
input('plInput2').enter('2');
166-
expect(element('.ng-pluralize:last').html()).toBe('Shanjian 和 Di 在浏览该文件!');
166+
expect(element('ng-pluralize:last').html()).toBe('Shanjian 和 Di 在浏览该文件!');
167167

168168
input('plInput2').enter('3');
169-
expect(element('.ng-pluralize:last').html()).
169+
expect(element('ng-pluralize:last').html()).
170170
toBe('Shanjian, Di 还有其他1 人在浏览该文件!');
171171
});
172172

173173
it('should show pluralized strings with correct data-binding', function() {
174174
input('plInput2').enter('2');
175-
expect(element('.ng-pluralize:last').html()).toBe('Shanjian 和 Di 在浏览该文件!');
175+
expect(element('ng-pluralize:last').html()).toBe('Shanjian 和 Di 在浏览该文件!');
176176

177177
input('person1').enter('彭迪');
178-
expect(element('.ng-pluralize:last').html()).toBe('彭迪 和 Di 在浏览该文件!');
178+
expect(element('ng-pluralize:last').html()).toBe('彭迪 和 Di 在浏览该文件!');
179179

180180
input('person2').enter('一哥');
181-
expect(element('.ng-pluralize:last').html()).toBe('彭迪 和 一哥 在浏览该文件!');
181+
expect(element('ng-pluralize:last').html()).toBe('彭迪 和 一哥 在浏览该文件!');
182182
});
183183
})
184184
});

i18n/e2e/localeTest_cs.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<script src="../../build/angular.js"></script>
77
<script src="../../build/i18n/angular-locale_cs.js"></script>
88
<script>
9-
function AppCntl(){
10-
this.input = 234234443432;
9+
function AppCntl($scope){
10+
$scope.input = 234234443432;
1111
}
1212
</script>
1313
</head>
14-
<body ng:controller="AppCntl">
15-
<input type="text" ng:model="input"><br>
14+
<body ng-controller="AppCntl">
15+
<input type="text" ng-model="input"><br>
1616
date: {{input | date:"medium"}}<br>
1717
date: {{input | date:"longDate"}}<br>
1818
number: {{input | number}}<br>

i18n/e2e/localeTest_de.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<script src="../../build/angular.js"></script>
77
<script src="../../build/i18n/angular-locale_de.js"></script>
88
<script>
9-
function AppCntl(){
10-
this.input = 234234443432;
9+
function AppCntl($scope){
10+
$scope.input = 234234443432;
1111
}
1212
</script>
1313
</head>
14-
<body ng:controller="AppCntl">
15-
<input type="text" ng:model="input"><br>
14+
<body ng-controller="AppCntl">
15+
<input type="text" ng-model="input"><br>
1616
date: {{input | date:"medium"}}<br>
1717
date: {{input | date:"longDate"}}<br>
1818
number: {{input | number}}<br>

i18n/e2e/localeTest_en.html

+16-16
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,41 @@
88
<script src="../../build/i18n/angular-locale_en.js"></script>
99
-->
1010
<script>
11-
function AppCntl(){
12-
this.input = 234234443432;
13-
this.plInput = 1;
14-
this.person1 = "Shanjian";
15-
this.person2 = "Di";
16-
this.plInput2 = 1;
11+
function AppCntl($scope){
12+
$scope.input = 234234443432;
13+
$scope.plInput = 1;
14+
$scope.person1 = "Shanjian";
15+
$scope.person2 = "Di";
16+
$scope.plInput2 = 1;
1717
}
1818
</script>
1919
</head>
20-
<body ng:controller="AppCntl">
20+
<body ng-controller="AppCntl">
2121
<h3>Datetime/Number/Currency filters demo:</h3>
22-
<input type="text" ng:model="input" value="234234443432"><br>
22+
<input type="text" ng-model="input" value="234234443432"><br>
2323
date(medium): {{input | date:"medium"}}<br>
2424
date(longDate): {{input | date:"longDate"}}<br>
2525
number: {{input | number}}<br>
2626
currency: {{input | currency }}
2727
<hr/>
2828
<h3>Pluralization demo:</h3>
29-
<input type="text" ng:model="plInput"><br>
30-
<ng:pluralize count="plInput"
29+
<input type="text" ng-model="plInput"><br>
30+
<ng-pluralize count="plInput"
3131
when= "{ '0': 'You have no email!',
3232
'one': 'You have one email!',
3333
'other': 'You have {} emails!'}">
34-
</ng:pluralize>
34+
</ng-pluralize>
3535
<hr/>
3636
<h3>Pluralization demo with offsets:</h3>
37-
Name of person1:<input type="text" ng:model="person1"/><br/>
38-
Name of person2:<input type="text" ng:model="person2"/><br/>
39-
<input type="text" ng:model="plInput2"><br>
40-
<ng:pluralize count="plInput2" offset=2
37+
Name of person1:<input type="text" ng-model="person1"/><br/>
38+
Name of person2:<input type="text" ng-model="person2"/><br/>
39+
<input type="text" ng-model="plInput2"><br>
40+
<ng-pluralize count="plInput2" offset=2
4141
when= "{'0':'Nobody is viewing!',
4242
'1': '{{person1}} is viewing!',
4343
'2': '{{person1}} and {{person2}} are viewing!',
4444
'3': '{{person1}}, {{person2}} and one other person are viewing!',
4545
'other': '{{person1}}, {{person2}} and {} other people are viewing!'}">
46-
</ng:pluralize>
46+
</ng-pluralize>
4747
</body>
4848
</html>

i18n/e2e/localeTest_es.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<script src="../../build/angular.js"></script>
77
<script src="../../build/i18n/angular-locale_es.js"></script>
88
<script>
9-
function AppCntl(){
10-
this.input = 234234443432;
9+
function AppCntl($scope){
10+
$scope.input = 234234443432;
1111
}
1212
</script>
1313
</head>
14-
<body ng:controller="AppCntl">
15-
<input type="text" ng:model="input" value="234234443432"><br>
14+
<body ng-controller="AppCntl">
15+
<input type="text" ng-model="input" value="234234443432"><br>
1616
date: {{input | date:"medium"}}<br>
1717
date: {{input | date:"longDate"}}<br>
1818
number: {{input | number}}<br>

i18n/e2e/localeTest_sk.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66
<script src="../../build/angular.js"></script>
77
<script src="../../build/i18n/angular-locale_sk-sk.js"></script>
88
<script>
9-
function AppCntl(){
10-
this.input = 234234443432;
11-
this.plInput = 1;
9+
function AppCntl($scope){
10+
$scope.input = 234234443432;
11+
$scope.plInput = 1;
1212
}
1313
</script>
1414
</head>
15-
<body ng:controller="AppCntl">
16-
<input type="text" ng:model="input" value="234234443432"><br>
15+
<body ng-controller="AppCntl">
16+
<input type="text" ng-model="input" value="234234443432"><br>
1717
date: {{input | date:"medium"}}<br>
1818
date: {{input | date:"longDate"}}<br>
1919
number: {{input | number}}<br>
2020
currency: {{input | currency }}
2121
<hr/>
22-
<input type="text" ng:model="plInput"><br>
23-
<ng:pluralize count="plInput"
22+
<input type="text" ng-model="plInput"><br>
23+
<ng-pluralize count="plInput"
2424
when= "{ 'one': 'Mas jeden email!',
2525
'few': 'Mas {} emaily!',
2626
'other': 'Mas {} emailov!'}">
27-
</ng:pluralize>
27+
</ng-pluralize>
2828
</body>
2929
</html>

i18n/e2e/localeTest_zh.html

+16-16
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,38 @@
66
<script src="../../build/angular.js"></script>
77
<script src="../../build/i18n/angular-locale_zh-cn.js"></script>
88
<script>
9-
function AppCntl(){
10-
this.input = 234234443432;
11-
this.plInput = 1;
12-
this.person1 = "Shanjian";
13-
this.person2 = "Di";
14-
this.plInput2 = 1;
9+
function AppCntl($scope){
10+
$scope.input = 234234443432;
11+
$scope.plInput = 1;
12+
$scope.person1 = "Shanjian";
13+
$scope.person2 = "Di";
14+
$scope.plInput2 = 1;
1515
}
1616
</script>
1717
</head>
18-
<body ng:controller="AppCntl">
18+
<body ng-controller="AppCntl">
1919
<h3>Datetime/Number/Currency filters demo:</h3>
20-
<input type="text" ng:model="input"><br>
20+
<input type="text" ng-model="input"><br>
2121
date(medium): {{input | date:"medium"}}<br>
2222
date(longDate): {{input | date:"longDate"}}<br>
2323
number: {{input | number}}<br>
2424
currency: {{input | currency }}
2525
<hr/>
2626
<h3>Pluralization demo:</h3>
27-
<input type="text" ng:model="plInput"><br>
28-
<ng:pluralize count="plInput"
27+
<input type="text" ng-model="plInput"><br>
28+
<ng-pluralize count="plInput"
2929
when= "{'other':'{}人在浏览该文件!'}">
30-
</ng:pluralize>
30+
</ng-pluralize>
3131
<hr/>
3232
<h3>Pluralization demo with offsets:</h3>
33-
Name of person1:<input type="text" ng:model="person1"/><br/>
34-
Name of person2:<input type="text" ng:model="person2"/><br/>
35-
<input type="text" ng:model="plInput2"><br>
36-
<ng:pluralize count="plInput2" offset=2
33+
Name of person1:<input type="text" ng-model="person1"/><br/>
34+
Name of person2:<input type="text" ng-model="person2"/><br/>
35+
<input type="text" ng-model="plInput2"><br>
36+
<ng-pluralize count="plInput2" offset=2
3737
when= "{'0':'没有人在浏览该文件!',
3838
'1': '{{person1}} 在浏览该文件!',
3939
'2': '{{person1}} 和 {{person2}} 在浏览该文件!',
4040
'other': '{{person1}}, {{person2}} 还有其他{} 人在浏览该文件!'}">
41-
</ng:pluralize>
41+
</ng-pluralize>
4242
</body>
4343
</html>

0 commit comments

Comments
 (0)