MDL-49324 grades: Remove unnecessary @javascript tag from tests
[moodle.git] / grade / tests / behat / grade_UI_settings.feature
CommitLineData
0e999796
AD
1@core @core_grades
2Feature: Site settings can be used to hide parts of the gradebook UI
3 In order to hide UI elements
4 As an admin
5 I need to modify gradebook related system settings
6
7 Background:
8 Given the following "courses" exist:
9 | fullname | shortname | category | format |
10 | Course 1 | C1 | 0 | topics |
11 And the following "users" exist:
12 | username | firstname | lastname | email | idnumber |
0fe86bbd 13 | student1 | Student | 1 | student1@example.com | s1 |
0e999796
AD
14 And the following "course enrolments" exist:
15 | user | course | role |
16 | student1 | C1 | student |
17 And the following "activities" exist:
18 | activity | course | idnumber | name | intro |
19 | assign | C1 | assign1 | Assignment1 | Assignment 1 intro |
20 And I log in as "admin"
3a8b9b65 21 And I am on site homepage
0e999796 22 And I follow "Course 1"
4887d152 23 And I navigate to "Grades" node in "Course administration"
0e999796
AD
24 And I turn editing mode on
25
26 @javascript
27 Scenario: Hide minimum grade
28 When I click on "Edit assign Assignment1" "link"
29 And I should see "Minimum grade"
30 Then I navigate to "General settings" node in "Site administration > Grades"
47f084c6 31 And I set the field "Show minimum grade" to "0"
0e999796 32 And I press "Save changes"
3a8b9b65 33 And I am on site homepage
0e999796 34 And I follow "Course 1"
4887d152 35 And I navigate to "Grades" node in "Course administration"
0e999796
AD
36 And I click on "Edit assign Assignment1" "link"
37 And I should not see "Minimum grade"
38
39 @javascript
40 Scenario: Hide calculation icons
41 And "Edit calculation for Course total" "link" should exist
42 When I navigate to "Grader report" node in "Site administration > Grades > Report settings"
47f084c6 43 And I set the field "Show calculations" to "0"
0e999796 44 And I press "Save changes"
3a8b9b65 45 And I am on site homepage
0e999796 46 And I follow "Course 1"
4887d152 47 And I navigate to "Grades" node in "Course administration"
0e999796
AD
48 Then "Edit calculation for Course total" "link" should not exist
49
50 @javascript
51 Scenario: Disable category overriding
ba55be91 52 And "tr .course input[type='text']" "css_element" should exist
0e999796 53 Then I navigate to "Grade category settings" node in "Site administration > Grades"
47f084c6 54 And I set the field "Allow category grades to be manually overridden" to "0"
0e999796 55 And I press "Save changes"
3a8b9b65 56 And I am on site homepage
0e999796 57 And I follow "Course 1"
4887d152 58 And I navigate to "Grades" node in "Course administration"
ba55be91 59 And "tr .course input[type='text']" "css_element" should not exist