1 |
efrain |
1 |
@format @format_topics
|
|
|
2 |
Feature: Sections can be highlighted
|
|
|
3 |
In order to mark sections
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to highlight and unhighlight sections
|
|
|
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 "course" exists:
|
|
|
12 |
| fullname | Course 1 |
|
|
|
13 |
| shortname | C1 |
|
|
|
14 |
| format | topics |
|
|
|
15 |
| coursedisplay | 0 |
|
|
|
16 |
| numsections | 5 |
|
|
|
17 |
| initsections | 1 |
|
|
|
18 |
And the following "activities" exist:
|
|
|
19 |
| activity | name | intro | course | idnumber | section |
|
|
|
20 |
| assign | Test assignment name | Test assignment description | C1 | assign1 | 0 |
|
|
|
21 |
| book | Test book name | Test book description | C1 | book1 | 1 |
|
|
|
22 |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 | 4 |
|
|
|
23 |
| choice | Test choice name | Test choice description | C1 | choice1 | 5 |
|
|
|
24 |
And the following "course enrolments" exist:
|
|
|
25 |
| user | course | role |
|
|
|
26 |
| teacher1 | C1 | editingteacher |
|
|
|
27 |
And I log in as "teacher1"
|
|
|
28 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
29 |
|
|
|
30 |
@javascript
|
|
|
31 |
Scenario: Highlight a section
|
|
|
32 |
When I open section "2" edit menu
|
|
|
33 |
And I click on "Highlight" "link" in the "Section 2" "section"
|
|
|
34 |
Then I should see "Highlighted" in the "Section 2" "section"
|
|
|
35 |
|
|
|
36 |
@javascript
|
|
|
37 |
Scenario: Highlight a section when another section is already highlighted
|
|
|
38 |
Given I open section "3" edit menu
|
|
|
39 |
And I click on "Highlight" "link" in the "Section 3" "section"
|
|
|
40 |
And I should see "Highlighted" in the "Section 3" "section"
|
|
|
41 |
When I open section "2" edit menu
|
|
|
42 |
And I click on "Highlight" "link" in the "Section 2" "section"
|
|
|
43 |
Then I should see "Highlighted" in the "Section 2" "section"
|
|
|
44 |
And I should not see "Highlighted" in the "Section 3" "section"
|
|
|
45 |
|
|
|
46 |
@javascript
|
|
|
47 |
Scenario: Unhighlight a section
|
|
|
48 |
Given I open section "3" edit menu
|
|
|
49 |
And I click on "Highlight" "link" in the "Section 3" "section"
|
|
|
50 |
And I should see "Highlighted" in the "Section 3" "section"
|
|
|
51 |
When I open section "3" edit menu
|
|
|
52 |
And I click on "Unhighlight" "link" in the "Section 3" "section"
|
|
|
53 |
Then I should not see "Highlighted" in the "Section 3" "section"
|