Skip to content

Commit b537d09

Browse files
committed
Check normal images provide translations
1 parent 15030fa commit b537d09

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

1.0-composable/tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ def test_should_serve_static_files(self):
5656
response = requests.get("http://localhost/static/theme/wirecloud.defaulttheme/images/logos/header.png")
5757
self.assertEqual(response.status_code, 200)
5858

59+
def test_should_serve_translations(self):
60+
response = requests.get("http://localhost/api/i18n/js_catalogue?language=es")
61+
self.assertEqual(response.status_code, 200)
62+
# Look for basic translations
63+
self.assertIn('"Yes"', response.text)
64+
self.assertIn('"No"', response.text)
65+
self.assertIn('"Warning"', response.text)
66+
5967

6068
if __name__ == "__main__":
6169
unittest.main(verbosity=2)

1.1-composable/tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ def test_should_serve_static_files(self):
5656
response = requests.get("http://localhost/static/theme/wirecloud.defaulttheme/images/logos/header.png")
5757
self.assertEqual(response.status_code, 200)
5858

59+
def test_should_serve_translations(self):
60+
response = requests.get("http://localhost/api/i18n/js_catalogue?language=es")
61+
self.assertEqual(response.status_code, 200)
62+
# Look for basic translations
63+
self.assertIn('"Yes"', response.text)
64+
self.assertIn('"No"', response.text)
65+
self.assertIn('"Warning"', response.text)
66+
5967

6068
if __name__ == "__main__":
6169
unittest.main(verbosity=2)

1.2/tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ def test_should_serve_static_files(self):
3535
response = requests.get("http://localhost/static/theme/wirecloud.defaulttheme/images/logos/header.png")
3636
self.assertEqual(response.status_code, 200)
3737

38+
def test_should_serve_translations(self):
39+
response = requests.get("http://localhost/api/i18n/js_catalogue?language=es")
40+
self.assertEqual(response.status_code, 200)
41+
# Look for basic translations
42+
self.assertIn('"Yes"', response.text)
43+
self.assertIn('"No"', response.text)
44+
self.assertIn('"Warning"', response.text)
45+
3846

3947
class StandaloneTests(unittest.TestCase, WireCloudTests):
4048

0 commit comments

Comments
 (0)