Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qtype @qtype_multichoice
2
Feature: Clear my answers
3
  As a student
4
  In order to reset Multiple choice ansers
5
  I need to clear my choice
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username |
10
      | student  |
11
    And the following "course" exists:
12
      | fullname  | Course 1  |
13
      | shortname | C1        |
14
      | category  | 0         |
15
    And the following "course enrolments" exist:
16
      | user    | course | role    |
17
      | student | C1     | student |
18
    And the following "question category" exists:
19
      | contextlevel  | Course          |
20
      | reference     | C1              |
21
      | name          | Test questions  |
22
    And the following "question" exists:
23
      |  questioncategory  |  Test questions    |
24
      |  qtype             |  multichoice       |
25
      |  name              |  Multi-choice-001  |
26
      |  template          |  one_of_four       |
27
      |  questiontext      |  Question One      |
28
    And the following "activity" exists:
29
      |  activity            |  quiz                |
30
      |  name                |  Quiz 1              |
31
      |  intro               |  Quiz 1 description  |
32
      |  course              |  C1                  |
33
      |  idnumber            |  quiz1               |
34
      |  preferredbehaviour  |  immediatefeedback   |
35
      |  canredoquestions    |  1                   |
36
    And quiz "Quiz 1" contains the following questions:
37
      | question         | page |
38
      | Multi-choice-001 | 1    |
39
 
40
  @javascript
41
  Scenario: Attempt a quiz and reset my chosen answer.
42
    Given I am on the "Quiz 1" "quiz activity" page logged in as student
43
    When I press "Attempt quiz"
44
    And I should see "Question One"
45
    And I click on "Four" "qtype_multichoice > Answer" in the "Question One" "question"
46
    And I should see "Clear my choice"
47
    And I click on "Clear my choice" "button" in the "Question One" "question"
48
    Then I should not see "Clear my choice"
49
    And I click on "Check" "button" in the "Question One" "question"
50
    And I should see "Please select an answer" in the "Question One" "question"
51
 
52
  @javascript
53
  Scenario: Attempt a quiz and revisit a cleared answer.
54
    Given I am on the "Quiz 1" "quiz activity" page logged in as student
55
    When I press "Attempt quiz"
56
    And I should see "Question One"
57
    And I click on "Four" "qtype_multichoice > Answer" in the "Question One" "question"
58
    And I follow "Finish attempt ..."
59
    And I click on "Return to attempt" "button"
60
    And I click on "Clear my choice" "button" in the "Question One" "question"
61
    And I follow "Finish attempt ..."
62
    And I click on "Return to attempt" "button"
63
    Then I should not see "Clear my choice"