Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
@mod @mod_subsection
2
Feature: Subsections visibility badges
3
  In order to use subsections
4
  As an teacher
5
  I need to see edit visibility from the section card badges when possible.
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 | numsections | initsections |
13
      | Course 1 | C1        | 0        | 2           | 1            |
14
    And the following "activity" exists:
15
      | activity | subsection  |
16
      | name     | Subsection1 |
17
      | course   | C1          |
18
      | idnumber | subsection1 |
19
      | section  | 1           |
20
    And the following "course enrolments" exist:
21
      | user     | course | role           |
22
      | teacher1 | C1     | editingteacher |
23
    And I log in as "teacher1"
24
 
25
  @javascript
26
  Scenario: Hide/Show subsection badge on the course page
27
    Given I am on "Course 1" course homepage with editing mode on
28
    And I hide section "Subsection1"
29
    And I should see "Hidden from students" in the "Subsection1" "core_courseformat > Section visibility"
30
    When I click on "Hidden from students" "button" in the "Subsection1" "core_courseformat > Section visibility"
31
    And I click on "Show on course page" "link" in the "Subsection1" "core_courseformat > Section visibility"
32
    Then I should not see "Hidden from students" in the "Subsection1" "activity"
33
 
34
  @javascript
35
  Scenario: Hide/Show subsection badge on the parent section page
36
    Given I am on "Course 1" course homepage with editing mode on
37
    And I hide section "Subsection1"
38
    When I am on the "Course 1 > Section 1" "course > section" page
39
    And I should see "Hidden from students" in the "Subsection1" "core_courseformat > Section visibility"
40
    And I click on "Hidden from students" "button" in the "Subsection1" "core_courseformat > Section visibility"
41
    And I click on "Show on course page" "link" in the "Subsection1" "core_courseformat > Section visibility"
42
    Then I should not see "Hidden from students" in the "Subsection1" "activity"
43
 
44
  @javascript
45
  Scenario: Hide/Show subsection badge on the subsection page
46
    Given I am on "Course 1" course homepage with editing mode on
47
    And I hide section "Subsection1"
48
    When I am on the "Course 1 > Subsection1" "course > section" page
49
    And I should see "Hidden from students" in the "Subsection1" "core_courseformat > Section visibility"
50
    And I click on "Hidden from students" "button" in the "Subsection1" "core_courseformat > Section visibility"
51
    And I click on "Show on course page" "link" in the "Subsection1" "core_courseformat > Section visibility"
52
    Then I should not see "Hidden from students"
53
 
54
  @javascript
55
  Scenario: Subsection visibility badge is not editable when parent section is hidden
56
    Given I am on "Course 1" course homepage with editing mode on
57
    When I hide section "Section 1"
58
    And I should see "Hidden from students" in the "Section 1" "core_courseformat > Section visibility"
59
    And I should see "Hidden from students" in the "Subsection1" "activity"
60
    Then "Hidden from students" "button" should not exist in the "Subsection1" "activity"
61
    And I am on the "Course 1 > Section 1" "course > section" page
62
    And I should see "Hidden from students" in the "Subsection1" "activity"
63
    And "Hidden from students" "button" should not exist in the "Subsection1" "activity"
64
    And I am on the "Course 1 > Subsection1" "course > section" page
65
    And I should see "Hidden from students"
66
    And "Hidden from students" "button" should not exist