aboutsummaryrefslogtreecommitdiffstats
path: root/i18n/e2e/i18n-e2e.js
blob: d47030b48c6994f4e0363c1fbc3d1f4d7abbd5e5 (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
describe("localized filters", function() {
  describe("es locale", function() {
    beforeEach(function() {
      browser().navigateTo("localeTest_es.html");
    });

    it('should check filters for es locale', function() {
      expect(binding('input | date:"medium"')).toBe('03/06/1977 18:07:23');
      expect(binding('input | date:"longDate"')).toBe("3 de junio de 1977");
      expect(binding('input | number')).toBe('234.234.443.432');
      expect(binding('input | currency')).toBe('€ 234.234.443.432,00');
    });
  });

  describe("cs locale", function() {
    beforeEach(function() {
      browser().navigateTo("localeTest_cs.html");
    });

    it('should check filters for cs locale', function() {
      expect(binding('input | date:"medium"')).toBe('3.6.1977 18:07:23');
      expect(binding('input | date:"longDate"')).toBe("3. června 1977");
      expect(binding('input | number')).toBe('234 234 443 432');
      expect(binding('input | currency')).toBe('234 234 443 432,00 K\u010d');
    });
  });

  describe("de locale", function() {
    beforeEach(function() {
      browser().navigateTo("localeTest_de.html");
    });

    it('should check filters for de locale', function() {
      expect(binding('input | date:"medium"')).toBe('03.06.1977 18:07:23');
      expect(binding('input | date:"longDate"')).toBe("3. Juni 1977");
      expect(binding('input | number')).toBe('234.234.443.432');
      expect(binding('input | currency')).toBe('234.234.443.432,00 €');
    });
  });

  describe("en locale", function() {
    beforeEach(function() {
      browser().navigateTo("localeTest_en.html");
    });

    it('should check filters for en locale', function() {
      expect(binding('input | date:"medium"')).toBe('Jun 3, 1977 6:07:23 PM');
      expect(binding('input | date:"longDate"')).toBe("June 3, 1977");
      expect(binding('input | number')).toBe('234,234,443,432');
      expect(binding('input | currency')).toBe('$234,234,443,432.00');
    });
  });

  describe("sk locale", function() {
    beforeEach(function() {
      browser().navigateTo("localeTest_sk.html");
    });

    it('should check filters for sk locale', function() {
      expect(binding('input | date:"medium"')).toBe('3.6.1977 18:07:23');
      expect(binding('input | date:"longDate"')).toBe("3. júna 1977");
      expect(binding('input | number')).toBe('234 234 443 432');
      expect(binding('input | currency')).toBe('234 234 443 432,00 Sk');
    });
  });

  describe("zh locale", function() {
    beforeEach(function() {
      browser().navigateTo("localeTest_zh.html");
    });

    it('should check filters for zh locale', function() {
      expect(binding('input | date:"medium"')).toBe('1977-6-3 下午6:07:23');
      expect(binding('input | date:"longDate"')).toBe("1977年6月3日");
      expect(binding('input | number')).toBe('234,234,443,432');
      expect(binding('input | currency')).toBe('¥234,234,443,432.00');
    });
  });
});