You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/behat/add_forum.feature
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -45,3 +45,31 @@ Feature: Add Open Forum activities and discussions
45
45
And I follow "Edit"
46
46
And I follow "Use advanced editor and additional options"
47
47
And the field "Attachment" matches value "empty.txt"
48
+
49
+
@javascript
50
+
Scenario: Display the grade category select according to the grade type options
51
+
Given the following "users" exist:
52
+
| username | firstname | lastname | email |
53
+
| teacher1 | Teacher | 1 | teacher1@example.com |
54
+
And the following "courses" exist:
55
+
| fullname | shortname | category |
56
+
| Course1 | C1 | 0 |
57
+
And the following "course enrolments" exist:
58
+
| user | course | role |
59
+
| teacher1 | C1 | editingteacher |
60
+
And I log in as "teacher1"
61
+
And I am on "Course 1" course homepage with editing mode on
62
+
And I add a "Open Forum" to section "1" and I fill the form with:
63
+
| Forumname | Testforumname |
64
+
| Forumtype | Standardforumforgeneraluse |
65
+
| Description | Testforumdescription |
66
+
And I follow "Test forum name"
67
+
And I click on "#region-main-settings-menu .dropdown-toggle>.icon""css_element"
68
+
And I follow "Edit settings"
69
+
And I click on "#page-mod-hsuforum-mod #id_modstandardratings a[aria-controls='id_modstandardratings']""css_element"
70
+
And I set the field with xpath "//body[@id='page-mod-hsuforum-mod']//fieldset[@id='id_modstandardratings']//select[@id='id_assessed']" to "Average of ratings"
71
+
And the "disabled" attribute of "#page-mod-hsuforum-mod #id_modstandardgrade > div.fcontainer.clearfix > div:nth-child(3) div[data-fieldtype='select'] select[name='gradecat_hsuforum']""css_element" should contain "disabled"
72
+
And I click on "#page-mod-hsuforum-mod #id_modstandardgrade a[aria-controls='id_modstandardgrade']""css_element"
73
+
And I set the field with xpath "//body[@id='page-mod-hsuforum-mod']//fieldset[@id='id_modstandardgrade']//select[@id='id_gradetype']" to "Manual"
74
+
# This final step is only to verify that the user can select something after the Manual option is chosen for grade type.
75
+
And I set the field with xpath "//body[@id='page-mod-hsuforum-mod']//fieldset[@id='id_modstandardgrade']//select[@id='id_gradecat_hsuforum']" to "Uncategorised"
0 commit comments