[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/grade/tests/behat/ -> grade_point_maximum.feature (source)

   1  @core @core_grades
   2  Feature: We can change the grading type and maximum grade point values
   3    In order to verify that we can change the system-level maximum grade point value
   4    As an admin
   5    I need to modify the system maximum grade point and ensure that activities can use the full range.
   6    I need to ensure that using scales for activities still works correctly.
   7    I need to ensure that the maximum grade point value is enforced for new and existing activities.
   8  
   9    Background:
  10      Given the following "courses" exist:
  11        | fullname | shortname | category | format |
  12        | Course 1 | C1 | 0 | topics |
  13      Given the following "activities" exist:
  14        | activity | course | idnumber | name | intro |
  15        | assign | C1 | assign1| Test Assignment 1 | Test Assignment 1 |
  16      And I log in as "admin"
  17      And I navigate to "General settings" node in "Site administration > Grades"
  18      And I set the following fields to these values:
  19        | Grade point maximum | 900 |
  20        | Grade point default | 800 |
  21      And I press "Save changes"
  22      And I am on site homepage
  23      And I follow "Course 1"
  24  
  25    @javascript
  26    Scenario: Validate that switching the type of grading used correctly disables input form elements
  27      When I follow "Test Assignment 1"
  28      And I follow "Edit settings"
  29      And I expand all fieldsets
  30      And I set the field "grade[modgrade_type]" to "Point"
  31      Then the "Scale" "select" should be disabled
  32      And the "Maximum grade" "field" should be enabled
  33      And I set the field "grade[modgrade_type]" to "Scale"
  34      And the "Maximum grade" "field" should be disabled
  35      Then the "Scale" "select" should be enabled
  36      And I set the field "grade[modgrade_type]" to "None"
  37      Then the "Scale" "select" should be disabled
  38      And the "Maximum grade" "field" should be disabled
  39      And I press "Save and return to course"
  40  
  41    @javascript
  42    Scenario: Create an activity with a maximum grade point value less than the system maximum
  43      When I follow "Test Assignment 1"
  44      And I follow "Edit settings"
  45      And I expand all fieldsets
  46      And I set the field "grade[modgrade_type]" to "point"
  47      And I set the field "grade[modgrade_point]" to "600"
  48      And I press "Save and display"
  49      And I follow "Edit settings"
  50      Then the field "grade[modgrade_point]" matches value "600"
  51      And the "Scale" "select" should be disabled
  52      And I press "Save and return to course"
  53  
  54    @javascript
  55    Scenario: Create an activity with a scale as the grade type
  56      When I follow "Test Assignment 1"
  57      And I follow "Edit settings"
  58      And I expand all fieldsets
  59      And I set the field "grade[modgrade_type]" to "Scale"
  60      And I set the field "grade[modgrade_scale]" to "Separate and Connected ways of knowing"
  61      And I press "Save and display"
  62      And I follow "Edit settings"
  63      Then the field "grade[modgrade_scale]" matches value "Separate and Connected ways of knowing"
  64      And the "Maximum grade" "field" should be disabled
  65      And I press "Save and return to course"
  66  
  67    @javascript
  68    Scenario: Create an activity with no grade as the grade type
  69      When I follow "Test Assignment 1"
  70      And I follow "Edit settings"
  71      And I expand all fieldsets
  72      And I set the field "grade[modgrade_type]" to "None"
  73      And I press "Save and display"
  74      And I follow "Edit settings"
  75      And the "Scale" "select" should be disabled
  76      And the "Maximum grade" "field" should be disabled
  77      And I press "Save and return to course"
  78  
  79    Scenario: Create an activity with a maximum grade point value higher than the system maximum
  80      When I follow "Test Assignment 1"
  81      And I follow "Edit settings"
  82      And I expand all fieldsets
  83      And I set the field "grade[modgrade_type]" to "Point"
  84      And I set the field "grade[modgrade_point]" to "20000"
  85      And I press "Save and display"
  86      Then I should see "Invalid grade value. This must be an integer between 1 and 900"
  87      And I press "Cancel"
  88  
  89    Scenario: Create an activity with a valid maximum grade point and then change the system maximum to be lower
  90      When I follow "Test Assignment 1"
  91      And I follow "Edit settings"
  92      And I expand all fieldsets
  93      And I set the field "grade[modgrade_type]" to "point"
  94      And I set the field "grade[modgrade_point]" to "600"
  95      And I press "Save and display"
  96      And I navigate to "General settings" node in "Site administration > Grades"
  97      And I set the following fields to these values:
  98        | Grade point maximum | 100 |
  99      And I press "Save changes"
 100      And I am on site homepage
 101      And I follow "Course 1"
 102      And I follow "Test Assignment 1"
 103      And I follow "Edit settings"
 104      And I press "Save and display"
 105      Then I should see "Invalid grade value. This must be an integer between 1 and 100"
 106      And I press "Cancel"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1