[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/completionstatus/tests/behat/ -> block_completionstatus_activity_completion.feature (source)

   1  @block @block_completionstatus
   2  Feature: Enable Block Completion in a course using activity completion
   3    In order to view the completion block in a course
   4    As a teacher
   5    I can add completion block to a course and set up activity completion
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email | idnumber |
  10        | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
  11        | student1 | Student | 1 | student1@example.com | S1 |
  12      And the following "courses" exist:
  13        | fullname | shortname | category | enablecompletion |
  14        | Course 1 | C1        | 0        | 1                |
  15      And the following "course enrolments" exist:
  16        | user     | course | role           |
  17        | teacher1 | C1     | editingteacher |
  18        | student1 | C1     | student        |
  19      And the following "activities" exist:
  20        | activity | course | idnumber | name           | intro                 |
  21        | page     | C1     | page1    | Test page name | Test page description |
  22  
  23    Scenario: Add the block to a the course and add course completion items
  24      Given I log in as "teacher1"
  25      And I follow "Course 1"
  26      And I turn editing mode on
  27      And I follow "Test page name"
  28      And I navigate to "Edit settings" node in "Page module administration"
  29      And I set the following fields to these values:
  30        | Completion tracking | Show activity as complete when conditions are met |
  31        | Require view | 1 |
  32      And I press "Save and return to course"
  33      And I add the "Course completion status" block
  34      And I navigate to "Course completion" node in "Course administration"
  35      And I expand all fieldsets
  36      And I set the following fields to these values:
  37        | Test page name | 1 |
  38      And I press "Save changes"
  39      And I log out
  40      When I log in as "student1"
  41      And I follow "Course 1"
  42      Then I should see "Status: Not yet started" in the "Course completion status" "block"
  43      And I should see "0 of 1" in the "Activity completion" "table_row"
  44  
  45    Scenario: Add the block to a the course and add course completion items
  46      Given I log in as "teacher1"
  47      And I follow "Course 1"
  48      And I turn editing mode on
  49      And I follow "Test page name"
  50      And I navigate to "Edit settings" node in "Page module administration"
  51      And I set the following fields to these values:
  52        | Completion tracking | Show activity as complete when conditions are met |
  53        | Require view | 1 |
  54      And I press "Save and return to course"
  55      And I add the "Course completion status" block
  56      And I navigate to "Course completion" node in "Course administration"
  57      And I expand all fieldsets
  58      And I set the following fields to these values:
  59        | Test page name | 1 |
  60      And I press "Save changes"
  61      And I log out
  62      When I log in as "student1"
  63      And I follow "Course 1"
  64      And I follow "Test page name"
  65      And I follow "C1"
  66      Then I should see "Status: Pending" in the "Course completion status" "block"
  67      And I should see "0 of 1" in the "Activity completion" "table_row"
  68      And I trigger cron
  69      And I am on site homepage
  70      And I follow "Course 1"
  71      And I should see "1 of 1" in the "Activity completion" "table_row"
  72      And I follow "More details"
  73      And I should see "Yes" in the "Activity completion" "table_row"


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