Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_h5pactivity @core_h5p @_file_upload @_switch_iframe @javascript
2
Feature: View fill the blanks attempt report
3
  In order to let users to review a fill the blanks attempt
4
  As a user
5
  I need to view fill in interactions in the report
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | student1 | Student   | 1        | student1@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
      | student1 | C1     | student        |
17
    And the following config values are set as admin:
18
      # No HTML should appear even with formatstringstriptags disabled.
19
      | formatstringstriptags | 0 |
20
    And the following "activity" exists:
21
      | activity        | h5pactivity                          |
22
      | course          | C1                                   |
23
      | name            | Awesome H5P package                  |
24
      | grademethod     | 2                                    |
25
      | packagefilepath | h5p/tests/fixtures/filltheblanks.h5p |
26
 
27
  Scenario: View attempt in a fill the blanks content
28
    Given I am on the "Awesome H5P package" "h5pactivity activity" page logged in as student1
29
    # Do an attempt.
30
    And I switch to "h5p-player" class iframe
31
    And I switch to "h5p-iframe" class iframe
32
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 1 of 4\")]" to "Brigadoon"
33
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 2 of 4\")]" to "Emerald city"
34
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 3 of 4\")]" to "Narnia"
35
    And I set the field with xpath "//input[contains(@aria-label,\"Blank input 4 of 4\")]" to "Canberra"
36
    And I click on "Check" "button" in the ".h5p-question-buttons" "css_element"
37
    And I switch to the main frame
38
    And I reload the page
39
    # Check attempt.
40
    When I navigate to "Attempts report" in current page administration
41
    And I follow "View report"
42
    Then I should see "Of which countries are Berlin, Washington, Beijing, Canberra and Brasilia the capitals?"
43
    And I should see "Brigadoon" in the "Brasilia" "table_row"
44
    And "Your answer is incorrect" "icon" should exist in the "Brasilia" "table_row"
45
    And I should see "Emerald city" in the "Washington" "table_row"
46
    And I should see "Narnia" in the "Berlin" "table_row"
47
    And "Your answer is incorrect" "icon" should exist in the "Berlin" "table_row"
48
    And "Your answer is correct" "icon" should exist in the "Canberra" "table_row"
49
    And I should not see "<p>"