Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course
2
Feature: Edit activity name in-place
3
  In order to quickly edit activity name
4
  As a teacher
5
  I need to use inplace editing
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 "courses" exist:
12
      | fullname | shortname | format |
13
      | Course 1 | C1 | topics |
14
    And the following "course enrolments" exist:
15
      | user | course | role |
16
      | teacher1 | C1 | editingteacher |
17
    And the following "activity" exists:
18
      | course      | C1                     |
19
      | activity    | forum                  |
20
      | name        | Test forum name        |
21
      | idnumber    | forum1                 |
22
 
23
  @javascript
24
  Scenario: Edit activity name in-place
25
    When I log in as "teacher1"
26
    And I am on "Course 1" course homepage with editing mode on
27
    # Rename activity
28
    And I set the field "Edit title" in the "Test forum name" "activity" to "Good news"
29
    Then I should not see "Test forum name" in the ".course-content" "css_element"
30
    And "New name for activity Test forum name" "field" should not exist
31
    And I should see "Good news"
32
    And I am on "Course 1" course homepage
33
    And I should see "Good news"
34
    And I should not see "Test forum name"
35
    # Cancel renaming
36
    And I click on "Edit title" "link" in the "[data-value='Good news']" "css_element"
37
    And I type "Terrible news"
38
    And I press the escape key
39
    And "New name for activity Good news" "field" should not exist
40
    And I should see "Good news"
41
    And I should not see "Terrible news"
42
    And I am on "Course 1" course homepage
43
    And I should see "Good news"
44
    And I should not see "Terrible news"
45
 
46
  @javascript
47
  Scenario: Edit activity name in-place ensuring correct encoding
48
    When I log in as "teacher1"
49
    And I am on "Course 1" course homepage with editing mode on
50
    And I set the field "Edit title" in the "Test forum name" "activity" to "Good & bad news"
51
    Then I should not see "Test forum name" in the ".course-content" "css_element"
52
    And I should see "Good & bad news" in the ".course-content" "css_element"