Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course @javascript
2
Feature: Use the activity chooser to insert activities anywhere in a section
3
  In order to add activities to a course
4
  As a teacher
5
  I should be able to add an activity anywhere in a section.
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username  | firstname | lastname  | email               |
10
      | teacher   | Teacher   | 1         | teacher@example.com |
11
    And the following "course" exists:
12
      | fullname    | Course |
13
      | shortname   | C      |
14
      | format      | topics |
15
      | numsections | 1      |
16
    And the following "course enrolments" exist:
17
      | user      | course  | role            |
18
      | teacher   | C       | editingteacher  |
19
    And the following "activities" exist:
20
      | activity  | course | idnumber | intro | name        | section  |
21
      | page      | C      | p1       | x     | Test Page   | 1        |
22
      | forum     | C      | f1       | x     | Test Forum  | 1        |
23
      | label     | C      | l1       | x     | Test Label  | 1        |
24
    And I log in as "teacher"
25
    And I am on "Course" course homepage with editing mode on
26
 
27
  Scenario: The activity chooser icon is hidden by default and be made visible on hover
28
    Given I hover ".navbar-brand" "css_element"
1441 ariadna 29
    And "Insert content before 'Test Forum'" "button" should not be visible
30
    When I hover "Insert content before 'Test Forum'" "button"
31
    Then "Insert content before 'Test Forum'" "button" should be visible
32
    And I hover "Insert content in section 'New section'" "button"
33
    Then "Insert content in section 'New section'" "button" should be visible
1 efrain 34
 
35
  Scenario: The activity chooser can be used to insert modules before existing modules
1441 ariadna 36
    Given I change window size to "large"
37
    And I hover "Insert content before 'Test Forum'" "button"
38
    And I press "Insert content before 'Test Forum'"
39
    And I click on "Activity or resource" "button" in the ".dropdown-menu.show" "css_element"
1 efrain 40
    When I click on "Add a new Assignment" "link" in the "Add an activity or resource" "dialogue"
41
    And I set the following fields to these values:
42
      | Assignment name | Test Assignment |
43
    And I press "Save and return to course"
44
    And I should see "Test Assignment" in the "New section" "section"
45
    # Ensure the new assignment is in the middle of the two existing modules.
46
    Then "Test Page" "text" should appear before "Test Assignment" "text"
47
    And "Test Assignment" "text" should appear before "Test Forum" "text"