Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_blog_menu
2
Feature: Enable Block blog menu in a course
3
  In order to enable the blog menu in a course
4
  As a teacher
5
  I can add blog menu block to a course
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email | idnumber |
10
      | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
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
      | teacher1 | C1 | editingteacher |
17
 
18
  Scenario: Add the block to a the course when blogs are disabled
19
    Given I log in as "teacher1"
20
    And I am on "Course 1" course homepage with editing mode on
21
    When I add the "Blog menu" block
22
    And the following config values are set as admin:
23
      | enableblogs | 0 |
24
    And I reload the page
25
    Then I should see "Blogging is disabled!" in the "Blog menu" "block"
26
 
27
  Scenario: Add the block to a the course when blog associations are disabled
28
    Given I log in as "admin"
29
    And the following config values are set as admin:
30
      | useblogassociations | 0 |
31
    And I log out
32
    And I log in as "teacher1"
33
    And I am on "Course 1" course homepage with editing mode on
34
    When I add the "Blog menu" block
35
    Then I should see "Blog entries" in the "Blog menu" "block"
36
    And I should see "Add a new entry" in the "Blog menu" "block"
37
    And I should not see "View all entries for this course" in the "Blog menu" "block"
38
    And I should not see "View my entries about this course" in the "Blog menu" "block"
39
    And I should not see "Add an entry about this course" in the "Blog menu" "block"
40
 
41
  Scenario: Add the block to a the course when blog associations are enabled
42
    Given I log in as "admin"
43
    And the following config values are set as admin:
44
      | useblogassociations | 1 |
45
    And I log out
46
    And I log in as "teacher1"
47
    And I am on "Course 1" course homepage with editing mode on
48
    When I add the "Blog menu" block
49
    Then I should see "Blog entries" in the "Blog menu" "block"
50
    And I should see "Add a new entry" in the "Blog menu" "block"
51
    And I should see "View all entries for this course" in the "Blog menu" "block"
52
    And I should see "View my entries about this course" in the "Blog menu" "block"
53
    And I should see "Add an entry about this course" in the "Blog menu" "block"
54
 
55
  Scenario: Add the block to a the course when RSS is disabled
56
    Given I log in as "admin"
57
    And the following config values are set as admin:
58
      | enablerssfeeds | 0 |
59
    And I log out
60
    And I log in as "teacher1"
61
    And I am on "Course 1" course homepage with editing mode on
62
    When I add the "Blog menu" block
63
    Then I should not see "Blog RSS feed" in the "Blog menu" "block"
64
    And I should see "Add a new entry" in the "Blog menu" "block"
65
 
66
  Scenario: Add the block to a the course when RSS is enabled
67
    Given I log in as "admin"
68
    And the following config values are set as admin:
69
      | enablerssfeeds | 1 |
70
    And I log out
71
    And I log in as "teacher1"
72
    And I am on "Course 1" course homepage with editing mode on
73
    When I add the "Blog menu" block
74
    Then I should see "Blog RSS feed" in the "Blog menu" "block"
75
    And I should see "Add a new entry" in the "Blog menu" "block"