1 |
efrain |
1 |
@core @core_admin @core_course @javascript
|
|
|
2 |
Feature: Reset course indentation
|
|
|
3 |
In order to reset indentation in course modules
|
|
|
4 |
As a admin
|
|
|
5 |
I want change indent value for all the modules of a course format courses in one go
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | format |
|
|
|
10 |
| Sections Course 1 | T1 | topics |
|
|
|
11 |
| Sections Course 2 | T2 | topics |
|
|
|
12 |
| Weekly Course 1 | W1 | weeks |
|
|
|
13 |
| Weekly Course 2 | W2 | weeks |
|
|
|
14 |
And the following "activities" exist:
|
|
|
15 |
| activity | name | intro | course | idnumber |
|
|
|
16 |
| forum | Sections forum name | Sections forum description | T1 | forum1 |
|
|
|
17 |
| data | Sections database name | Sections database description | T1 | data1 |
|
|
|
18 |
| wiki | Sections wiki name | Sections wiki description | T2 | wiki1 |
|
|
|
19 |
| forum | Weekly forum name | Weekly forum description | W1 | forum2 |
|
|
|
20 |
| data | Weekly database name | Weekly database description | W1 | data2 |
|
|
|
21 |
| wiki | Weekly wiki name | Weekly wiki description | W2 | wiki2 |
|
|
|
22 |
And I log in as "admin"
|
|
|
23 |
And I am on "Sections Course 1" course homepage with editing mode on
|
|
|
24 |
And I open "Sections forum name" actions menu
|
|
|
25 |
And I click on "Move right" "link" in the "Sections forum name" activity
|
|
|
26 |
And I open "Sections forum name" actions menu
|
|
|
27 |
And "Move right" "link" in the "Sections forum name" "activity" should not be visible
|
|
|
28 |
And "Move left" "link" in the "Sections forum name" "activity" should be visible
|
|
|
29 |
And I press the escape key
|
|
|
30 |
And I open "Sections database name" actions menu
|
|
|
31 |
And "Move right" "link" in the "Sections database name" "activity" should be visible
|
|
|
32 |
And "Move left" "link" in the "Sections database name" "activity" should not be visible
|
|
|
33 |
And I am on "Sections Course 2" course homepage with editing mode on
|
|
|
34 |
And I open "Sections wiki name" actions menu
|
|
|
35 |
And I click on "Move right" "link" in the "Sections wiki name" activity
|
|
|
36 |
And I open "Sections wiki name" actions menu
|
|
|
37 |
And "Move right" "link" in the "Sections wiki name" "activity" should not be visible
|
|
|
38 |
And "Move left" "link" in the "Sections wiki name" "activity" should be visible
|
|
|
39 |
And I am on "Weekly Course 1" course homepage with editing mode on
|
|
|
40 |
And I open "Weekly forum name" actions menu
|
|
|
41 |
And I click on "Move right" "link" in the "Weekly forum name" activity
|
|
|
42 |
And I open "Weekly forum name" actions menu
|
|
|
43 |
And "Move right" "link" in the "Weekly forum name" "activity" should not be visible
|
|
|
44 |
And "Move left" "link" in the "Weekly forum name" "activity" should be visible
|
|
|
45 |
And I press the escape key
|
|
|
46 |
And I open "Weekly database name" actions menu
|
|
|
47 |
And "Move right" "link" in the "Weekly database name" "activity" should be visible
|
|
|
48 |
And "Move left" "link" in the "Weekly database name" "activity" should not be visible
|
|
|
49 |
And I am on "Weekly Course 2" course homepage with editing mode on
|
|
|
50 |
And I open "Weekly wiki name" actions menu
|
|
|
51 |
And I click on "Move right" "link" in the "Weekly wiki name" activity
|
|
|
52 |
And I open "Weekly wiki name" actions menu
|
|
|
53 |
And "Move right" "link" in the "Weekly wiki name" "activity" should not be visible
|
|
|
54 |
And "Move left" "link" in the "Weekly wiki name" "activity" should be visible
|
|
|
55 |
|
|
|
56 |
Scenario Outline: Apply course indentation reset
|
|
|
57 |
Given I navigate to "Plugins > Course formats > <format>" in site administration
|
|
|
58 |
And I wait "5" seconds
|
|
|
59 |
And "Reset indentation sitewide" "link" should exist
|
|
|
60 |
When I click on "Reset indentation sitewide" "link"
|
|
|
61 |
And I should see "Reset indentation sitewide"
|
|
|
62 |
And "Reset indentation sitewide" "button" should exist
|
|
|
63 |
And I click on "Reset indentation sitewide" "button"
|
|
|
64 |
Then I should see "Indentation reset."
|
|
|
65 |
And I am on "<prefix> Course 1" course homepage with editing mode on
|
|
|
66 |
And I open "<prefix> forum name" actions menu
|
|
|
67 |
And "Move right" "link" in the "<prefix> forum name" "activity" should be visible
|
|
|
68 |
And "Move left" "link" in the "<prefix> forum name" "activity" should not be visible
|
|
|
69 |
And I press the escape key
|
|
|
70 |
And I open "<prefix> database name" actions menu
|
|
|
71 |
And "Move right" "link" in the "<prefix> database name" "activity" should be visible
|
|
|
72 |
And "Move left" "link" in the "<prefix> database name" "activity" should not be visible
|
|
|
73 |
And I am on "<prefix> Course 2" course homepage with editing mode on
|
|
|
74 |
And I open "<prefix> wiki name" actions menu
|
|
|
75 |
And "Move right" "link" in the "<prefix> wiki name" "activity" should be visible
|
|
|
76 |
And "Move left" "link" in the "<prefix> wiki name" "activity" should not be visible
|
|
|
77 |
# Check other course formats had not been reset
|
|
|
78 |
And I am on "<other> Course 1" course homepage with editing mode on
|
|
|
79 |
And I open "<other> forum name" actions menu
|
|
|
80 |
And "Move right" "link" in the "<other> forum name" "activity" should not be visible
|
|
|
81 |
And "Move left" "link" in the "<other> forum name" "activity" should be visible
|
|
|
82 |
|
|
|
83 |
Examples:
|
|
|
84 |
| format | prefix | other |
|
|
|
85 |
| Custom sections | Sections | Weekly |
|
|
|
86 |
| Weekly sections | Weekly | Sections |
|
|
|
87 |
|
|
|
88 |
Scenario Outline: Cancel course indentation reset
|
|
|
89 |
Given I navigate to "Plugins > Course formats > <format>" in site administration
|
|
|
90 |
And "Reset indentation sitewide" "link" should exist
|
|
|
91 |
When I click on "Reset indentation sitewide" "link"
|
|
|
92 |
And I should see "Reset indentation sitewide"
|
|
|
93 |
And "Reset indentation sitewide" "button" should exist
|
|
|
94 |
And "Cancel" "button" should exist
|
|
|
95 |
And I click on "Cancel" "button"
|
|
|
96 |
Then I should not see "Indentation reset."
|
|
|
97 |
And I am on "<prefix> Course 1" course homepage with editing mode on
|
|
|
98 |
And I open "<prefix> forum name" actions menu
|
|
|
99 |
And "Move right" "link" in the "<prefix> forum name" "activity" should not be visible
|
|
|
100 |
And "Move left" "link" in the "<prefix> forum name" "activity" should be visible
|
|
|
101 |
And I press the escape key
|
|
|
102 |
And I open "<prefix> database name" actions menu
|
|
|
103 |
And "Move right" "link" in the "<prefix> database name" "activity" should be visible
|
|
|
104 |
And "Move left" "link" in the "<prefix> database name" "activity" should not be visible
|
|
|
105 |
And I am on "<prefix> Course 2" course homepage with editing mode on
|
|
|
106 |
And I open "<prefix> wiki name" actions menu
|
|
|
107 |
And "Move right" "link" in the "<prefix> wiki name" "activity" should not be visible
|
|
|
108 |
And "Move left" "link" in the "<prefix> wiki name" "activity" should be visible
|
|
|
109 |
|
|
|
110 |
Examples:
|
|
|
111 |
| format | prefix |
|
|
|
112 |
| Custom sections | Sections |
|
|
|
113 |
| Weekly sections | Weekly |
|