[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/course/tests/behat/ -> activities_edit_name.feature (source)

   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    @javascript
   8    Scenario: Edit activity name in-place
   9      Given the following "users" exist:
  10        | username | firstname | lastname | email |
  11        | teacher1 | Teacher | 1 | teacher1@example.com |
  12      And the following "courses" exist:
  13        | fullname | shortname | format |
  14        | Course 1 | C1 | topics |
  15      And the following "course enrolments" exist:
  16        | user | course | role |
  17        | teacher1 | C1 | editingteacher |
  18      When I log in as "teacher1"
  19      And I follow "Course 1"
  20      And I turn editing mode on
  21      And I add a "Forum" to section "1" and I fill the form with:
  22        | Forum name | Test forum name |
  23        | Description | Test forum description |
  24      # Rename activity
  25      And I click on "Edit title" "link" in the "//div[contains(@class,'activityinstance') and contains(.,'Test forum name')]" "xpath_element"
  26      And I set the field "New name for activity Test forum name" to "Good news"
  27      And I press key "13" in the field "New name for activity Test forum name"
  28      Then I should not see "Test forum name" in the ".course-content" "css_element"
  29      And "New name for activity Test forum name" "field" should not exist
  30      And I should see "Good news"
  31      And I follow "Course 1"
  32      And I should see "Good news"
  33      And I should not see "Test forum name"
  34      # Cancel renaming
  35      And I click on "Edit title" "link" in the "//div[contains(@class,'activityinstance') and contains(.,'Good news')]" "xpath_element"
  36      And I set the field "New name for activity Good news" to "Terrible news"
  37      And I press key "27" in the field "New name for activity Good news"
  38      And "New name for activity Good news" "field" should not exist
  39      And I should see "Good news"
  40      And I should not see "Terrible news"
  41      And I follow "Course 1"
  42      And I should see "Good news"
  43      And I should not see "Terrible news"
  44      And I log out


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1