source: moodle/trunk/fuentes/course/tests/behat/paged_course_navigation.feature @ 1331

Last change on this file since 1331 was 1331, checked in by jrpelegrina, 3 years ago

Updated to moodle 3.0.3

File size: 4.6 KB
Line 
1@core @core_course
2Feature: 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 |
11      | Course 1 | C1 | 0 | <courseformat> | 1 | 3 |
12    And I log in as "admin"
13    And I am on site homepage
14    And I follow "Course 1"
15    Then I click on <section2> "link" in the <section2> "section"
16    And I follow "C1"
17    And I click on <section3> "link" in the <section3> "section"
18    And I follow "C1"
19    And I click on <section1> "link" in the <section1> "section"
20    And I should see <section1> in the "div.single-section" "css_element"
21    And I should see <section2> in the ".single-section span.mdl-right" "css_element"
22    And I should not see <prevunexistingsection> in the ".single-section" "css_element"
23    And I click on <section2> "link" in the ".single-section" "css_element"
24    And I should see <section2> in the "div.single-section" "css_element"
25    And I should see <section1> in the ".single-section span.mdl-left" "css_element"
26    And I should see <section3> in the ".single-section span.mdl-right" "css_element"
27    And I click on <section1> "link" in the ".single-section" "css_element"
28    And I should see <section1> in the "div.single-section" "css_element"
29    And I click on <section2> "link" in the ".single-section" "css_element"
30    And I click on <section3> "link" in the ".single-section" "css_element"
31    And I should see <section3> in the "div.single-section" "css_element"
32    And I should see <section2> in the ".single-section span.mdl-left" "css_element"
33    And I should not see <section1> in the ".single-section .section-navigation" "css_element"
34    And I should not see <prevunexistingsection> in the ".single-section" "css_element"
35    And I should not see <nextunexistingsection> in the ".single-section" "css_element"
36
37    Examples:
38      | courseformat | section1 | section2 | section3 | prevunexistingsection | nextunexistingsection |
39      | topics | "Topic 1" | "Topic 2" | "Topic 3" | "Topic 0" | "Topic 4" |
40      | weeks | "1 January - 7 January" | "8 January - 14 January" | "15 January - 21 January" | "25 December - 31 December" | "22 January - 28 January" |
41
42  Scenario Outline: Weekly and topics course formats with Javascript disabled
43    Given the following "courses" exist:
44      | fullname | shortname | category | format | coursedisplay | numsections |
45      | Course 1 | C1 | 0 | <courseformat> | 1 | 3 |
46    And I log in as "admin"
47    And I am on site homepage
48    And I follow "Course 1"
49    Then I click on <section2> "link" in the <section2> "section"
50    And I follow "C1"
51    And I click on <section3> "link" in the <section3> "section"
52    And I follow "C1"
53    And I click on <section1> "link" in the <section1> "section"
54    And I should see <section1> in the "div.single-section" "css_element"
55    And I should see <section2> in the ".single-section span.mdl-right" "css_element"
56    And I should not see <prevunexistingsection> in the ".single-section" "css_element"
57    And I click on <section2> "link" in the ".single-section" "css_element"
58    And I should see <section2> in the "div.single-section" "css_element"
59    And I should see <section1> in the ".single-section span.mdl-left" "css_element"
60    And I should see <section3> in the ".single-section span.mdl-right" "css_element"
61    And I click on <section1> "link" in the ".single-section" "css_element"
62    And I should see <section1> in the "div.single-section" "css_element"
63    And I click on <section2> "link" in the ".single-section" "css_element"
64    And I click on <section3> "link" in the ".single-section" "css_element"
65    And I should see <section3> in the "div.single-section" "css_element"
66    And I should see <section2> in the ".single-section span.mdl-left" "css_element"
67    And I should not see <section1> in the ".single-section .section-navigation" "css_element"
68    And I should not see <prevunexistingsection> in the ".single-section" "css_element"
69    And I should not see <nextunexistingsection> in the ".single-section" "css_element"
70
71    Examples:
72      | courseformat | section1 | section2 | section3 | prevunexistingsection | nextunexistingsection |
73      | topics | "Topic 1" | "Topic 2" | "Topic 3" | "Topic 0" | "Topic 4" |
74      | weeks | "1 January - 7 January" | "8 January - 14 January" | "15 January - 21 January" | "25 December - 31 December" | "22 January - 28 January" |
Note: See TracBrowser for help on using the repository browser.