[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/question/tests/behat/ -> edit_questions.feature (source)

   1  @core @core_question
   2  Feature: A teacher can edit questions in the question bank
   3    In order to refine questions contents
   4    As a teacher
   5    I need to edit questions
   6  
   7    @javascript @_switch_window
   8    Scenario: Edit a previously created question
   9      Given the following "users" exist:
  10        | username | firstname | lastname | email |
  11        | teacher1 | Teacher | 1 | [email protected] |
  12      And the following "courses" exist:
  13        | fullname | shortname | format |
  14        | Course 1 | C1 | weeks |
  15      And the following "course enrolments" exist:
  16        | user | course | role |
  17        | teacher1 | C1 | editingteacher |
  18      And I log in as "admin"
  19      And I follow "Course 1"
  20      And I add a "Essay" question filling the form with:
  21        | Question name | Test question to be edited |
  22        | Question text | Write about whatever you want |
  23      And I log out
  24      And I log in as "teacher1"
  25      And I follow "Course 1"
  26      And I follow "Question bank"
  27      When I click on "Edit" "link" in the "Test question to be edited" "table_row"
  28      And I set the following fields to these values:
  29        | Question name | Edited question name |
  30        | Question text | Write a lot about what you want |
  31      And I press "id_submitbutton"
  32      Then I should see "Edited question name"
  33      And I should not see "Test question to be edited"
  34      And I should see "Admin User" in the ".categoryquestionscontainer tbody .creatorname" "css_element"
  35      And I should see "Teacher 1" in the ".categoryquestionscontainer tbody .modifiername" "css_element"
  36      And I click on "Edit" "link" in the "Edited question name" "table_row"
  37      And the field "Question name" matches value "Edited question name"
  38      And I press "Cancel"
  39      And I click on "Preview" "link" in the "Edited question name" "table_row"
  40      And I switch to "questionpreview" window
  41      And I should see "Edited question name"
  42      And I should see "Write a lot about what you want"
  43      And I switch to the main window


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1