1 |
efrain |
1 |
@core @core_course
|
|
|
2 |
Feature: Display activity and resource description
|
|
|
3 |
In order to display activity and resource description
|
|
|
4 |
As teacher
|
|
|
5 |
I should be able to enable "Display description on course page"
|
|
|
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 |
|
|
|
13 |
| Course 1 | C1 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
|
|
|
18 |
Scenario Outline: Display activity and resource descriptions
|
|
|
19 |
Given I enable "chat" "mod" plugin
|
|
|
20 |
And I enable "survey" "mod" plugin
|
|
|
21 |
# Generate activity/resource with description
|
|
|
22 |
And the following "activities" exist:
|
|
|
23 |
| activity | course | name | intro | showdescription |
|
|
|
24 |
| <acttype> | C1 | <actname> | <actname> intro | 1 |
|
|
|
25 |
When I am on the "Course 1" course page logged in as teacher1
|
|
|
26 |
# Confirm that activity name and description are displayed
|
|
|
27 |
Then I should see "<actname>" in the "region-main" "region"
|
|
|
28 |
And I should see "<actname> intro" in the "region-main" "region"
|
|
|
29 |
|
|
|
30 |
Examples:
|
|
|
31 |
| acttype | actname |
|
|
|
32 |
| assign | Assign 1 |
|
|
|
33 |
| book | Book 1 |
|
|
|
34 |
| chat | Chat 1 |
|
|
|
35 |
| data | Database 1 |
|
|
|
36 |
| feedback | Feedback 1 |
|
|
|
37 |
| forum | Forum 1 |
|
|
|
38 |
| label | Label 1 |
|
|
|
39 |
| lti | LTI 1 |
|
|
|
40 |
| page | Page 1 |
|
|
|
41 |
| quiz | Quiz 1 |
|
|
|
42 |
| resource | Resource 1 |
|
|
|
43 |
| imscp | IMSCP 1 |
|
|
|
44 |
| folder | Folder 1 |
|
|
|
45 |
| glossary | Glossary 1 |
|
|
|
46 |
| scorm | Scorm 1 |
|
|
|
47 |
| lesson | Lesson 1 |
|
|
|
48 |
| survey | Survey 1 |
|
|
|
49 |
| url | URL 1 |
|
|
|
50 |
| wiki | Wiki 1 |
|
|
|
51 |
| workshop | Workshop 1 |
|
|
|
52 |
|
|
|
53 |
Scenario: Display url activity description with pop-up display
|
|
|
54 |
# Generate url activity with description and popup appearance
|
|
|
55 |
Given the following "activities" exist:
|
|
|
56 |
| activity | course | name | intro | showdescription | display | popupwidth | popupheight |
|
|
|
57 |
| url | C1 | URL 1 | URL 1 intro | 1 | 6 | 620 | 450 |
|
|
|
58 |
When I am on the "Course 1" course page logged in as teacher1
|
|
|
59 |
# Confirm that activity name and description are displayed
|
|
|
60 |
Then I should see "URL 1" in the "region-main" "region"
|
|
|
61 |
And I should see "URL 1 intro" in the "region-main" "region"
|
|
|
62 |
|
|
|
63 |
Scenario: Display activity with image description
|
|
|
64 |
# Generate page activity with image embedded in description
|
|
|
65 |
Given the following "activities" exist:
|
|
|
66 |
| activity | course | name | intro | showdescription |
|
|
|
67 |
| page | C1 | Page 1 | Page 1 intro with image: <img src="http://download.moodle.org/unittest/test.jpg"> | 1 |
|
|
|
68 |
When I am on the "Course 1" course page logged in as teacher1
|
|
|
69 |
# Confirm that activity name and description are displayed
|
|
|
70 |
Then I should see "Page 1" in the "region-main" "region"
|
|
|
71 |
And I should see "Page 1 intro with image:" in the "region-main" "region"
|
|
|
72 |
# Confirm that image element exists
|
|
|
73 |
And "//img[contains(@src, 'http://download.moodle.org/unittest/test.jpg')]" "xpath_element" should exist in the "region-main" "region"
|