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 essay attempt report
3
  In order to let users to review an essay attempt
4
  As a user
5
  I need to view long 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/basic_essay.h5p |
26
 
27
  Scenario: View attempt essay content
28
    # Do an attempt.
29
    Given I am on the "Awesome H5P package" "h5pactivity activity" page logged in as student1
30
    And I change window size to "large"
31
    And I switch to "h5p-player" class iframe
32
    And I switch to "h5p-iframe" class iframe
33
    And I set the field with xpath "//textarea" to "This is a smurfing smurf"
34
    And I click on "Check" "button" in the ".h5p-question-buttons" "css_element"
35
    And I switch to the main frame
36
    And I reload the page
37
    # Check attempt.
38
    When I navigate to "Attempts report" in current page administration
39
    And I follow "View report"
40
    Then I should see "This is a smurfing smurf"
41
    And I should not see "<strong>smurf</strong>"