1 |
efrain |
1 |
@core @core_course @core_courseformat
|
|
|
2 |
Feature: Move a section using keyboard
|
|
|
3 |
In order to move sections without a mouse
|
|
|
4 |
As a user
|
|
|
5 |
I need to select the section destination with the keyboard.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "course" exists:
|
|
|
9 |
| fullname | Course 1 |
|
|
|
10 |
| shortname | C1 |
|
|
|
11 |
| category | 0 |
|
|
|
12 |
| enablecompletion | 1 |
|
|
|
13 |
| numsections | 4 |
|
|
|
14 |
| initsections | 1 |
|
|
|
15 |
And the following "activities" exist:
|
|
|
16 |
| activity | name | intro | course | idnumber | section |
|
|
|
17 |
| assign | Activity sample 1 | Test assignment description | C1 | sample1 | 1 |
|
|
|
18 |
| book | Activity sample 2 | | C1 | sample2 | 2 |
|
|
|
19 |
| choice | Activity sample 3 | Test choice description | C1 | sample3 | 3 |
|
|
|
20 |
| choice | Other sample 3 | Test choice description | C1 | sample31 | 3 |
|
|
|
21 |
And I log in as "admin"
|
|
|
22 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
23 |
|
|
|
24 |
@javascript
|
|
|
25 |
Scenario: Move section above another section
|
|
|
26 |
Given I open section "3" edit menu
|
|
|
27 |
And I click on "Move" "link" in the "Section 3" "section"
|
|
|
28 |
# Focus on the modal content tree.
|
|
|
29 |
When I press the tab key
|
|
|
30 |
And I press the tab key
|
|
|
31 |
# Select the section 1.
|
|
|
32 |
And I press the down key
|
|
|
33 |
And I press enter
|
|
|
34 |
Then "Section 2" "section" should appear after "Section 3" "section"
|
|
|
35 |
|
|
|
36 |
@javascript
|
|
|
37 |
Scenario: Move section using go to the last element
|
|
|
38 |
Given I open section "2" edit menu
|
|
|
39 |
And I click on "Move" "link" in the "Section 2" "section"
|
|
|
40 |
# Focus on the modal content tree.
|
|
|
41 |
When I press the tab key
|
|
|
42 |
And I press the tab key
|
|
|
43 |
# Go to the last section.
|
|
|
44 |
And I press the end key
|
|
|
45 |
# Move down to section 4
|
|
|
46 |
And I press enter
|
|
|
47 |
Then "Section 2" "section" should appear after "Section 4" "section"
|
|
|
48 |
|
|
|
49 |
@javascript
|
|
|
50 |
Scenario: Move section using go to the first element
|
|
|
51 |
Given I open section "3" edit menu
|
|
|
52 |
And I click on "Move" "link" in the "Section 3" "section"
|
|
|
53 |
# Focus on the modal content tree.
|
|
|
54 |
When I press the tab key
|
|
|
55 |
And I press the tab key
|
|
|
56 |
# Move some sections down.
|
|
|
57 |
And I press the down key
|
|
|
58 |
And I press the down key
|
|
|
59 |
And I press the down key
|
|
|
60 |
# Go to the first section.
|
|
|
61 |
And I press the home key
|
|
|
62 |
And I press enter
|
|
|
63 |
Then "Section 1" "section" should appear after "Section 3" "section"
|