Proyectos de Subversion Moodle

Rev

| 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"
29
    And "Insert an activity or resource before 'Test Forum'" "button" should not be visible
30
    When I hover "Insert an activity or resource before 'Test Forum'" "button"
31
    Then "Insert an activity or resource before 'Test Forum'" "button" should be visible
32
 
33
  Scenario: The activity chooser can be used to insert modules before existing modules
34
    Given I hover "Insert an activity or resource before 'Test Forum'" "button"
35
    And I press "Insert an activity or resource before 'Test Forum'"
36
    And I should see "Add an activity or resource" in the ".modal-title" "css_element"
37
    When I click on "Add a new Assignment" "link" in the "Add an activity or resource" "dialogue"
38
    And I set the following fields to these values:
39
      | Assignment name | Test Assignment |
40
    And I press "Save and return to course"
41
    And I should see "Test Assignment" in the "New section" "section"
42
    # Ensure the new assignment is in the middle of the two existing modules.
43
    Then "Test Page" "text" should appear before "Test Assignment" "text"
44
    And "Test Assignment" "text" should appear before "Test Forum" "text"