[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/mod/assign/tests/behat/ -> submission_comments.feature (source)

   1  @mod @mod_assign
   2  Feature: In an assignment, students can comment in their submissions
   3    In order to refine assignment submissions
   4    As a student
   5    I need to add comments about submissions
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | category | groupmode |
  10        | Course 1 | C1 | 0 | 1 |
  11      And the following "users" exist:
  12        | username | firstname | lastname | email |
  13        | teacher1 | Teacher | 1 | [email protected] |
  14        | student1 | Student | 1 | [email protected] |
  15      And the following "course enrolments" exist:
  16        | user | course | role |
  17        | teacher1 | C1 | editingteacher |
  18        | student1 | C1 | student |
  19  
  20    @javascript
  21    Scenario: Student comments an assignment submission
  22      Given the following "activities" exist:
  23        | activity | course | idnumber | name                 | intro                       | assignsubmission_onlinetext_enabled |
  24        | assign   | C1     | assign1  | Test assignment name | Test assignment description | 1 |
  25      And I log in as "student1"
  26      And I follow "Course 1"
  27      And I follow "Test assignment name"
  28      When I press "Add submission"
  29      And I set the following fields to these values:
  30        | Online text | I'm the student submission |
  31      And I press "Save changes"
  32      And I click on ".comment-link" "css_element"
  33      And I set the field "content" to "First student comment"
  34      And I follow "Save comment"
  35      Then I should see "First student comment"
  36      And the field "content" matches value "Add a comment..."
  37      And I follow "Delete this comment"
  38      # Wait for the animation to finish.
  39      And I wait "2" seconds
  40      And I set the field "content" to "Second student comment"
  41      And I follow "Save comment"
  42      And I should see "Second student comment"
  43      And I should not see "First student comment"
  44      And I follow "Test assignment name"
  45      And I click on ".comment-link" "css_element"
  46      And I should see "Second student comment"
  47      And I should not see "First student comment"
  48  
  49    @javascript
  50    Scenario: Teacher can comment on an offline assignment
  51      Given the following "activities" exist:
  52        | activity | course | idnumber | name                 | intro                       | assignsubmission_onlinetext_enabled | assignmentsubmission_file_enabled | assignfeedback_comments_enabled |
  53        | assign   | C1     | assign1  | Test assignment name | Test assignment description | 0 | 0 | 1 |
  54      And I log in as "teacher1"
  55      And I follow "Course 1"
  56      And I follow "Test assignment name"
  57      And I follow "View/grade all submissions"
  58      And I click on "Grade Student 1" "link" in the "Student 1" "table_row"
  59      When I set the following fields to these values:
  60        | Grade out of 100 | 50 |
  61        | Feedback comments | I'm the teacher feedback |
  62      And I press "Save changes"
  63      And I press "Continue"
  64      Then I should see "50.00" in the "Student 1" "table_row"
  65      And I should see "I'm the teacher feedback" in the "Student 1" "table_row"


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1