1 |
efrain |
1 |
@core @core_course
|
|
|
2 |
Feature: Site home activities section
|
|
|
3 |
In order to show a display activities in the frontpage
|
|
|
4 |
As an admin
|
|
|
5 |
I need to edit the frontpage section
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following config values are set as admin:
|
|
|
9 |
| numsections | 1 |
|
|
|
10 |
|
|
|
11 |
Scenario: Activities should appear in frontpage
|
|
|
12 |
Given the following "activities" exist:
|
|
|
13 |
| activity | course | section | name | intro | idnumber |
|
|
|
14 |
| assign | Acceptance test site | 1 | Frontpage assignment | Assignment description | assign0 |
|
|
|
15 |
When I log in as "admin"
|
|
|
16 |
And I am on site homepage
|
|
|
17 |
Then I should see "Frontpage assignment" in the "region-main" "region"
|
|
|
18 |
|
|
|
19 |
@javascript
|
|
|
20 |
Scenario: Section name does appears in frontpage
|
|
|
21 |
Given the following "activities" exist:
|
|
|
22 |
| activity | course | section | name | intro | idnumber |
|
|
|
23 |
| assign | Acceptance test site | 1 | Frontpage assignment | Assignment description | assign0 |
|
|
|
24 |
And I log in as "admin"
|
|
|
25 |
And I am on site homepage
|
|
|
26 |
And I turn editing mode on
|
|
|
27 |
And I click on "Edit" "link" in the "region-main" "region"
|
|
|
28 |
And I set the field "Section name" to "New section name"
|
|
|
29 |
When I press "Save changes"
|
|
|
30 |
And I should see "New section name" in the "region-main" "region"
|
|
|
31 |
Then I turn editing mode off
|
|
|
32 |
And I should see "New section name" in the "region-main" "region"
|
|
|
33 |
|
|
|
34 |
@javascript
|
|
|
35 |
Scenario: Section description appears in the frontpage
|
|
|
36 |
Given I log in as "admin"
|
|
|
37 |
And I am on site homepage
|
|
|
38 |
And I turn editing mode on
|
|
|
39 |
And I click on "Edit" "link" in the "region-main" "region"
|
|
|
40 |
And I set the field "Description" to "New section description"
|
|
|
41 |
When I press "Save changes"
|
|
|
42 |
And I should see "New section description" in the "region-main" "region"
|
|
|
43 |
Then I turn editing mode off
|
|
|
44 |
And I should see "New section description" in the "region-main" "region"
|
1441 |
ariadna |
45 |
|
|
|
46 |
@javascript
|
|
|
47 |
Scenario: Admin can change the activity visibility in the frontpage
|
|
|
48 |
Given the following config values are set as admin:
|
|
|
49 |
| allowstealth | 1 |
|
|
|
50 |
And the following "activities" exist:
|
|
|
51 |
| activity | course | section | name | intro | idnumber |
|
|
|
52 |
| assign | Acceptance test site | 1 | Frontpage assignment | Assignment description | assign0 |
|
|
|
53 |
When I log in as "admin"
|
|
|
54 |
And I am on site homepage
|
|
|
55 |
And I turn editing mode on
|
|
|
56 |
And I should see "Frontpage assignment" in the "region-main" "region"
|
|
|
57 |
Then I open "Frontpage assignment" actions menu
|
|
|
58 |
And I choose "Availability > Make available but don't show on course page" in the open action menu
|
|
|
59 |
And I should see "Available but not shown on course page" in the "Frontpage assignment" "core_courseformat > Activity visibility"
|
|
|
60 |
And I open "Frontpage assignment" actions menu
|
|
|
61 |
And I choose "Availability > Show on course page" in the open action menu
|
|
|
62 |
And I should not see "Available but not shown on course page" in the "Frontpage assignment" "activity"
|
|
|
63 |
And I should not see "Hidden from students" in the "Frontpage assignment" "activity"
|
|
|
64 |
And I open "Frontpage assignment" actions menu
|
|
|
65 |
And I choose "Availability > Hide on course page" in the open action menu
|
|
|
66 |
And I should not see "Available but not shown on course page" in the "Frontpage assignment" "activity"
|
|
|
67 |
And I should see "Hidden from students" in the "Frontpage assignment" "core_courseformat > Activity visibility"
|
|
|
68 |
|
|
|
69 |
@javascript
|
|
|
70 |
Scenario: Admin can delete an activity in the frontpage
|
|
|
71 |
Given the following "activities" exist:
|
|
|
72 |
| activity | course | section | name | intro | idnumber |
|
|
|
73 |
| assign | Acceptance test site | 1 | Frontpage assignment | Assignment description | assign0 |
|
|
|
74 |
When I log in as "admin"
|
|
|
75 |
And I am on site homepage
|
|
|
76 |
And I turn editing mode on
|
|
|
77 |
And I should see "Frontpage assignment" in the "region-main" "region"
|
|
|
78 |
Then I open "Frontpage assignment" actions menu
|
|
|
79 |
And I choose "Delete" in the open action menu
|
|
|
80 |
And I click on "Delete" "button" in the "Delete activity?" "dialogue"
|
|
|
81 |
And I should not see "Frontpage assignment" in the "region-main" "region"
|
|
|
82 |
|
|
|
83 |
@javascript
|
|
|
84 |
Scenario: Admin can duplicate an activity in the frontpage
|
|
|
85 |
Given the following "activities" exist:
|
|
|
86 |
| activity | course | section | name | intro | idnumber |
|
|
|
87 |
| assign | Acceptance test site | 1 | Frontpage assignment | Assignment description | assign0 |
|
|
|
88 |
When I log in as "admin"
|
|
|
89 |
And I am on site homepage
|
|
|
90 |
And I turn editing mode on
|
|
|
91 |
And I should see "Frontpage assignment" in the "region-main" "region"
|
|
|
92 |
Then I open "Frontpage assignment" actions menu
|
|
|
93 |
And I choose "Duplicate" in the open action menu
|
|
|
94 |
And I should see "Frontpage assignment (copy)" in the "region-main" "region"
|
|
|
95 |
|
|
|
96 |
@javascript
|
|
|
97 |
Scenario: Admin can move an activity lefts and right in the frontpage
|
|
|
98 |
Given the following "activities" exist:
|
|
|
99 |
| activity | course | section | name | intro | idnumber |
|
|
|
100 |
| assign | Acceptance test site | 1 | Frontpage assignment | Assignment description | assign0 |
|
|
|
101 |
| assign | Acceptance test site | 1 | Frontpage assignment | Assignment description | assign1 |
|
|
|
102 |
And I log in as "admin"
|
|
|
103 |
And I am on site homepage
|
|
|
104 |
And I turn editing mode on
|
|
|
105 |
And I should see "Frontpage assignment" in the "region-main" "region"
|
|
|
106 |
When I open "Frontpage assignment" actions menu
|
|
|
107 |
And "Move right" "link" should be visible
|
|
|
108 |
And "Move left" "link" should not be visible
|
|
|
109 |
And I choose "Move right" in the open action menu
|
|
|
110 |
Then I open "Frontpage assignment" actions menu
|
|
|
111 |
And "Move right" "link" should not be visible
|
|
|
112 |
And "Move left" "link" should be visible
|
|
|
113 |
And I choose "Move left" in the open action menu
|
|
|
114 |
And I open "Frontpage assignment" actions menu
|
|
|
115 |
And "Move right" "link" should be visible
|
|
|
116 |
And "Move left" "link" should not be visible
|