Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qtype @qtype_essay
2
Feature: Test exporting Essay questions
3
  As a teacher
4
  In order to be able to reuse my Essay questions
5
  I need to export 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:
21
      | questioncategory | qtype | name      | template         |
22
      | Test questions   | essay | essay-001 | editor           |
23
      | Test questions   | essay | essay-002 | editorfilepicker |
24
      | Test questions   | essay | essay-003 | plain            |
25
 
26
  Scenario: Export 3 Essay questions
27
    When I am on the "Course 1" "core_question > course question export" page logged in as teacher
28
    And I set the field "id_format_xml" to "1"
29
    And I press "Export questions to file"
30
    Then following "click here" should download between "3000" and "3500" bytes
31
    # If the download step is the last in the scenario then we can sometimes run
32
    # into the situation where the download page causes a http redirect but behat
33
    # has already conducted its reset (generating an error). By putting a logout
34
    # step we avoid behat doing the reset until we are off that page.
35
    And I log out