[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/forum/tests/behat/ -> timed_discussions.feature (source)

   1  @mod @mod_forum
   2  Feature: Users can choose to set start and end time for display of their discussions
   3    In order to temporarly hide discussions to students
   4    As a teacher
   5    I need to set a discussion time start and time end
   6  
   7    Scenario: Student should not see the tooltip or the discussion
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | student1 | Student | 1 | student1@example.com |
  11      And the following "courses" exist:
  12        | fullname | shortname | category |
  13        | Course 1 | C1 | 0 |
  14      And the following "course enrolments" exist:
  15        | user | course | role |
  16        | student1 | C1 | student |
  17      And I log in as "admin"
  18      And the following config values are set as admin:
  19        | forum_enabletimedposts | 1 |
  20      And I am on site homepage
  21      And I follow "Course 1"
  22      And I turn editing mode on
  23      And I add a "Forum" to section "1" and I fill the form with:
  24        | Forum name | Test forum name |
  25        | Description | Test forum description |
  26      And I add a new discussion to "Test forum name" forum with:
  27        | Subject | Discussion 1 |
  28        | Message | Discussion contents 1, first message |
  29      And I add a new discussion to "Test forum name" forum with:
  30        | Subject          | Discussion 2 timed not visible       |
  31        | Message          | Discussion contents 2, first message |
  32        | timeend[enabled] | 1 |
  33        | timeend[year]    | 2014 |
  34      And I add a new discussion to "Test forum name" forum with:
  35        | Subject            | Discussion 3 timed visible now       |
  36        | Message            | Discussion contents 3, first message |
  37        | timestart[enabled] | 1 |
  38      And I am on site homepage
  39      And I follow "Course 1"
  40      And I follow "Test forum name"
  41      And I should see "Discussion 2 timed"
  42      And I should see "Discussion 3 timed"
  43      And ".timedpost" "css_element" should exist
  44      And I log out
  45      And I log in as "student1"
  46      When I follow "Course 1"
  47      And I follow "Test forum name"
  48      Then I should see "Discussion 1"
  49      And I should not see "Discussion 2 timed"
  50      And ".timedpost" "css_element" should not exist
  51      And I should see "Discussion 3 timed"


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