[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/course/format/social/tests/behat/ -> social_adjust_discussion_count.feature (source)

   1  @format @format_social
   2  Feature: Change number of discussions displayed
   3    In order to change the number of discussions displayed
   4    As a teacher
   5    I need to edit the course and change the number of sections displayed.
   6  
   7  Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher1 | Teacher | 1 | teacher1@example.com |
  11      And the following "courses" exist:
  12        | fullname | shortname | category | format |
  13        | Course 1 | C1 | 0 | social |
  14      And the following "course enrolments" exist:
  15        | user | course | role |
  16        | teacher1 | C1 | editingteacher |
  17      And I log in as "teacher1"
  18      And I follow "Course 1"
  19      And I press "Add a new discussion topic"
  20      And I set the following fields to these values:
  21        | Subject | Forum Post 10 |
  22        | Message | This is forum post ten |
  23      And I press "Post to forum"
  24      And I wait to be redirected
  25      And I follow "Course 1"
  26      And I wait "1" seconds
  27      And I press "Add a new discussion topic"
  28      And I set the following fields to these values:
  29        | Subject | Forum Post 9 |
  30        | Message | This is forum post nine |
  31      And I press "Post to forum"
  32      And I wait to be redirected
  33      And I follow "Course 1"
  34      And I wait "1" seconds
  35      And I press "Add a new discussion topic"
  36      And I set the following fields to these values:
  37        | Subject | Forum Post 8 |
  38        | Message | This is forum post eight |
  39      And I press "Post to forum"
  40      And I wait to be redirected
  41      And I follow "Course 1"
  42      And I wait "1" seconds
  43      And I press "Add a new discussion topic"
  44      And I set the following fields to these values:
  45        | Subject | Forum Post 7 |
  46        | Message | This is forum post seven |
  47      And I press "Post to forum"
  48      And I wait to be redirected
  49      And I follow "Course 1"
  50      And I wait "1" seconds
  51      And I press "Add a new discussion topic"
  52      And I set the following fields to these values:
  53        | Subject | Forum Post 6 |
  54        | Message | This is forum post six |
  55      And I press "Post to forum"
  56      And I wait to be redirected
  57      And I follow "Course 1"
  58      And I wait "1" seconds
  59      And I press "Add a new discussion topic"
  60      And I set the following fields to these values:
  61        | Subject | Forum Post 5 |
  62        | Message | This is forum post five |
  63      And I press "Post to forum"
  64      And I wait to be redirected
  65      And I follow "Course 1"
  66      And I wait "1" seconds
  67      And I press "Add a new discussion topic"
  68      And I set the following fields to these values:
  69        | Subject | Forum Post 4 |
  70        | Message | This is forum post four |
  71      And I press "Post to forum"
  72      And I wait to be redirected
  73      And I follow "Course 1"
  74      And I wait "1" seconds
  75      And I press "Add a new discussion topic"
  76      And I set the following fields to these values:
  77        | Subject | Forum Post 3 |
  78        | Message | This is forum post three |
  79      And I press "Post to forum"
  80      And I wait to be redirected
  81      And I follow "Course 1"
  82      And I wait "1" seconds
  83      And I press "Add a new discussion topic"
  84      And I set the following fields to these values:
  85        | Subject | Forum Post 2 |
  86        | Message | This is forum post two |
  87      And I press "Post to forum"
  88      And I wait to be redirected
  89      And I follow "Course 1"
  90      And I wait "1" seconds
  91      And I press "Add a new discussion topic"
  92      And I set the following fields to these values:
  93        | Subject | Forum Post 1 |
  94        | Message | This is forum post one |
  95      And I press "Post to forum"
  96      And I wait to be redirected
  97      And I follow "Course 1"
  98  
  99  Scenario: When number of discussions is decreased fewer discussions appear
 100      Given I click on "Edit settings" "link" in the "Administration" "block"
 101      And I set the following fields to these values:
 102      | numdiscussions | 5 |
 103      When I press "Save and display"
 104      Then I should see "This is forum post one"
 105      And I should see "This is forum post five"
 106      And I should not see "This is forum post six"
 107  
 108  Scenario: When number of discussions is decreased to less than 1 only 1 discussion should appear
 109      Given I click on "Edit settings" "link" in the "Administration" "block"
 110      And I set the following fields to these values:
 111      | numdiscussions | -1 |
 112      When I press "Save and display"
 113      Then I should see "This is forum post one"
 114      And I should not see "This is forum post two"
 115      And I should not see "This is forum post ten"
 116  
 117  Scenario: When number of discussions is increased more discussions appear
 118      Given I click on "Edit settings" "link" in the "Administration" "block"
 119      And I set the following fields to these values:
 120      | numdiscussions | 9 |
 121      When I press "Save and display"
 122      Then I should see "This is forum post one"
 123      And I should see "This is forum post five"
 124      And I should see "This is forum post nine"
 125      And I should not see "This is forum post ten"


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