Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course
2
Feature: Course paged mode
3
  In order to split the course in parts
4
  As a teacher
5
  I need to display the course in a paged mode and navigate through the different sections
6
 
7
  @javascript @_cross_browser
8
  Scenario Outline: Weekly and topics course formats with Javascript enabled
9
    Given the following "courses" exist:
10
      | fullname | shortname | category | format         | coursedisplay | numsections | startdate | initsections   |
11
      | Course 1 | C1        | 0        | <courseformat> | 1             | 2           | 0         | <initsections> |
12
    And I log in as "admin"
13
    And I am on "Course 1" course homepage
14
    And I click on <section1> "link" in the <section1> "section"
15
    And I am on "Course 1" course homepage
16
    And I click on <section2> "link" in the <section2> "section"
17
    And I am on "Course 1" course homepage
18
    When I click on <general> "link" in the <general> "section"
19
    Then I should see <general> in the "div.page-context-header" "css_element"
20
    And I should see <section1> in the ".single-section div.nextsection" "css_element"
21
    And I should not see <prevunexistingsection> in the ".single-section" "css_element"
22
    And I click on <section1> "link" in the ".single-section" "css_element"
23
    And I should see <section1> in the "div.page-context-header" "css_element"
24
    And I should see <general> in the ".single-section div.prevsection" "css_element"
25
    And I should see <section2> in the ".single-section div.nextsection" "css_element"
26
    And I click on <section2> "link" in the ".single-section" "css_element"
27
    And I should see <section2> in the "div.page-context-header" "css_element"
28
    And I should not see <general> in the ".single-section .section-navigation" "css_element"
29
    And I should not see <prevunexistingsection> in the ".single-section" "css_element"
30
    And I should not see <nextunexistingsection> in the ".single-section" "css_element"
31
 
32
    Examples:
33
      | courseformat | initsections | general   | section1                | section2                 | prevunexistingsection       | nextunexistingsection     |
34
      | topics       | 1            | "General" | "Section 1"             | "Section 2"              | "Section 0"                 | "Section 3"               |
35
      | weeks        | 0            | "General" | "1 January - 7 January" | "8 January - 14 January" | "25 December - 31 December" | "15 January - 21 January" |
36
 
37
  @javascript
38
  Scenario Outline: Paged section redirect after creating an activity
39
    Given the following "courses" exist:
40
      | fullname | shortname | category | format | coursedisplay | numsections | startdate | initsections   |
41
      | Course 1 | C1        | 0        | <courseformat> | 1     | 3           | 0         | <initsections> |
42
    And the following "activities" exist:
43
      | activity | course | name       |
44
      | assign   | C1     | Assignment |
45
    When I am on the <courseandsection> "course > section" page logged in as "admin"
46
    And I turn editing mode on
47
    And I should see <section1> in the "div.page-context-header" "css_element"
48
    And I should see <section2> in the ".single-section div.nextsection" "css_element"
49
    And I should not see <prevunexistingsection> in the ".single-section" "css_element"
50
    Then I should see <section1> in the "div.page-context-header" "css_element"
51
    And I should see <section2> in the ".single-section div.nextsection" "css_element"
52
    And I should not see <prevunexistingsection> in the ".single-section" "css_element"
53
 
54
    Examples:
55
      | courseformat | initsections | courseandsection                   | section1                | section2                 | prevunexistingsection       |
56
      | topics       | 1            | "Course 1 > Section 1"             | "Section 1"             | "Section 2"              | "Section 0"                 |
57
      | weeks        | 0            | "Course 1 > 1 January - 7 January" | "1 January - 7 January" | "8 January - 14 January" | "25 December - 31 December" |
58
 
59
  Scenario Outline: Weekly and topics course formats with Javascript disabled
60
    Given the following "courses" exist:
61
      | fullname | shortname | category | format         | coursedisplay | numsections | startdate | initsections   |
62
      | Course 1 | C1        | 0        | <courseformat> | 1             | 2           | 0         | <initsections> |
63
    And I log in as "admin"
64
    And I am on "Course 1" course homepage
65
    Then I click on <section1> "link" in the <section1> "section"
66
    And I am on "Course 1" course homepage
67
    And I click on <section2> "link" in the <section2> "section"
68
    And I am on "Course 1" course homepage
69
    And I click on <general> "link" in the <general> "section"
70
    And I should see <general> in the "div.page-context-header" "css_element"
71
    And I should see <section1> in the ".single-section div.nextsection" "css_element"
72
    And I should not see <prevunexistingsection> in the ".single-section" "css_element"
73
    And I am on the <courseandsection1> "course > section" page
74
    And I should see <section1> in the "div.page-context-header" "css_element"
75
    And I should see <general> in the ".single-section div.prevsection" "css_element"
76
    And I should see <section2> in the ".single-section div.nextsection" "css_element"
77
    And I am on the <courseandsection2> "course > section" page
78
    And I should see <section2> in the "div.page-context-header" "css_element"
79
    And I should not see <general> in the ".single-section .section-navigation" "css_element"
80
    And I should not see <prevunexistingsection> in the ".single-section" "css_element"
81
    And I should not see <nextunexistingsection> in the ".single-section" "css_element"
82
 
83
    Examples:
84
      | courseformat | initsections | courseandsection1                  | courseandsection2                   | general   | section1                | section2                 | prevunexistingsection       | nextunexistingsection     |
85
      | topics       | 1            | "Course 1 > Section 1"             | "Course 1 > Section 2"              | "General" | "Section 1"             | "Section 2"              | "Section 0"                 | "Section 3"               |
86
      | weeks        | 0            | "Course 1 > 1 January - 7 January" | "Course 1 > 8 January - 14 January" | "General" | "1 January - 7 January" | "8 January - 14 January" | "25 December - 31 December" | "15 January - 21 January" |