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_ddimageortext @_switch_window
2
Feature: Preview a drag-drop onto image question
3
  As a teacher
4
  In order to check my drag-drop onto image 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   | ddimageortext | Drag onto image          | xsection |
23
      | Test questions   | ddimageortext | Drag to mathjax equation | mathjax  |
1 efrain 24
 
25
  @javascript @_bug_phantomjs
26
  Scenario: Preview a question using the mouse.
27
    When I am on the "Drag onto image" "core_question > preview" page logged in as teacher
28
    And I wait "2" seconds
29
    # Odd, but the <br>s go to nothing, not a space.
30
    And I drag "mountainbelt" to place "1" in the drag and drop onto image question
31
    And I drag "continentalshelf" to place "2" in the drag and drop onto image question
32
    And I drag "oceantrench" to place "3" in the drag and drop onto image question
33
    And I drag "abyssalplain" to place "4" in the drag and drop onto image question
34
    And I drag "continentalslope" to place "5" in the drag and drop onto image question
35
    And I drag "continentalrise" to place "6" in the drag and drop onto image question
36
    And I drag "islandarc" to place "7" in the drag and drop onto image question
37
    And I drag "mid-oceanridge" to place "8" in the drag and drop onto image question
38
    And I press "Submit and finish"
39
    Then the state of "Identify the features" question is shown as "Correct"
40
    And I should see "Mark 1.00 out of 1.00"
41
 
42
  @javascript
43
  Scenario: Preview a question using the keyboard.
44
    When I am on the "Drag onto image" "core_question > preview" page logged in as teacher
45
    # Increase window size and wait 2 seconds to ensure elements are placed properly by js.
46
    And I type "       " on place "1" in the drag and drop onto image question
47
    And I type "       " on place "2" in the drag and drop onto image question
48
    And I type "     " on place "3" in the drag and drop onto image question
49
    And I type "   " on place "4" in the drag and drop onto image question
50
    And I type "    " on place "5" in the drag and drop onto image question
51
    And I type "   " on place "6" in the drag and drop onto image question
52
    And I type " " on place "7" in the drag and drop onto image question
53
    And I type " " on place "8" in the drag and drop onto image question
54
    And I press "Submit and finish"
55
    Then the state of "Identify the features" question is shown as "Correct"
56
    And I should see "Mark 1.00 out of 1.00"
1441 ariadna 57
 
58
  @javascript
59
  Scenario: Preview a drag-drop into image question with mathjax question.
60
    Given the "mathjaxloader" filter is "on"
61
    And the "mathjaxloader" filter applies to "content and headings"
62
    And I am on the "Drag to mathjax equation" "core_question > preview" page logged in as teacher
63
    And I press "Fill in correct responses"
64
    When I press "Submit and finish"
65
    Then ".filter_mathjaxloader_equation" "css_element" should exist in the ".draghome" "css_element"