Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course @core_courseformat
2
Feature: Move activity using keyboard
3
  In order to move activities without a mouse
4
  As a user
5
  I need to select the activity 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 activity to another section selecting the section name
26
    Given I open "Activity sample 3" actions menu
27
    And I click on "Move" "link" in the "Activity sample 3" activity
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 2.
32
    And I press the down key
33
    And I press the down key
34
    And I press enter
35
    Then I should see "Activity sample 3" in the "Section 2" "section"
36
 
37
  @javascript
38
  Scenario: Move activity to another section selecting an inner activity
39
    Given I open "Activity sample 3" actions menu
40
    And I click on "Move" "link" in the "Activity sample 3" activity
41
    # Focus on the modal content tree.
42
    When I press the tab key
43
    And I press the tab key
44
    # Open section 2.
45
    And I press the down key
46
    And I press the down key
47
    And I press the right key
48
    # Select first activity.
49
    And I press the down key
50
    And I press enter
51
    Then I should see "Activity sample 3" in the "Section 2" "section"
52
 
53
  @javascript
54
  Scenario: Close a section in the move modal
55
    Given I open "Activity sample 3" actions menu
56
    And I click on "Move" "link" in the "Activity sample 3" activity
57
    And I should see "Activity sample 3" in the ".modal-body" "css_element"
58
    # Focus on the modal content tree.
59
    When I press the tab key
60
    And I press the tab key
61
    # Close section 3.
62
    And I press the down key
63
    And I press the down key
64
    And I press the down key
65
    And I press the left key
66
    # Move to section 4.
67
    And I press the down key
68
    And I press enter
69
    Then I should see "Activity sample 3" in the "Section 4" "section"
70
 
71
  @javascript
72
  Scenario: Move activity using open all sections
73
    Given I open "Activity sample 3" actions menu
74
    And I click on "Move" "link" in the "Activity sample 3" activity
75
    And I should see "Activity sample 3" in the ".modal-body" "css_element"
76
    # Focus on the modal content tree.
77
    When I press the tab key
78
    And I press the tab key
79
    # Open all sections.
80
    And I press the multiply key
81
    # Move down to section 4
82
    And I press the down key
83
    And I press the down key
84
    And I press the down key
85
    And I press the down key
86
    And I press the down key
87
    And I press the down key
88
    And I press the down key
89
    And I press the down key
90
    And I press enter
91
    Then I should see "Activity sample 3" in the "Section 4" "section"
92
 
93
  @javascript
94
  Scenario: Move activity using go to the last element
95
    Given I open "Activity sample 3" actions menu
96
    And I click on "Move" "link" in the "Activity sample 3" activity
97
    # Focus on the modal content tree.
98
    When I press the tab key
99
    And I press the tab key
100
    # Go to the last section.
101
    And I press the end key
102
    # Move down to section 4
103
    And I press enter
104
    Then I should see "Activity sample 3" in the "Section 4" "section"
105
 
106
  @javascript
107
  Scenario: Move activity using go to the first element
108
    Given I open "Activity sample 3" actions menu
109
    And I click on "Move" "link" in the "Activity sample 3" activity
110
    And I should see "Activity sample 3" in the ".modal-body" "css_element"
111
    # Focus on the modal content tree.
112
    When I press the tab key
113
    And I press the tab key
114
    # Move some sections down.
115
    And I press the down key
116
    And I press the down key
117
    And I press the down key
118
    # Go to the first section.
119
    And I press the home key
120
    # Move down to general section
121
    And I press enter
122
    Then I should see "Activity sample 3" in the "General" "section"