Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qtype @qtype_ordering
2
Feature: Test importing Ordering questions
3
  As a teacher
4
  In order to reuse Ordering questions
5
  I need to import them
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | T1        | Teacher1 | teacher1@example.com |
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
      | teacher1 | C1     | editingteacher |
17
 
18
  @javascript @_file_upload
19
  Scenario: import Matching question.
20
    When I am on the "Course 1" "core_question > course question import" page logged in as teacher1
21
    And I set the field "id_format_xml" to "1"
22
    And I upload "question/type/ordering/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager
23
    And I press "id_submitbutton"
24
    And I press "Continue"
25
    Then I should see "dd-ordering 1"
26
    And I choose "Edit question" action for "dd-ordering 1" in the question bank
27
    Then the following fields match these values:
28
      | shownumcorrect          | 1 |
29
      | id_hintshownumcorrect_0 | 1 |
30
      | id_hintoptions_0        | 0 |
31
      | id_hintshownumcorrect_1 | 0 |
32
      | id_hintoptions_1        | 1 |
33
 
34
  @javascript @_file_upload
35
  Scenario: Import old question.
36
    When I am on the "Course 1" "core_question > course question import" page logged in as teacher1
37
    And I set the field "id_format_xml" to "1"
38
    And I upload "question/type/ordering/tests/fixtures/testoldquestion.moodle.xml" file to "Import" filemanager
39
    And I press "id_submitbutton"
40
    And I press "Continue"
41
    Then I should see "dd-ordering old question"
42
    And I choose "Edit question" action for "dd-ordering old question" in the question bank
43
    Then the following fields match these values:
44
      | shownumcorrect          | 1 |
45
      | id_hintshownumcorrect_0 | 1 |
46
      | id_hintoptions_0        | 1 |
47
      | id_hintshownumcorrect_1 | 1 |
48
      | id_hintoptions_1        | 1 |