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: Teachers navigate to subsections
3
  In order to use subsections
4
  As an teacher
5
  I need to navigate to subsections
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         | 1           | 1            |
14
    And the following "course enrolments" exist:
15
      | user      | course  | role            |
16
      | teacher1  | C1      | editingteacher  |
17
    And the following "activities" exist:
18
      | activity   | name                 | course | idnumber    | section |
19
      | assign     | Assignment 1         | C1     | assignment1 | 1       |
20
      | subsection | Subsection 1         | C1     | subsection1 | 1       |
21
      | page       | Page in Subsection 1 | C1     | page1       | 2       |
22
      | assign     | Assignment 2         | C1     | assignment2 | 1       |
23
    And I log in as "teacher1"
24
 
25
  Scenario: Subsection section page shows parent section in the breadcrumb
26
    When I am on the "C1 > Subsection 1" "course > section" page
27
    Then "C1" "link" should exist in the ".breadcrumb" "css_element"
28
    And "Section 1" "link" should exist in the ".breadcrumb" "css_element"
29
    And "Subsection 1" "text" should exist in the ".breadcrumb" "css_element"
30
 
31
  Scenario: Activity page shows subsection and its parent section in the breadcrumb
32
    When I am on the "page1" "Activity" page
33
    Then "C1" "link" should exist in the ".breadcrumb" "css_element"
34
    And "Section 1" "link" should exist in the ".breadcrumb" "css_element"
35
    And "Subsection 1" "link" should exist in the ".breadcrumb" "css_element"
36
    And "Page in Subsection 1" "text" should exist in the ".breadcrumb" "css_element"
37
 
38
  Scenario: Activity page shows Sections and Subsections in the navigation block
39
    Given the following config values are set as admin:
40
      | unaddableblocks | | theme_boost|
41
    And I turn editing mode on
42
    When I am on the "page1" "Activity" page
43
    And I add the "Navigation" block if not present
44
    Then "Section 1" "link" should appear before "Assignment 1" "link" in the "Navigation" "block"
45
    And "Assignment 1" "link" should appear before "Subsection 1" "link" in the "Navigation" "block"
46
    And "Subsection 1" "link" should appear before "Page in Subsection 1" "link" in the "Navigation" "block"
47
    And "Page in Subsection 1" "link" should appear before "Assignment 2" "link" in the "Navigation" "block"
48
 
49
  @javascript
50
  Scenario: Subsection page shows Sections and Subsections in the navigation block
51
    Given the following config values are set as admin:
52
      | unaddableblocks |  | theme_boost |
53
    And I turn editing mode on
54
    When I am on the "C1 > Subsection 1" "course > section" page
55
    And I add the "Navigation" block if not present
56
    Then "Section 1" "link" should appear before "Assignment 1" "link" in the "Navigation" "block"
57
    And "Assignment 1" "link" should appear before "Subsection 1" "link" in the "Navigation" "block"
58
    And "Subsection 1" "link" should appear before "Page in Subsection 1" "link" in the "Navigation" "block"
59
    And "Page in Subsection 1" "link" should appear before "Assignment 2" "link" in the "Navigation" "block"
60
 
61
  @javascript
62
  Scenario: The navigation block can load subsections via ajax
63
    Given the following config values are set as admin:
64
      | unaddableblocks |  | theme_boost |
65
    And I am on "Course 1" course homepage with editing mode on
66
    And I add the "Navigation" block if not present
67
    # Open all navigation nodes via keyboard because it does not use buttons/links chevrons.
68
    And I click on "Actions menu" "link" in the "Navigation" "block"
69
    And I press the escape key
70
    And I press the tab key
71
    And I press the multiply key
72
    Then "Section 1" "link" should appear before "Assignment 1" "link" in the "Navigation" "block"
73
    And "Assignment 1" "link" should appear before "Subsection 1" "link" in the "Navigation" "block"
74
    And "Subsection 1" "link" should appear before "Page in Subsection 1" "link" in the "Navigation" "block"
75
    And "Page in Subsection 1" "link" should appear before "Assignment 2" "link" in the "Navigation" "block"