[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/workshop/tests/behat/ -> grade_to_pass.feature (source)

   1  @mod @mod_workshop
   2  Feature: Setting grades to pass via workshop editing form
   3    In order to define grades to pass
   4    As a teacher
   5    I can set them in the workshop settings form, without the need to go to the gradebook
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email                |
  10        | teacher1 | Terry1    | Teacher1 | teacher1@example.com |
  11      And the following "courses" exist:
  12        | fullname  | shortname |
  13        | Course1   | c1        |
  14      And the following "course enrolments" exist:
  15        | user     | course | role           |
  16        | teacher1 | c1     | editingteacher |
  17  
  18    Scenario: Adding a new workshop with grade to pass field set
  19      Given I log in as "teacher1"
  20      And I follow "Course1"
  21      And I turn editing mode on
  22      When I add a "Workshop" to section "1" and I fill the form with:
  23        | Workshop name | Awesome workshop |
  24        | Description | Grades to pass are set here |
  25        | Submission grade to pass | 45   |
  26        | Assessment grade to pass | 10.5 |
  27      Then I should not see "Adding a new Workshop"
  28      And I follow "Awesome workshop"
  29      And I navigate to "Edit settings" node in "Workshop administration"
  30      And the field "Submission grade to pass" matches value "45.00"
  31      And the field "Assessment grade to pass" matches value "10.50"
  32  
  33    Scenario: Adding a new workshop with grade to pass fields left empty
  34      Given I log in as "teacher1"
  35      And I follow "Course1"
  36      And I turn editing mode on
  37      When I add a "Workshop" to section "1" and I fill the form with:
  38        | Workshop name | Another awesome workshop |
  39        | Description | No grades to pass are set here |
  40        | Submission grade to pass |    |
  41        | Assessment grade to pass |    |
  42      Then I should not see "Adding a new Workshop"
  43      And I follow "Another awesome workshop"
  44      And I navigate to "Edit settings" node in "Workshop administration"
  45      And the field "Submission grade to pass" matches value "0.00"
  46      And the field "Assessment grade to pass" matches value "0.00"
  47  
  48    Scenario: Adding a new workshop with non-numeric value of a grade to pass
  49      Given I log in as "teacher1"
  50      And I follow "Course1"
  51      And I turn editing mode on
  52      When I add a "Workshop" to section "1" and I fill the form with:
  53        | Workshop name | Almost awesome workshop |
  54        | Description | Invalid grade to pass is set here |
  55        | Assessment grade to pass | You shall not pass! |
  56      Then I should see "Adding a new Workshop"
  57      And I should see "You must enter a number here"
  58  
  59    Scenario: Adding a new workshop with invalid value of a grade to pass
  60      Given I log in as "teacher1"
  61      And I follow "Course1"
  62      And I turn editing mode on
  63      When I add a "Workshop" to section "1" and I fill the form with:
  64        | Workshop name | Almost awesome workshop |
  65        | Description | Invalid grade to pass is set here |
  66        | Assessment grade to pass | 10000000 |
  67      Then I should see "Adding a new Workshop"
  68      And I should see "The grade to pass can not be greater than the maximum possible grade"
  69  
  70    Scenario: Emptying grades to pass fields sets them to zero
  71      Given I log in as "teacher1"
  72      And I follow "Course1"
  73      And I turn editing mode on
  74      And I add a "Workshop" to section "1" and I fill the form with:
  75        | Workshop name | Super awesome workshop |
  76        | Description | Grade to pass are set and then unset here |
  77        | Submission grade to pass | 59.99 |
  78        | Assessment grade to pass | 0.000 |
  79      And I should not see "Adding a new Workshop"
  80      And I follow "Super awesome workshop"
  81      And I navigate to "Edit settings" node in "Workshop administration"
  82      And the field "Submission grade to pass" matches value "59.99"
  83      And the field "Assessment grade to pass" matches value "0.00"
  84      When I set the field "Submission grade to pass" to ""
  85      And I set the field "Assessment grade to pass" to ""
  86      And I press "Save and display"
  87      Then I should not see "Adding a new Workshop"
  88      And I follow "Super awesome workshop"
  89      And I navigate to "Edit settings" node in "Workshop administration"
  90      And the field "Submission grade to pass" matches value "0.00"
  91      And the field "Assessment grade to pass" matches value "0.00"


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