MDL-48302 behat: Reverted temp fix added by MDL-48251
[moodle.git] / blocks / activity_modules / tests / behat / block_activity_modules.feature
CommitLineData
81ad5438 1@block @block_activity_modules
9842e231
MG
2Feature: Block activity modules
3 In order to overview activity modules in a course
4 As a manager
5 I can add activities block in a course or on the frontpage
6
7 Background:
8 Given I log in as "admin"
1f631c7c 9 And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
9842e231 10 And I click on "//a[@title=\"Show\"]" "xpath_element" in the "Feedback" "table_row"
9842e231
MG
11
12 Scenario: Add activities block on the frontpage
759b323e 13 Given the following "activities" exist:
9842e231
MG
14 | activity | name | intro | course | idnumber |
15 | assign | Frontpage assignment name | Frontpage assignment description | Acceptance test site | assign0 |
9842e231
MG
16 | book | Frontpage book name | Frontpage book description | Acceptance test site | book0 |
17 | chat | Frontpage chat name | Frontpage chat description | Acceptance test site | chat0 |
18 | choice | Frontpage choice name | Frontpage choice description | Acceptance test site | choice0 |
19 | data | Frontpage database name | Frontpage database description | Acceptance test site | data0 |
20 | feedback | Frontpage feedback name | Frontpage feedback description | Acceptance test site | feedback0 |
21 | forum | Frontpage forum name | Frontpage forum description | Acceptance test site | forum0 |
22 | label | Frontpage label name | Frontpage label description | Acceptance test site | label0 |
23 | lti | Frontpage lti name | Frontpage lti description | Acceptance test site | lti0 |
24 | page | Frontpage page name | Frontpage page description | Acceptance test site | page0 |
25 | quiz | Frontpage quiz name | Frontpage quiz description | Acceptance test site | quiz0 |
26 | resource | Frontpage resource name | Frontpage resource description | Acceptance test site | resource0 |
27 | imscp | Frontpage imscp name | Frontpage imscp description | Acceptance test site | imscp0 |
28 | folder | Frontpage folder name | Frontpage folder description | Acceptance test site | folder0 |
29 | glossary | Frontpage glossary name | Frontpage glossary description | Acceptance test site | glossary0 |
30 | scorm | Frontpage scorm name | Frontpage scorm description | Acceptance test site | scorm0 |
31 | lesson | Frontpage lesson name | Frontpage lesson description | Acceptance test site | lesson0 |
32 | survey | Frontpage survey name | Frontpage survey description | Acceptance test site | survey0 |
33 | url | Frontpage url name | Frontpage url description | Acceptance test site | url0 |
34 | wiki | Frontpage wiki name | Frontpage wiki description | Acceptance test site | wiki0 |
35 | workshop | Frontpage workshop name | Frontpage workshop description | Acceptance test site | workshop0 |
36
37 And I am on homepage
38 When I follow "Turn editing on"
39 And I add the "Activities" block
40 And I click on "Assignments" "link" in the "Activities" "block"
41 Then I should see "Frontpage assignment name"
42 And I am on homepage
9842e231
MG
43 And I click on "Chats" "link" in the "Activities" "block"
44 And I should see "Frontpage chat name"
45 And I am on homepage
46 And I click on "Choices" "link" in the "Activities" "block"
47 And I should see "Frontpage choice name"
48 And I am on homepage
49 And I click on "Databases" "link" in the "Activities" "block"
50 And I should see "Frontpage database name"
51 And I am on homepage
52 And I click on "Feedback" "link" in the "Activities" "block"
53 And I should see "Frontpage feedback name"
54 And I am on homepage
55 And I click on "Forums" "link" in the "Activities" "block"
56 And I should see "Frontpage forum name"
57 And I am on homepage
6887e2e5 58 And I click on "External tools" "link" in the "Activities" "block"
9842e231
MG
59 And I should see "Frontpage lti name"
60 And I am on homepage
61 And I click on "Quizzes" "link" in the "Activities" "block"
62 And I should see "Frontpage quiz name"
63 And I am on homepage
64 And I click on "Glossaries" "link" in the "Activities" "block"
65 And I should see "Frontpage glossary name"
66 And I am on homepage
67 And I click on "SCORM packages" "link" in the "Activities" "block"
68 And I should see "Frontpage scorm name"
69 And I am on homepage
70 And I click on "Lessons" "link" in the "Activities" "block"
71 And I should see "Frontpage lesson name"
72 And I am on homepage
73 And I click on "Wikis" "link" in the "Activities" "block"
74 And I should see "Frontpage wiki name"
75 And I am on homepage
76 And I click on "Workshop" "link" in the "Activities" "block"
77 And I should see "Frontpage workshop name"
78 And I am on homepage
79 And I click on "Resources" "link" in the "Activities" "block"
80 And I should see "Frontpage book name"
81 And I should see "Frontpage page name"
82 And I should see "Frontpage resource name"
83 And I should see "Frontpage imscp name"
84 And I should see "Frontpage folder name"
85 And I should see "Frontpage url name"
86
87 Scenario: Add activities block in a course
759b323e 88 Given the following "courses" exist:
9842e231
MG
89 | fullname | shortname | format |
90 | Course 1 | C1 | topics |
759b323e 91 And the following "activities" exist:
9842e231
MG
92 | activity | name | intro | course | idnumber |
93 | assign | Test assignment name | Test assignment description | C1 | assign1 |
9842e231 94 | book | Test book name | Test book description | C1 | book1 |
7b9fb265 95 | chat | Test chat name | Test chat description | C1 | chat1 |
8d85156d 96 | choice | Test choice name | Test choice description | C1 | choice1 |
9842e231
MG
97 | data | Test database name | Test database description | C1 | data1 |
98 | feedback | Test feedback name | Test feedback description | C1 | feedback1 |
99 | folder | Test folder name | Test folder description | C1 | folder1 |
100 | forum | Test forum name | Test forum description | C1 | forum1 |
101 | glossary | Test glossary name | Test glossary description | C1 | glossary1 |
102 | imscp | Test imscp name | Test imscp description | C1 | imscp1 |
103 | label | Test label name | Test label description | C1 | label1 |
104 | lesson | Test lesson name | Test lesson description | C1 | lesson1 |
105 | lti | Test lti name | Test lti description | C1 | lti1 |
106 | page | Test page name | Test page description | C1 | page1 |
107 | quiz | Test quiz name | Test quiz description | C1 | quiz1 |
108 | resource | Test resource name | Test resource description | C1 | resource1 |
109 | scorm | Test scorm name | Test scorm description | C1 | scorm1 |
110 | survey | Test survey name | Test survey description | C1 | survey1 |
111 | url | Test url name | Test url description | C1 | url1 |
112 | wiki | Test wiki name | Test wiki description | C1 | wiki1 |
113 | workshop | Test workshop name | Test workshop description | C1 | workshop1 |
114
115 When I follow "Courses"
116 And I follow "Course 1"
117 And I turn editing mode on
118 And I add the "Activities" block
119 And I click on "Assignments" "link" in the "Activities" "block"
120 Then I should see "Test assignment name"
121 And I follow "Course 1"
9842e231
MG
122 And I click on "Chats" "link" in the "Activities" "block"
123 And I should see "Test chat name"
124 And I follow "Course 1"
125 And I click on "Choices" "link" in the "Activities" "block"
126 And I should see "Test choice name"
127 And I follow "Course 1"
128 And I click on "Databases" "link" in the "Activities" "block"
129 And I should see "Test database name"
130 And I follow "Course 1"
131 And I click on "Feedback" "link" in the "Activities" "block"
132 And I should see "Test feedback name"
133 And I follow "Course 1"
134 And I click on "Forums" "link" in the "Activities" "block"
135 And I should see "Test forum name"
136 And I follow "Course 1"
6887e2e5 137 And I click on "External tools" "link" in the "Activities" "block"
9842e231
MG
138 And I should see "Test lti name"
139 And I follow "Course 1"
140 And I click on "Quizzes" "link" in the "Activities" "block"
141 And I should see "Test quiz name"
142 And I follow "Course 1"
143 And I click on "Glossaries" "link" in the "Activities" "block"
144 And I should see "Test glossary name"
145 And I follow "Course 1"
146 And I click on "SCORM packages" "link" in the "Activities" "block"
147 And I should see "Test scorm name"
148 And I follow "Course 1"
149 And I click on "Lessons" "link" in the "Activities" "block"
150 And I should see "Test lesson name"
151 And I follow "Course 1"
152 And I click on "Wikis" "link" in the "Activities" "block"
153 And I should see "Test wiki name"
154 And I follow "Course 1"
155 And I click on "Workshop" "link" in the "Activities" "block"
156 And I should see "Test workshop name"
157 And I follow "Course 1"
158 And I click on "Resources" "link" in the "Activities" "block"
159 And I should see "Test book name"
160 And I should see "Test page name"
161 And I should see "Test resource name"
162 And I should see "Test imscp name"
163 And I should see "Test folder name"
164 And I should see "Test url name"