@@ -6,29 +6,29 @@ Feature: Numeric questions can specify a maximum number of digits, and minimum n
6
6
7
7
Background : Add a numeric question to a questionnaire with a max digits and nb decimals specified
8
8
Given the following "users" exist:
9
- | username | firstname | lastname | email |
10
- | teacher1 | Teacher | 1 | teacher1 @example .com |
11
- | student1 | Student | 1 | student1 @example .com |
9
+ | username | firstname | lastname | email |
10
+ | teacher1 | Teacher | 1 | teacher1 @example .com |
11
+ | student1 | Student | 1 | student1 @example .com |
12
12
And the following "courses" exist:
13
13
| fullname | shortname | category |
14
- | Course 1 | C1 | 0 |
14
+ | Course 1 | C1 | 0 |
15
15
And the following "course enrolments" exist:
16
- | user | course | role |
17
- | teacher1 | C1 | editingteacher |
18
- | student1 | C1 | student |
16
+ | user | course | role |
17
+ | teacher1 | C1 | editingteacher |
18
+ | student1 | C1 | student |
19
19
And the following "activities" exist:
20
- | activity | name | description | course | idnumber |
21
- | questionnaire | Test questionnaire | Test questionnaire description | C1 | questionnaire0 |
20
+ | activity | name | description | course | idnumber |
21
+ | questionnaire | Test questionnaire | Test questionnaire description | C1 | questionnaire0 |
22
22
And I log in as "teacher1"
23
23
And I am on "Course 1" course homepage
24
24
And I follow "Test questionnaire"
25
25
And I navigate to "Questions" in current page administration
26
26
And I add a "Numeric" question and I fill the form with:
27
- | Question Name | Q1 |
28
- | Yes | y |
29
- | Max . digits allowed | 6 |
30
- | Nb of decimal digits | 2 |
31
- | Question Text | Enter no more than six digits including the decimal point |
27
+ | Question Name | Q1 |
28
+ | Yes | y |
29
+ | Max . digits allowed | 6 |
30
+ | Nb of decimal digits | 2 |
31
+ | Question Text | Enter no more than six digits including the decimal point |
32
32
Then I should see "position 1"
33
33
And I should see "[Numeric] (Q1)"
34
34
And I should see "Enter no more than six digits including the decimal point"
@@ -49,3 +49,11 @@ Feature: Numeric questions can specify a maximum number of digits, and minimum n
49
49
And I should see "Test questionnaire"
50
50
And I should see "Enter no more than six digits including the decimal point"
51
51
And I should see "1.2345"
52
+
53
+ @javascript
54
+ Scenario : Test question instruction accessibility.
55
+ Given I am on the "Course 1" course page logged in as admin
56
+ And I follow "Test questionnaire"
57
+ When I navigate to "Answer the questions..." in current page administration
58
+ Then "span[id^='numerical']" "css_element" should exist
59
+ And "input[aria-describedby^='numerical']" "css_element" should exist
0 commit comments