Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qtype @qtype_ddwtos @_switch_window
2
Feature: Preview a drag-drop into text question
3
  As a teacher
4
  In order to check my drag-drop into text questions will work for students
5
  I need to preview them
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username |
10
      | teacher  |
11
    And the following "courses" exist:
12
      | fullname | shortname | category |
13
      | Course 1 | C1        | 0        |
14
    And the following "course enrolments" exist:
15
      | user    | course | role           |
16
      | teacher | C1     | editingteacher |
17
    And the following "question categories" exist:
18
      | contextlevel | reference | name           |
19
      | Course       | C1        | Test questions |
20
    And the following "questions" exist:
1441 ariadna 21
      | questioncategory | qtype  | name                     | template |
22
      | Test questions   | ddwtos | Drag to text             | fox      |
23
      | Test questions   | ddwtos | Drag to text infinite    | infinite |
24
      | Test questions   | ddwtos | Drag to mathjax equation | mathjax  |
1 efrain 25
 
26
  @javascript @_bug_phantomjs
27
  Scenario: Preview a question using the mouse.
28
    When I am on the "Drag to text" "core_question > preview" page logged in as teacher
29
    And I should see "quick" in the home area of drag and drop into text question
30
    And I should see "slow" in the home area of drag and drop into text question
31
    And I drag "quick" to space "1" in the drag and drop into text question
32
    And I drag "fox" to space "2" in the drag and drop into text question
33
    And I drag "assiduous" to space "3" in the drag and drop into text question
34
    And I drag "slow" to placed drag "1" in the drag and drop into text question
35
    And I should see "quick" in the home area of drag and drop into text question
36
    And I drag "quick" to placed drag "1" in the drag and drop into text question
37
    And I should see "slow" in the home area of drag and drop into text question
38
    And I press "Submit and finish"
39
    Then the state of "The" question is shown as "Partially correct"
40
    And I should see "Mark 0.67 out of 1.00"
41
 
42
  @javascript
43
  Scenario: Preview a question using the keyboard & submit incomplete.
44
    When I am on the "Drag to text" "core_question > preview" page logged in as teacher
45
    And I type " " into space "1" in the drag and drop onto image question
46
    And I type "   " into space "2" in the drag and drop onto image question
47
    And I type " " into space "3" in the drag and drop onto image question
48
    And I press "Save"
49
    Then the state of "The" question is shown as "Incomplete answer"
50
    And I should see "Please put an answer in each box."
51
 
52
  @javascript
53
  Scenario: Preview a question using the keyboard.
54
    When I am on the "Drag to text" "core_question > preview" page logged in as teacher
55
    And I type "  " into space "1" in the drag and drop onto image question
56
    And I type "  " into space "2" in the drag and drop onto image question
57
    And I type "  " into space "3" in the drag and drop onto image question
58
    And I press "Submit and finish"
59
    Then the state of "The" question is shown as "Incorrect"
60
    And I should see "Mark 0.00 out of 1.00"
61
 
62
  @javascript
63
  Scenario: Preview a question that uses strange group numbers using the keyboard.
64
    Given the following "questions" exist:
65
      | questioncategory | qtype  | name         | template  |
66
      | Test questions   | ddwtos | Funny groups | oddgroups |
67
    When I am on the "Funny groups" "core_question > preview" page logged in as teacher
68
    And I type " " into space "1" in the drag and drop onto image question
69
    And I type " " into space "2" in the drag and drop onto image question
70
    And I type " " into space "3" in the drag and drop onto image question
71
    And I press "Submit and finish"
72
    Then the state of "The" question is shown as "Correct"
73
    And I should see "Mark 1.00 out of 1.00"
74
 
75
  @javascript
76
  Scenario: Preview a infinite question.
77
    When I am on the "Drag to text infinite" "core_question > preview" page logged in as teacher
78
    And I press "Fill in correct responses"
79
    Then I should see "Option1" in the home area of drag and drop into text question
80
    And I should see "Option2" in the home area of drag and drop into text question
81
    And I should see "Option3" in the home area of drag and drop into text question
1441 ariadna 82
 
83
  @javascript
84
  Scenario: Preview a drag-drop into text question with mathjax question.
85
    Given the "mathjaxloader" filter is "on"
86
    And the "mathjaxloader" filter applies to "content and headings"
87
    And I am on the "Drag to mathjax equation" "core_question > preview" page logged in as teacher
88
    And I press "Fill in correct responses"
89
    When I press "Submit and finish"
90
    Then ".filter_mathjaxloader_equation" "css_element" should exist in the ".draghome" "css_element"