1@mod @mod_h5pactivity @core_h5p @_file_upload @_switch_iframe @javascript 2Feature: 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 I log in as "admin" 21 And I am on "Course 1" course homepage with editing mode on 22 And I add a "H5P" to section "1" 23 And I set the following fields to these values: 24 | Name | Awesome H5P package | 25 | Description | Description | 26 | Grading method | Average grade | 27 And I upload "h5p/tests/fixtures/basic_essay.h5p" file to "Package file" filemanager 28 And I click on "Save and display" "button" 29 And I log out 30 31 Scenario: View attempt essay content 32 # Do an attempt. 33 Given I am on the "Awesome H5P package" "h5pactivity activity" page logged in as student1 34 And I change window size to "large" 35 And I switch to "h5p-player" class iframe 36 And I switch to "h5p-iframe" class iframe 37 And I set the field with xpath "//textarea" to "This is a smurfing smurf" 38 And I click on "Check" "button" in the ".h5p-question-buttons" "css_element" 39 And I switch to the main frame 40 And I reload the page 41 # Check attempt. 42 When I follow "View my attempts" 43 And I follow "View report" 44 Then I should see "This is a smurfing smurf" 45 And I should not see "<strong>smurf</strong>" 46