[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

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

   1  @core @core_question
   2  Feature: A teacher can delete questions in the question bank
   3    In order to remove unused questions from the question bank
   4    As a teacher
   5    I need to delete questions
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher1 | Teacher | 1 | [email protected] |
  11      And the following "courses" exist:
  12        | fullname | shortname | format |
  13        | Course 1 | C1 | weeks |
  14      And the following "course enrolments" exist:
  15        | user | course | role |
  16        | teacher1 | C1 | editingteacher |
  17      And I log in as "teacher1"
  18      And I follow "Course 1"
  19  
  20    @javascript
  21    Scenario: Delete a question not used in a quiz
  22      And I navigate to "Questions" node in "Course administration > Question bank"
  23      And I add a "Essay" question filling the form with:
  24        | Question name | Test question to be deleted   |
  25        | Question text | Write about whatever you want |
  26      And I click on "Delete" "link" in the "Test question to be deleted" "table_row"
  27      When I press "Continue"
  28      Then I should not see "Test question to be deleted"
  29  
  30    @javascript
  31    Scenario: Delete a question used in a quiz
  32      Given I turn editing mode on
  33      And I add a "Quiz" to section "1" and I fill the form with:
  34        | Name | Test quiz |
  35      And I add a "True/False" question to the "Test quiz" quiz with:
  36        | Question name | Test question to be deleted   |
  37        | Question text | Write about whatever you want |
  38      And I navigate to "Questions" node in "Course administration > Question bank"
  39      And I click on "Delete" "link" in the "Test question to be deleted" "table_row"
  40      When I press "Continue"
  41      Then I should not see "Test question to be deleted"
  42      And I click on "Also show old questions" "checkbox"
  43      And I should see "Test question to be deleted"
  44      And I follow "Course 1"
  45      And I follow "Test quiz"
  46      And I click on "Preview quiz now" "button"
  47      And I should see "Write about whatever you want"


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