[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

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

   1  @mod @mod_forum
   2  Feature: A user can control their own subscription preferences for a forum
   3    In order to receive notifications for things I am interested in
   4    As a user
   5    I need to choose my forum subscriptions
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | student1 | Student   | One      | [email protected] |
  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 I follow "Course 1"
  19      And I turn editing mode on
  20  
  21    Scenario: A disallowed subscription forum cannot be subscribed to
  22      Given I add a "Forum" to section "1" and I fill the form with:
  23        | Forum name        | Test forum name |
  24        | Forum type        | Standard forum for general use |
  25        | Description       | Test forum description |
  26        | Subscription mode | Subscription disabled |
  27      And I add a new discussion to "Test forum name" forum with:
  28        | Subject | Test post subject |
  29        | Message | Test post message |
  30      And I log out
  31      When I log in as "student1"
  32      And I follow "Course 1"
  33      And I follow "Test forum name"
  34      Then I should not see "Subscribe to this forum"
  35      And I should not see "Unsubscribe from this forum"
  36      And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject" "table_row"
  37      And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject" "table_row"
  38  
  39    Scenario: A forced subscription forum cannot be subscribed to
  40      Given I add a "Forum" to section "1" and I fill the form with:
  41        | Forum name        | Test forum name |
  42        | Forum type        | Standard forum for general use |
  43        | Description       | Test forum description |
  44        | Subscription mode | Forced subscription |
  45      And I add a new discussion to "Test forum name" forum with:
  46        | Subject | Test post subject |
  47        | Message | Test post message |
  48      And I log out
  49      When I log in as "student1"
  50      And I follow "Course 1"
  51      And I follow "Test forum name"
  52      Then I should not see "Subscribe to this forum"
  53      And I should not see "Unsubscribe from this forum"
  54      And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject" "table_row"
  55      And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject" "table_row"
  56  
  57    Scenario: An optional forum can be subscribed to
  58      Given I add a "Forum" to section "1" and I fill the form with:
  59        | Forum name        | Test forum name |
  60        | Forum type        | Standard forum for general use |
  61        | Description       | Test forum description |
  62        | Subscription mode | Optional subscription |
  63      And I add a new discussion to "Test forum name" forum with:
  64        | Subject | Test post subject |
  65        | Message | Test post message |
  66      And I log out
  67      When I log in as "student1"
  68      And I follow "Course 1"
  69      And I follow "Test forum name"
  70      Then I should see "Subscribe to this forum"
  71      And I should not see "Unsubscribe from this forum"
  72      And I follow "Subscribe to this forum"
  73      And I follow "Continue"
  74      And I should see "Unsubscribe from this forum"
  75      And I should not see "Subscribe to this forum"
  76  
  77    Scenario: An Automatic forum can be unsubscribed from
  78      Given I add a "Forum" to section "1" and I fill the form with:
  79        | Forum name        | Test forum name |
  80        | Forum type        | Standard forum for general use |
  81        | Description       | Test forum description |
  82        | Subscription mode | Auto subscription |
  83      And I add a new discussion to "Test forum name" forum with:
  84        | Subject | Test post subject |
  85        | Message | Test post message |
  86      And I log out
  87      When I log in as "student1"
  88      And I follow "Course 1"
  89      And I follow "Test forum name"
  90      Then I should see "Unsubscribe from this forum"
  91      And I should not see "Subscribe to this forum"
  92      And I follow "Unsubscribe from this forum"
  93      And I follow "Continue"
  94      And I should see "Subscribe to this forum"
  95      And I should not see "Unsubscribe from this forum"


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