Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_label
2
 
3
Feature: Check label visibility works
4
  In order to check label visibility works
5
  As a teacher
6
  I should create label activity
7
 
8
  Background:
9
    Given the following "courses" exist:
10
      | fullname | shortname | category |
11
      | Test | C1 | 0 |
12
    And the following "users" exist:
13
      | username | firstname | lastname | email |
14
      | teacher | Teacher | First | teacher1@example.com |
15
      | student | Student | First | student1@example.com |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher | C1 | editingteacher |
19
      | student | C1 | student |
20
    And the following "activities" exist:
21
      | activity | course | section | intro          | idnumber | visible |
22
      | label    | C1     | 1       | Swanky label   | 1        | 1       |
23
      | label    | C1     | 1       | Swanky label 2 | 2        | 0       |
24
 
25
  Scenario: Hidden label activity should be show as hidden.
26
    Given I log in as "teacher"
27
    When I am on "Test" course homepage with editing mode on
28
    Then "Swanky label 2" label should be hidden
29
    And I turn editing mode off
30
    And "Swanky label 2" label should be hidden
31
    And I log out
32
    And I log in as "student"
33
    And I am on "Test" course homepage
34
    And I should not see "Swanky label 2"
35
    And I log out
36
 
37
  Scenario: Visible label activity should be shown as visible.
38
    Given I log in as "teacher"
39
    When I am on "Test" course homepage with editing mode on
40
    Then "Swanky label" activity should be visible
41
    And I log out
42
    And I log in as "student"
43
    And I am on "Test" course homepage
44
    And "Swanky label" activity should be visible
45
    And I log out
46
 
47
  @javascript
48
  Scenario: Teacher can not show label inside the hidden section
49
    Given I log in as "teacher"
50
    And I am on "Test" course homepage with editing mode on
51
    When I hide section "1"
52
    Then "Swanky label" label should be hidden
53
    And I open "Swanky label" actions menu
54
    And "Swanky label" actions menu should not have "Availability" item
55
    And I click on "Edit settings" "link" in the "Swanky label" activity
56
    And I expand all fieldsets
57
    And the "Availability" select box should contain "Hide on course page"
58
    And the "Availability" select box should not contain "Make available but don't show on course page"
59
    And the "Availability" select box should not contain "Show on course page"
60
    And I log out
61
    And I log in as "student"
62
    And I am on "Test" course homepage
63
    And I should not see "Swanky label"
64
    And I log out