Skip to content

Commit 0ced55c

Browse files
committed
MOBILE-4901 lang: Add behat testing for custom lang strings
1 parent 248a236 commit 0ced55c

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

src/core/tests/behat/customlangstrings.feature

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/core/tests/behat/language.feature

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,26 @@ Feature: Test language changes
2020

2121
When I change language to "es" in the app
2222
Then I should find "Mis cursos" in the app
23+
24+
Scenario: Custom lang strings
25+
Given I log in as "admin"
26+
And I navigate to "General > Mobile app > Mobile features" in site administration
27+
And I set the field "Custom language strings" to multiline:
28+
"""
29+
core.courses.mycourses|Foo|en
30+
core.courses.mycourses| Foo amb espais |ca
31+
core.course.nocontentavailable| No content here |en_us
32+
addon.block_timeline.pluginnames|Linetime|en
33+
"""
34+
And I press "Save changes"
35+
36+
When I entered the app as "student1"
37+
Then I should be able to press "Foo" in the app
38+
Then I should not find "No content here" in the app
39+
40+
When I change language to "ca" in the app
41+
Then I should be able to press "Foo amb espais" in the app
42+
43+
When I change language to "en_us" in the app
44+
Then I should be able to press "Foo" in the app
45+
Then I should find "No content here" in the app

0 commit comments

Comments
 (0)