1 |
efrain |
1 |
@core @core_course @core_courseformat
|
|
|
2 |
Feature: The course index language should change according to user preferences.
|
|
|
3 |
As a user in a course
|
|
|
4 |
I should see the same language in the course index and the course content when I switch languages.
|
|
|
5 |
|
|
|
6 |
Background:
|
|
|
7 |
Given remote langimport tests are enabled
|
|
|
8 |
And the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
| student1 | Student | 1 | student1@example.com |
|
|
|
12 |
And the following "course" exists:
|
|
|
13 |
| fullname | Course 1 |
|
|
|
14 |
| shortname | C1 |
|
|
|
15 |
| category | 0 |
|
|
|
16 |
| enablecompletion | 1 |
|
|
|
17 |
| numsections | 4 |
|
|
|
18 |
And the following "course enrolments" exist:
|
|
|
19 |
| user | course | role |
|
|
|
20 |
| student1 | C1 | student |
|
|
|
21 |
| teacher1 | C1 | editingteacher |
|
|
|
22 |
And the following "language pack" exists:
|
|
|
23 |
| language | fr |
|
|
|
24 |
And I change window size to "large"
|
|
|
25 |
|
|
|
26 |
@javascript
|
|
|
27 |
Scenario Outline: Course index is refreshed when we change language.
|
|
|
28 |
Given I am on the "C1" "Course" page logged in as "<user>"
|
|
|
29 |
When I follow "Language" in the user menu
|
|
|
30 |
Then I should see "Language selector" user submenu
|
|
|
31 |
And I follow "Français ‎(fr)‎"
|
|
|
32 |
Then I should see "Généralités" in the "courseindex-content" "region"
|
|
|
33 |
Examples:
|
|
|
34 |
| user |
|
|
|
35 |
| student1 |
|
|
|
36 |
| teacher1 |
|